28 #ifndef LATTICES_LATTICEITERATOR_H
29 #define LATTICES_LATTICEITERATOR_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/lattices/Lattices/Lattice.h>
34 #include <casacore/lattices/Lattices/LatticeIterInterface.h>
35 #include <casacore/casa/Arrays/ArrayFwd.h>
36 #include <casacore/casa/Utilities/CountedPtr.h>
42 class LatticeNavigator;
521 #ifndef CASACORE_NO_AUTO_TEMPLATES
522 #include <casacore/lattices/Lattices/Lattice.tcc>
523 #include <casacore/lattices/Lattices/LatticeIterator.tcc>
Referenced counted pointer for constant data.
A read/write lattice iterator.
Vector< T > & rwVectorCursor()
Functions to return a window to the data in the Lattice.
LatticeIterator(Lattice< T > &data, const LatticeNavigator &method, Bool useRef=True)
Construct the Iterator with the supplied data, and iteration strategy.
Matrix< T > & rwMatrixCursor()
LatticeIterator(Lattice< T > &data, Bool useRef=True)
Construct the Iterator with the supplied data.
Cube< T > & rwCubeCursor()
LatticeIterator(const LatticeIterator< T > &other)
The copy constructor uses reference semantics (ie.
LatticeIterator< T > & operator=(const LatticeIterator< T > &other)
Assignment uses reference semantics (ie.
Vector< T > & woVectorCursor()
LatticeIterator< T > copy() const
Make a copy of the iterator object.
Bool ok() const
Function which checks the internals of the class for consistency.
~LatticeIterator()
destructor (cleans up dangling references and releases memory)
Matrix< T > & woMatrixCursor()
LatticeIterator()
The default constructor creates an empty object which is practically unusable.
LatticeIterator(Lattice< T > &data, const IPosition &cursorShape, Bool useRef=True)
Iterate through the data with a LatticeStepper that has uses the supplied cursorShape.
Cube< T > & woCubeCursor()
Bool atEnd() const
Function which returns a value of "True" if an attempt has been made to move the cursor beyond the en...
void reset()
Function which resets the cursor to the beginning of the Lattice and resets the number of steps taken...
RO_LatticeIterator(const Lattice< T > &data, Bool useRef=True)
Construct the Iterator with the supplied data.
Bool isNull() const
Is the iterator object empty?
const Matrix< T > & matrixCursor() const
Bool atStart() const
Function which returns a value of "True" if the cursor is at the beginning of the Lattice,...
const Array< T > & cursor() const
IPosition endPosition() const
Function which returns the current position of the end of the cursor.
IPosition position() const
Function which returns the current position of the beginning of the cursor within the Lattice.
Bool operator++()
Increment operator - increment the cursor to the next position.
RO_LatticeIterator(const Lattice< T > &data, const IPosition &cursorShape, Bool useRef=True)
Construct the Iterator with the supplied data.
const Vector< T > & vectorCursor() const
Functions which returns a window to the data in the Lattice.
RO_LatticeIterator()
The default constructor creates an empty object which is practically unusable.
RO_LatticeIterator< T > copy() const
Make a copy of the iterator object.
Lattice< T > & lattice() const
Return the underlying lattice.
const Cube< T > & cubeCursor() const
RO_LatticeIterator(const RO_LatticeIterator< T > &other)
The copy constructor uses reference semantics (ie.
~RO_LatticeIterator()
Destructor (cleans up dangling references and releases memory)
RO_LatticeIterator< T > & operator=(const RO_LatticeIterator< T > &other)
Assignment uses reference semantics (ie.
CountedPtr< LatticeIterInterface< T > > itsIterPtr
The pointer to the Iterator.
RO_LatticeIterator(const Lattice< T > &data, const LatticeNavigator &method, Bool useRef=True)
Construct the Iterator with the supplied data, and iteration strategy.
IPosition cursorShape() const
Function which returns the shape of the cursor which is iterating through the Lattice.
IPosition latticeShape() const
Function which returns the shape of the Lattice being iterated through.
uInt nsteps() const
Function to return the number of steps (increments or decrements) taken since construction (or since ...
Bool ok() const
Function which checks the internals of the class for consistency.
Bool operator--()
Decrement operator - decrement the cursor to the previous position.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.