casacore
|
Iterate a const Array cursor through a const Array. More...
#include <ArrayIter.h>
Public Member Functions | |
ReadOnlyArrayIterator (const Array< T, Alloc > &arr, size_t byDim=1) | |
Step through array "arr" using a cursor of dimensionality "byDim". More... | |
ReadOnlyArrayIterator (const Array< T, Alloc > &arr, const IPosition &axes, bool axesAreCursor=true) | |
Step through an array for the given iteration axes. More... | |
void | next () |
Move the cursor to the next position. More... | |
void | set (const IPosition &cursorPos) |
Set the cursor to the given position. More... | |
void | reset () |
Reset the cursor to the beginning. More... | |
void | origin () |
const Array< T, Alloc > & | array () |
Return the cursor. More... | |
bool | atStart () const |
The same as the functions in ArrayPositionIterator. More... | |
bool | pastEnd () const |
const IPosition & | pos () const |
IPosition | endPos () const |
size_t | ndim () const |
Private Member Functions | |
ReadOnlyArrayIterator (const ReadOnlyArrayIterator< T, Alloc > &) | |
Not implemented. More... | |
ReadOnlyArrayIterator< T, Alloc > & | operator= (const ReadOnlyArrayIterator< T, Alloc > &) |
Private Attributes | |
ArrayIterator< T, Alloc > | ai |
Iterate a const Array cursor through a const Array.
This class behaves exactly like an ArrayIterator, only it iterates through const Arrays.
Tip: This class is not derived from ArrayPositionIterator; For simplicity it merely contains an ArrayIterator to which it forwards requests and returns (const) results; The iterator classes should be rethought and reimplemented;
Definition at line 171 of file ArrayIter.h.
|
inlineexplicit |
Step through array "arr" using a cursor of dimensionality "byDim".
Definition at line 175 of file ArrayIter.h.
|
inline |
Step through an array for the given iteration axes.
Definition at line 179 of file ArrayIter.h.
|
private |
Not implemented.
|
inline |
Return the cursor.
(Perhaps we should have a fn() that returns a reference to the original array as well?)
Definition at line 204 of file ArrayIter.h.
References casacore::ReadOnlyArrayIterator< T, Alloc >::ai.
|
inline |
The same as the functions in ArrayPositionIterator.
Definition at line 208 of file ArrayIter.h.
References casacore::ReadOnlyArrayIterator< T, Alloc >::ai.
|
inline |
Definition at line 211 of file ArrayIter.h.
References casacore::ReadOnlyArrayIterator< T, Alloc >::ai.
|
inline |
Definition at line 212 of file ArrayIter.h.
References casacore::ReadOnlyArrayIterator< T, Alloc >::ai.
|
inline |
Move the cursor to the next position.
Definition at line 184 of file ArrayIter.h.
References casacore::ReadOnlyArrayIterator< T, Alloc >::ai.
|
private |
|
inline |
Definition at line 199 of file ArrayIter.h.
References casacore::ReadOnlyArrayIterator< T, Alloc >::ai.
|
inline |
Definition at line 209 of file ArrayIter.h.
References casacore::ReadOnlyArrayIterator< T, Alloc >::ai.
|
inline |
Definition at line 210 of file ArrayIter.h.
References casacore::ReadOnlyArrayIterator< T, Alloc >::ai.
|
inline |
Reset the cursor to the beginning.
Definition at line 198 of file ArrayIter.h.
References casacore::ReadOnlyArrayIterator< T, Alloc >::ai.
|
inline |
Set the cursor to the given position.
The position can only contain the iteration axes or it can be the full position.
In the first case the position must to be given in the order of the iteration axes as given in the constructor. In the latter case the position must be given in natural order (as given by function pos
and only the cursor axes are taken into account.
Definition at line 194 of file ArrayIter.h.
References casacore::ReadOnlyArrayIterator< T, Alloc >::ai.
|
private |
Definition at line 221 of file ArrayIter.h.
Referenced by casacore::ReadOnlyArrayIterator< T, Alloc >::array(), casacore::ReadOnlyArrayIterator< T, Alloc >::atStart(), casacore::ReadOnlyArrayIterator< T, Alloc >::endPos(), casacore::ReadOnlyArrayIterator< T, Alloc >::ndim(), casacore::ReadOnlyArrayIterator< T, Alloc >::next(), casacore::ReadOnlyArrayIterator< T, Alloc >::origin(), casacore::ReadOnlyArrayIterator< T, Alloc >::pastEnd(), casacore::ReadOnlyArrayIterator< T, Alloc >::pos(), casacore::ReadOnlyArrayIterator< T, Alloc >::reset(), and casacore::ReadOnlyArrayIterator< T, Alloc >::set().