Iterator on Coordinates.
More...
#include "Imagine/Common.h"
|
Coords< dim > | _a |
| begin
|
|
Coords< dim > | _b |
| end
|
|
Coords< dim > | _pos |
| Current position.
|
|
bool | _stop |
| end reached?
|
|
template<int dim>
class Imagine::CoordsIterator< dim >
Iterator on Coords. Iterates over rectangular region. Used to iterate over a MultiArray while being aware of coordinates.
- Parameters
-
- Examples
- Common/test/test.cpp, and Images/test/test.cpp.
◆ CoordsIterator() [1/2]
Constructs a stopped iterator, useful to check end of iteration with operator!=
.
Iterator on Coordinates.
Definition: Coords.h:83
◆ CoordsIterator() [2/2]
Constructs an iterator over a rectangular region from a to b
- Parameters
-
a,b | limits of rectangular region |
◆ operator!=()
Inequality test
- Parameters
-
it | iterator for comparision |
- Returns
- true if operator==() is false
if (it1!=it2) cout << "it1 is different from it2" << endl;
◆ operator*()
Dereference: coordinate position
- Returns
- position
◆ operator++() [1/2]
Pre-increment: advance to next position. Becomes stopped if end is reached
- Returns
- self reference
◆ operator++() [2/2]
Post-increment: advance to next position. Becomes stopped if end is reached
- Returns
- value before increment
cout << it++->x() << endl;
◆ operator->()
Member selection: pointer to coordinate position
- Returns
- pointer to position
cout << it++->x() << endl;
◆ operator=()
◆ operator==()
Equality test
- Parameters
-
it | iterator for comparision |
- Returns
- true if
- both are stopped
- or both are non stopped and at same position
if (it1==it2) cout << "it1 equals it2" << endl;
The documentation for this class was generated from the following file:
- C:/Users/Pascal Monasse/ImagineQt/Imagine/Common/src/Imagine/Common/Coords.h