casacore
|
#include <ConcatRows.h>
Public Member Functions | |
ConcatRows () | |
Construct an empty block. More... | |
void | reserve (uInt ntable) |
Reserve the block for the given nr of tables. More... | |
void | add (rownr_t nrow) |
Add a table with the given nr of rows. More... | |
uInt | ntable () const |
Give the nr of tables. More... | |
rownr_t | nrow () const |
Get the total nr of rows. More... | |
rownr_t | operator[] (uInt i) const |
Give the nr of rows for the i-th table. More... | |
rownr_t | offset (uInt i) const |
Give the offset for the i-th table. More... | |
void | mapRownr (uInt &tableNr, rownr_t &tabRownr, rownr_t rownr) const |
Map an overall row number to a table and row number. More... | |
Private Member Functions | |
void | findRownr (rownr_t rownr) const |
Find the row number and fill in the lastXX_p values. More... | |
Private Attributes | |
Block< rownr_t > | itsRows |
uInt | itsNTable |
rownr_t | itsLastStRow |
rownr_t | 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 83 of file ConcatRows.h.
|
inline |
Construct an empty block.
Definition at line 87 of file ConcatRows.h.
void casacore::ConcatRows::add | ( | rownr_t | nrow | ) |
Add a table with the given nr of rows.
|
private |
Find the row number and fill in the lastXX_p values.
Referenced by mapRownr().
|
inline |
Map an overall row number to a table and row number.
Definition at line 118 of file ConcatRows.h.
References findRownr(), itsLastEndRow, itsLastStRow, and itsLastTableNr.
|
inline |
Get the total nr of rows.
Definition at line 106 of file ConcatRows.h.
|
inline |
Give the nr of tables.
Definition at line 102 of file ConcatRows.h.
References itsNTable.
Referenced by reserve().
Give the offset for the i-th table.
Definition at line 114 of file ConcatRows.h.
References itsRows.
Give the nr of rows for the i-th table.
Definition at line 110 of file ConcatRows.h.
References itsRows.
|
inline |
Reserve the block for the given nr of tables.
Definition at line 95 of file ConcatRows.h.
References itsRows, ntable(), and casacore::Block< T >::resize().
|
mutableprivate |
Definition at line 135 of file ConcatRows.h.
Referenced by mapRownr().
|
mutableprivate |
Definition at line 134 of file ConcatRows.h.
Referenced by mapRownr().
|
mutableprivate |
Definition at line 136 of file ConcatRows.h.
Referenced by mapRownr().
|
private |
Definition at line 133 of file ConcatRows.h.
Definition at line 132 of file ConcatRows.h.
Referenced by nrow(), offset(), operator[](), and reserve().