Access to a table column containing scalar records. More...
#include <ScaRecordColData.h>
Public Member Functions | |
ScalarRecordColumnData (const ScalarRecordColumnDesc *, ColumnSet *) | |
Construct a scalar column object from the given description in the given column set. | |
~ScalarRecordColumnData () | |
virtual Bool | canAccessScalarColumn (Bool &reask) const |
Ask if the data manager can handle a column. | |
virtual Bool | canAccessScalarColumnCells (Bool &reask) const |
Ask if the data manager can handle some cells in a column. | |
virtual void | initialize (uInt startRownr, uInt endRownr) |
Initialize the rows from startRownr till endRownr (inclusive) with the default value defined in the column description. | |
virtual Bool | isDefined (uInt rownr) const |
Test if the given cell contains a defined value. | |
virtual void | get (uInt rownr, void *) const |
Get the value from a particular cell. | |
virtual void | getScalarColumn (void *dataPtr) const |
Get the array of all values in the column. | |
virtual void | getScalarColumnCells (const RefRows &rownrs, void *dataPtr) const |
Get the array of some values in the column (on behalf of RefColumn). | |
virtual void | put (uInt rownr, const void *dataPtr) |
Put the value in a particular cell. | |
virtual void | putScalarColumn (const void *dataPtr) |
Put the array of all values in the column. | |
virtual void | putScalarColumnCells (const RefRows &rownrs, const void *dataPtr) |
Put the array of some values in the column (on behalf on RefColumn). | |
virtual void | makeSortKey (Sort &, CountedPtr< BaseCompare > &cmpObj, Int order, const void *&dataSave) |
Add this column and its data to the Sort object. | |
virtual void | makeRefSortKey (Sort &, CountedPtr< BaseCompare > &cmpObj, Int order, const Vector< uInt > &rownrs, const void *&dataSave) |
Do it only for the given row numbers. | |
virtual void | freeSortKey (const void *&dataSave) |
Free storage on the heap allocated by makeSortkey(). | |
virtual void | allocIterBuf (void *&lastVal, void *&curVal, CountedPtr< BaseCompare > &cmpObj) |
Allocate value buffers for the table iterator. | |
virtual void | freeIterBuf (void *&lastVal, void *&curVal) |
Free the value buffers allocated by allocIterBuf. | |
virtual void | createDataManagerColumn () |
Create a data manager column object for this column. | |
Private Member Functions | |
ScalarRecordColumnData (const ScalarRecordColumnData &) | |
Copy constructor cannot be used. | |
ScalarRecordColumnData & | operator= (const ScalarRecordColumnData &) |
Assignment cannot be used. | |
virtual void | putFileDerived (AipsIO &) |
Write the column data. | |
virtual void | getFileDerived (AipsIO &, const ColumnSet &) |
Read the column data back. | |
void | getRecord (uInt rownr, TableRecord &rec) const |
Handle getting and putting a record. | |
void | putRecord (uInt rownr, const TableRecord &rec) |
Private Attributes | |
const ScalarRecordColumnDesc * | scaDescPtr_p |
Pointer to column description. |
Access to a table column containing scalar records.
Internal
ScalarRecordColumnData represents a table column containing scalars.
The class ScalarRecordColumnData is derived from PlainColumn. It implements the virtual functions accessing a table column containing scalars holding records.
It is possible to access an scalar in an individual cell (i.e. table row) or in the entire column.
The main task of this class is to communicate with the data manager column object. This consists of:
The class is hidden from the user by the envelope class ScalarColumn. If used directly by other Table classes, it should be done with care. It assumes that the arrays in the various get and put functions have the correct length. ScalarColumn does that check.
Definition at line 96 of file ScaRecordColData.h.
casacore::ScalarRecordColumnData::ScalarRecordColumnData | ( | const ScalarRecordColumnDesc * | , | |
ColumnSet * | ||||
) |
Construct a scalar column object from the given description in the given column set.
This constructor is used by ScalarRecordColumnDesc::makeColumn.
casacore::ScalarRecordColumnData::~ScalarRecordColumnData | ( | ) |
casacore::ScalarRecordColumnData::ScalarRecordColumnData | ( | const ScalarRecordColumnData & | ) | [private] |
Copy constructor cannot be used.
virtual void casacore::ScalarRecordColumnData::allocIterBuf | ( | void *& | lastVal, | |
void *& | curVal, | |||
CountedPtr< BaseCompare > & | cmpObj | |||
) | [virtual] |
Allocate value buffers for the table iterator.
Iteration based on records is not supported, so an exception is thrown.
Reimplemented from casacore::BaseColumn.
virtual Bool casacore::ScalarRecordColumnData::canAccessScalarColumn | ( | Bool & | reask | ) | const [virtual] |
Ask if the data manager can handle a column.
Reimplemented from casacore::BaseColumn.
virtual Bool casacore::ScalarRecordColumnData::canAccessScalarColumnCells | ( | Bool & | reask | ) | const [virtual] |
Ask if the data manager can handle some cells in a column.
Reimplemented from casacore::BaseColumn.
virtual void casacore::ScalarRecordColumnData::createDataManagerColumn | ( | ) | [virtual] |
Create a data manager column object for this column.
Implements casacore::PlainColumn.
virtual void casacore::ScalarRecordColumnData::freeIterBuf | ( | void *& | lastVal, | |
void *& | curVal | |||
) | [virtual] |
Free the value buffers allocated by allocIterBuf.
Reimplemented from casacore::BaseColumn.
virtual void casacore::ScalarRecordColumnData::freeSortKey | ( | const void *& | dataSave | ) | [virtual] |
Free storage on the heap allocated by makeSortkey().
The pointer will be set to zero.
Reimplemented from casacore::BaseColumn.
virtual void casacore::ScalarRecordColumnData::get | ( | uInt | rownr, | |
void * | ||||
) | const [virtual] |
Get the value from a particular cell.
Implements casacore::BaseColumn.
virtual void casacore::ScalarRecordColumnData::getFileDerived | ( | AipsIO & | , | |
const ColumnSet & | ||||
) | [private, virtual] |
Read the column data back.
The control information is read from the given AipsIO object. This is used to bind the column to the appropriate data manager. Thereafter the data manager gets opened.
Implements casacore::PlainColumn.
void casacore::ScalarRecordColumnData::getRecord | ( | uInt | rownr, | |
TableRecord & | rec | |||
) | const [private] |
Handle getting and putting a record.
It is stored as a Vector of uChar.
virtual void casacore::ScalarRecordColumnData::getScalarColumn | ( | void * | dataPtr | ) | const [virtual] |
Get the array of all values in the column.
The length of the buffer pointed to by dataPtr must match the actual length. This is checked by ScalarColumn.
Reimplemented from casacore::BaseColumn.
virtual void casacore::ScalarRecordColumnData::getScalarColumnCells | ( | const RefRows & | rownrs, | |
void * | dataPtr | |||
) | const [virtual] |
Get the array of some values in the column (on behalf of RefColumn).
The length of the buffer pointed to by dataPtr must match the actual length. This is checked by ScalarColumn.
Reimplemented from casacore::BaseColumn.
virtual void casacore::ScalarRecordColumnData::initialize | ( | uInt | startRownr, | |
uInt | endRownr | |||
) | [virtual] |
Initialize the rows from startRownr till endRownr (inclusive) with the default value defined in the column description.
Implements casacore::BaseColumn.
Test if the given cell contains a defined value.
Implements casacore::BaseColumn.
virtual void casacore::ScalarRecordColumnData::makeRefSortKey | ( | Sort & | , | |
CountedPtr< BaseCompare > & | cmpObj, | |||
Int | order, | |||
const Vector< uInt > & | rownrs, | |||
const void *& | dataSave | |||
) | [virtual] |
Do it only for the given row numbers.
Reimplemented from casacore::BaseColumn.
virtual void casacore::ScalarRecordColumnData::makeSortKey | ( | Sort & | , | |
CountedPtr< BaseCompare > & | cmpObj, | |||
Int | order, | |||
const void *& | dataSave | |||
) | [virtual] |
Add this column and its data to the Sort object.
Sorting on records is not supported, so an exception is thrown.
Reimplemented from casacore::BaseColumn.
ScalarRecordColumnData& casacore::ScalarRecordColumnData::operator= | ( | const ScalarRecordColumnData & | ) | [private] |
Assignment cannot be used.
virtual void casacore::ScalarRecordColumnData::put | ( | uInt | rownr, | |
const void * | dataPtr | |||
) | [virtual] |
Put the value in a particular cell.
The length of the buffer pointed to by dataPtr must match the actual length. This is checked by ScalarColumn.
Implements casacore::BaseColumn.
virtual void casacore::ScalarRecordColumnData::putFileDerived | ( | AipsIO & | ) | [private, virtual] |
Write the column data.
The control information is written into the given AipsIO object, while the data is written/flushed by the data manager.
Implements casacore::PlainColumn.
void casacore::ScalarRecordColumnData::putRecord | ( | uInt | rownr, | |
const TableRecord & | rec | |||
) | [private] |
virtual void casacore::ScalarRecordColumnData::putScalarColumn | ( | const void * | dataPtr | ) | [virtual] |
Put the array of all values in the column.
The length of the buffer pointed to by dataPtr must match the actual length. This is checked by ScalarColumn.
Reimplemented from casacore::BaseColumn.
virtual void casacore::ScalarRecordColumnData::putScalarColumnCells | ( | const RefRows & | rownrs, | |
const void * | dataPtr | |||
) | [virtual] |
Put the array of some values in the column (on behalf on RefColumn).
The length of the buffer pointed to by dataPtr must match the actual length. This is checked by ScalarColumn.
Reimplemented from casacore::BaseColumn.
const ScalarRecordColumnDesc* casacore::ScalarRecordColumnData::scaDescPtr_p [private] |
Pointer to column description.
Definition at line 181 of file ScaRecordColData.h.