casa
$Rev:20696$
|
Class holding the row numbers in a ConcatTable. More...
#include <ConcatRows.h>
Public Member Functions | |
ConcatRows () | |
Construct an empty block. | |
void | reserve (uInt ntable) |
Reserve the block for the given nr of tables. | |
void | add (uInt nrow) |
Add a table with the given nr of rows. | |
uInt | ntable () const |
Give the nr of tables. | |
uInt | nrow () const |
Get the total nr of rows. | |
uInt | operator[] (uInt i) const |
Give the nr of rows for the i-th table. | |
uInt | offset (uInt i) const |
Give the offset for the i-th table. | |
void | mapRownr (uInt &tableNr, uInt &tabRownr, uInt rownr) const |
Map an overall row number to a table and row number. | |
Private Member Functions | |
void | findRownr (uInt rownr) const |
Find the row number and fill in the lastXX_p values. | |
Private Attributes | |
Block< uInt > | itsRows |
uInt | itsNTable |
uInt | itsLastStRow |
uInt | itsLastEndRow |
uInt | itsLastTableNr |
Class holding the row numbers in a ConcatTable.
Internal
ConcatRows is used to hold the row numbers forming the concatenation of oher tables. table. It contains a vector which can hold the row numbers in 2 ways:
ScalarColumn::getColumnRange
. Class ConcatRowsIter can be used to iterate through a ConcatRows object. Each step in the iteration goes to the next slice. If the ConcatRows object contains a simple series of row numbers, each slice contains only one row number. This can degrade performance, so it is possible to use shortcuts by testing if the object contains slices (using isSliced()
) and getting the row number vector directly (using rowVector()
).
ConcatRows is meant to have one class representing the various ways of picking row numbers. This simplifies the interface of the table and data manager classes dealing with getting/putting the data.
Definition at line 82 of file ConcatRows.h.
casa::ConcatRows::ConcatRows | ( | ) | [inline] |
Construct an empty block.
Definition at line 86 of file ConcatRows.h.
void casa::ConcatRows::add | ( | uInt | nrow | ) |
Add a table with the given nr of rows.
void casa::ConcatRows::findRownr | ( | uInt | rownr | ) | const [private] |
Find the row number and fill in the lastXX_p values.
Referenced by mapRownr().
void casa::ConcatRows::mapRownr | ( | uInt & | tableNr, |
uInt & | tabRownr, | ||
uInt | rownr | ||
) | const [inline] |
Map an overall row number to a table and row number.
Definition at line 117 of file ConcatRows.h.
References findRownr(), itsLastEndRow, itsLastStRow, and itsLastTableNr.
uInt casa::ConcatRows::nrow | ( | ) | const [inline] |
Get the total nr of rows.
Definition at line 105 of file ConcatRows.h.
uInt casa::ConcatRows::ntable | ( | ) | const [inline] |
uInt casa::ConcatRows::offset | ( | uInt | i | ) | const [inline] |
Give the offset for the i-th table.
Definition at line 113 of file ConcatRows.h.
References itsRows.
Give the nr of rows for the i-th table.
Definition at line 109 of file ConcatRows.h.
References itsRows.
void casa::ConcatRows::reserve | ( | uInt | ntable | ) | [inline] |
Reserve the block for the given nr of tables.
Definition at line 94 of file ConcatRows.h.
References itsRows, and casa::Block< T >::resize().
uInt casa::ConcatRows::itsLastEndRow [mutable, private] |
Definition at line 134 of file ConcatRows.h.
Referenced by mapRownr().
uInt casa::ConcatRows::itsLastStRow [mutable, private] |
Definition at line 133 of file ConcatRows.h.
Referenced by mapRownr().
uInt casa::ConcatRows::itsLastTableNr [mutable, private] |
Definition at line 135 of file ConcatRows.h.
Referenced by mapRownr().
uInt casa::ConcatRows::itsNTable [private] |
Definition at line 132 of file ConcatRows.h.
Block<uInt> casa::ConcatRows::itsRows [private] |
Definition at line 131 of file ConcatRows.h.
Referenced by nrow(), offset(), operator[](), and reserve().