casa
$Rev:20696$
|
Class to iterate through a RefRows object. More...
#include <RefRows.h>
Public Member Functions | |
RefRowsSliceIter (const RefRows &) | |
Construct the iterator on a RefRows object. | |
void | reset () |
Reset the iterator to the beginning. | |
Bool | pastEnd () const |
Is the iterator past the end? | |
void | operator++ () |
Go the next slice. | |
void | operator++ (int) |
void | next () |
uInt | sliceStart () const |
Get the current slice start, end, or increment. | |
uInt | sliceEnd () const |
uInt | sliceIncr () const |
Private Attributes | |
Vector< uInt > | itsRows |
Bool | itsSliced |
uInt | itsStart |
uInt | itsEnd |
uInt | itsIncr |
uInt | itsPos |
Bool | itsPastEnd |
Class to iterate through a RefRows object.
Internal
RefRowsSliceIter is useful to iterate through a RefRows object, especially if the RefRows object contains slices. Each step in the iteration returns a Slice object containing the next slice in the RefRows object.
It is used in Table and data manager classes (e.g. StManColumn).
This example shows how to iterate through a RefRows object (giving a slice) and through each of the slices.
void somefunc (const RefRows& rownrs) // Iterate through all slices. RefRowsSliceIter rowiter(rownrs); while (! rowiter.pastEnd()) { // Get start, end, and increment for this slice. uInt rownr = rowiter.sliceStart(); uInt end = rowiter.sliceEnd(); uInt incr = rowiter.sliceIncr(); // Iterate through the row numbers in the slice. while (rownr <= end) { rownr += incr; } // Go to next slice. rowiter++; } }
casa::RefRowsSliceIter::RefRowsSliceIter | ( | const RefRows & | ) |
Construct the iterator on a RefRows object.
It is set to the beginning.
void casa::RefRowsSliceIter::next | ( | ) |
Referenced by operator++().
void casa::RefRowsSliceIter::operator++ | ( | ) | [inline] |
void casa::RefRowsSliceIter::operator++ | ( | int | ) | [inline] |
Bool casa::RefRowsSliceIter::pastEnd | ( | ) | const [inline] |
void casa::RefRowsSliceIter::reset | ( | ) |
Reset the iterator to the beginning.
uInt casa::RefRowsSliceIter::sliceEnd | ( | ) | const [inline] |
uInt casa::RefRowsSliceIter::sliceIncr | ( | ) | const [inline] |
uInt casa::RefRowsSliceIter::sliceStart | ( | ) | const [inline] |
uInt casa::RefRowsSliceIter::itsEnd [private] |
Definition at line 244 of file RefRows.h.
Referenced by sliceEnd().
uInt casa::RefRowsSliceIter::itsIncr [private] |
Definition at line 245 of file RefRows.h.
Referenced by sliceIncr().
Bool casa::RefRowsSliceIter::itsPastEnd [private] |
uInt casa::RefRowsSliceIter::itsPos [private] |
Vector<uInt> casa::RefRowsSliceIter::itsRows [private] |
Bool casa::RefRowsSliceIter::itsSliced [private] |
uInt casa::RefRowsSliceIter::itsStart [private] |
Definition at line 243 of file RefRows.h.
Referenced by sliceStart().