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