casa
$Rev:20696$
|
Class to iterate through a ConcatRows object.
#include <ConcatRows.h>
Public Member Functions | |
ConcatRowsIter (const ConcatRows &) | |
Construct the iterator on a ConcatRows object. | |
ConcatRowsIter (const ConcatRows &, uInt start, uInt end, uInt incr=1) | |
Construct the iterator on a ConcatRows object for the given row range. | |
Bool | pastEnd () const |
Is the iterator past the end? | |
void | operator++ () |
Go the next chunk. | |
void | operator++ (int) |
void | next () |
RefRows | getChunk () const |
Get the current chunk. | |
uInt | tableNr () const |
Get the nr of the table the current chunk is in. | |
Private Attributes | |
const ConcatRows * | itsRows |
Vector< uInt > | itsChunk |
uInt | itsStart |
uInt | itsEnd |
uInt | itsIncr |
uInt | itsPos |
Bool | itsPastEnd |
Class to iterate through a ConcatRows object.
<h3>Intended use:</h3> Internal <h3>Review Status</h3><dl><dt>Reviewed By:<dd>UNKNOWN<dt>Test programs:<dd>tConcatRows</dl> <h3>Prerequisite</h3><ul> <li> \link casa::ConcatRows ConcatRows \endlink </ul> <h3>Synopsis</h3> ConcatRowsSliceIter is useful to iterate through a \link casa::ConcatRows ConcatRows \endlink object. It is possible to define for which row
especially if the ConcatRows object contains slices. Each step in the iteration returns a Slice object containing the next slice in the ConcatRows object.
It is used in Table and data manager classes (e.g. StManColumn).
This example shows how to iterate through a ConcatRows object (giving a slice) and through each of the slices.
void somefunc (const ConcatRows& rownrs) // Iterate through all slices. ConcatRowsSliceIter 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++; } }
Definition at line 193 of file ConcatRows.h.
casa::ConcatRowsIter::ConcatRowsIter | ( | const ConcatRows & | ) | [explicit] |
Construct the iterator on a ConcatRows object.
It is set to the full range.
casa::ConcatRowsIter::ConcatRowsIter | ( | const ConcatRows & | , |
uInt | start, | ||
uInt | end, | ||
uInt | incr = 1 |
||
) |
Construct the iterator on a ConcatRows object for the given row range.
RefRows casa::ConcatRowsIter::getChunk | ( | ) | const [inline] |
Get the current chunk.
Definition at line 217 of file ConcatRows.h.
References itsChunk, and casa::True.
void casa::ConcatRowsIter::next | ( | ) |
Referenced by operator++().
void casa::ConcatRowsIter::operator++ | ( | ) | [inline] |
void casa::ConcatRowsIter::operator++ | ( | int | ) | [inline] |
Definition at line 211 of file ConcatRows.h.
References next().
Bool casa::ConcatRowsIter::pastEnd | ( | ) | const [inline] |
uInt casa::ConcatRowsIter::tableNr | ( | ) | const [inline] |
Get the nr of the table the current chunk is in.
Definition at line 221 of file ConcatRows.h.
References itsPos.
Vector<uInt> casa::ConcatRowsIter::itsChunk [private] |
Definition at line 226 of file ConcatRows.h.
Referenced by getChunk().
uInt casa::ConcatRowsIter::itsEnd [private] |
Definition at line 228 of file ConcatRows.h.
uInt casa::ConcatRowsIter::itsIncr [private] |
Definition at line 229 of file ConcatRows.h.
Bool casa::ConcatRowsIter::itsPastEnd [private] |
Definition at line 231 of file ConcatRows.h.
Referenced by pastEnd().
uInt casa::ConcatRowsIter::itsPos [private] |
Definition at line 230 of file ConcatRows.h.
Referenced by tableNr().
const ConcatRows* casa::ConcatRowsIter::itsRows [private] |
Definition at line 225 of file ConcatRows.h.
uInt casa::ConcatRowsIter::itsStart [private] |
Definition at line 227 of file ConcatRows.h.