28 #ifndef CASA_ARRAYITER2_H
29 #define CASA_ARRAYITER2_H
92 bool axesAreCursor =
true);
95 virtual void next()
override;
122 std::unique_ptr<Array<T, Alloc>>
ap_p;
176 :
ai(const_cast<
Array<T, Alloc>&>(arr),byDim) {}
180 bool axesAreCursor =
true)
181 :
ai(const_cast<
Array<T, Alloc>&>(arr),axes,axesAreCursor) {}
228 #include "ArrayIter.tcc"
Non-templated base class for templated Array class.
ArrayIterator(const Array< T, Alloc > &arr, size_t byDim=1)
Step through array "arr" over the first byDim axes (using a cursor of dimensionality "byDim").
virtual ArrayBase & getArray() override
Get the array in the cursor.
Array< T, Alloc > pOriginalArray_p
void apSetPointer(int stepDim)
helper function to set the pointer to the new data position in ap after a step in the given dimension...
virtual void set(const IPosition &cursorPos) override
Set the cursor to the given position.
void init(const Array< T, Alloc > &)
helper function to centralize construction work
ArrayIterator< T, Alloc > & operator=(const ArrayIterator< T, Alloc > &)
virtual void reset() override
Reset the cursor to the beginning.
Array< T, Alloc > & array()
Return the cursor.
std::unique_ptr< Array< T, Alloc > > ap_p
The cursor.
ArrayIterator(const Array< T, Alloc > &arr, const IPosition &axes, bool axesAreCursor=true)
Step through an array using the given axes.
virtual void next() override
Move the cursor to the next position.
ArrayIterator(const ArrayIterator< T, Alloc > &)
Iterate a const Array cursor through a const Array.
const Array< T, Alloc > & array()
Return the cursor.
void reset()
Reset the cursor to the beginning.
void next()
Move the cursor to the next position.
void set(const IPosition &cursorPos)
Set the cursor to the given position.
bool atStart() const
The same as the functions in ArrayPositionIterator.
const IPosition & pos() const
ReadOnlyArrayIterator(const Array< T, Alloc > &arr, const IPosition &axes, bool axesAreCursor=true)
Step through an array for the given iteration axes.
ReadOnlyArrayIterator(const ReadOnlyArrayIterator< T, Alloc > &)
Not implemented.
ReadOnlyArrayIterator(const Array< T, Alloc > &arr, size_t byDim=1)
Step through array "arr" using a cursor of dimensionality "byDim".
ArrayIterator< T, Alloc > ai
ReadOnlyArrayIterator< T, Alloc > & operator=(const ReadOnlyArrayIterator< T, Alloc > &)
this file contains all the compiler specific defines