Loading...
Searching...
No Matches
casacore::ConcatRowsIter Class Reference
tables package (libcasa_tables) » Tables_module » Tables_module_internal_classes

Class to iterate through a ConcatRows object. More...

`#include <ConcatRows.h>`

## Public Member Functions

| ConcatRowsIter (const ConcatRows &)
| Construct the iterator on a ConcatRows object.
| ConcatRowsIter (const ConcatRows &, rownr_t start, rownr_t end, rownr_t 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< rownr_t > | itsChunk
rownr_t | itsStart
rownr_t | itsEnd
rownr_t | itsIncr
uInt | itsTabNr
Bool | itsPastEnd

## Detailed Description

Class to iterate through a ConcatRows object.

### Intended use:

Internal

### Review Status

Reviewed By:
  UNKNOWN
Test programs:
  tConcatRows

### Prerequisite

- ConcatRows

### Synopsis

ConcatRowsSliceIter is useful to iterate through a ConcatRows 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).

### Example

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.
rownr_t rownr = rowiter.sliceStart();
rownr_t end = rowiter.sliceEnd();
rownr_t incr = rowiter.sliceIncr();
// Iterate through the row numbers in the slice.
while (rownr <= end) {
rownr += incr;
}
// Go to next slice.
rowiter++;
}
}
casacore::ConcatRows
Definition ConcatRows.h:82
casacore::rownr_t
uInt64 rownr_t
Define the type of a row number in a table.
Definition aipsxtype.h:44

Definition at line 192 of file ConcatRows.h.

## Constructor & Destructor Documentation

## ConcatRowsIter() [1/2]

casacore::ConcatRowsIter::ConcatRowsIter | ( | const ConcatRows & |  | ) |

explicit

Construct the iterator on a ConcatRows object.

It is set to the full range.

## ConcatRowsIter() [2/2]

casacore::ConcatRowsIter::ConcatRowsIter | ( | const ConcatRows & | ,
|  | rownr_t | start,
|  | rownr_t | end,
|  | rownr_t | incr = 1 )

Construct the iterator on a ConcatRows object for the given row range.

## Member Function Documentation

## getChunk()

RefRows casacore::ConcatRowsIter::getChunk | ( |  | ) | const

inline

Get the current chunk.

Definition at line 216 of file ConcatRows.h.

References itsChunk, and casacore::True.

## next()

void casacore::ConcatRowsIter::next | ( |  | ) |

Referenced by operator++(), and operator++().

## operator++() [1/2]

void casacore::ConcatRowsIter::operator++ | ( |  | ) |

inline

Go the next chunk.

Definition at line 208 of file ConcatRows.h.

References next().

## operator++() [2/2]

void casacore::ConcatRowsIter::operator++ | ( | int |  | ) |

inline

Definition at line 210 of file ConcatRows.h.

References next().

## pastEnd()

Bool casacore::ConcatRowsIter::pastEnd | ( |  | ) | const

inline

Is the iterator past the end?

Definition at line 203 of file ConcatRows.h.

References itsPastEnd.

## tableNr()

uInt casacore::ConcatRowsIter::tableNr | ( |  | ) | const

inline

Get the nr of the table the current chunk is in.

Definition at line 220 of file ConcatRows.h.

References itsTabNr.

## Member Data Documentation

## itsChunk

Vector<rownr_t> casacore::ConcatRowsIter::itsChunk

private

Definition at line 225 of file ConcatRows.h.

Referenced by getChunk().

## itsEnd

rownr_t casacore::ConcatRowsIter::itsEnd

private

Definition at line 227 of file ConcatRows.h.

## itsIncr

rownr_t casacore::ConcatRowsIter::itsIncr

private

Definition at line 228 of file ConcatRows.h.

## itsPastEnd

Bool casacore::ConcatRowsIter::itsPastEnd

private

Definition at line 230 of file ConcatRows.h.

Referenced by pastEnd().

## itsRows

const ConcatRows* casacore::ConcatRowsIter::itsRows

private

Definition at line 224 of file ConcatRows.h.

## itsStart

rownr_t casacore::ConcatRowsIter::itsStart

private

Definition at line 226 of file ConcatRows.h.

## itsTabNr

uInt casacore::ConcatRowsIter::itsTabNr

private

Definition at line 229 of file ConcatRows.h.

Referenced by tableNr().

The documentation for this class was generated from the following file:

- tables/Tables/ConcatRows.h