Base class for a column in a plain table. More...
#include <PlainColumn.h>
Public Member Functions | |
PlainColumn (const BaseColumnDesc *, ColumnSet *) | |
virtual | ~PlainColumn () |
virtual Bool | isWritable () const |
Test if the column is in principle writable. | |
virtual Bool | isStored () const |
Test if the column is stored (otherwise it is virtual). | |
TableRecord & | rwKeywordSet () |
Get access to the column keyword set. | |
TableRecord & | keywordSet () |
uInt | nrow () const |
Get nr of rows in the column. | |
virtual void | setShapeColumn (const IPosition &shape) |
Define the shape of all arrays in the column. | |
virtual Bool | isBound () const |
Test if the column is bound to a storage manager or virtual column engine. | |
virtual void | bind (DataManager *) |
Bind the column to a data manager. | |
virtual void | createDataManagerColumn ()=0 |
Create a data manager column for a filled column. | |
DataManager * | dataManager () const |
Get the pointer to the data manager. | |
DataManagerColumn *& | dataManagerColumn () |
Get the pointer to the data manager column. | |
virtual ColumnCache & | columnCache () |
Get a pointer to the underlying column cache. | |
virtual void | setMaximumCacheSize (uInt nbytes) |
Set the maximum cache size (in bytes) to be used by a storage manager. | |
void | putFile (AipsIO &, const TableAttr &) |
Write the column. | |
void | getFile (AipsIO &, const ColumnSet &, const TableAttr &) |
Read the column. | |
Protected Member Functions | |
int | traceId () const |
Get the trace-id of the table. | |
virtual void | putFileDerived (AipsIO &)=0 |
Write the column. | |
virtual void | getFileDerived (AipsIO &, const ColumnSet &)=0 |
Read the column back. | |
void | checkValueLength (const void *) const |
Check the length of a value. | |
void | checkValueLength (const String *value) const |
void | checkValueLength (const Array< String > *value) const |
void | checkReadLock (Bool wait) const |
Lock the table before reading or writing. | |
void | checkWriteLock (Bool wait) const |
void | autoReleaseLock () const |
Inspect the auto lock when the inspection interval has expired and release it when another process needs the lock. | |
Protected Attributes | |
DataManager * | dataManPtr_p |
DataManagerColumn * | dataColPtr_p |
ColumnSet * | colSetPtr_p |
String | originalName_p |
Bool | rtraceColumn_p |
Bool | wtraceColumn_p |
Base class for a column in a plain table.
Internal
PlainColumn represents any column in a plain table. A plain table is a regular table, i.e. not a table like a RefTable which is a view on a plain table.
Abstract base class for all types of columns in a plain table. It implements the common functionality for all columns in a plain table. Furthermore it defines some virtual functions (on top of the virtual functions defined in BaseColumn) which are specific for plain columns.
Definition at line 84 of file PlainColumn.h.
casacore::PlainColumn::PlainColumn | ( | const BaseColumnDesc * | , | |
ColumnSet * | ||||
) |
virtual casacore::PlainColumn::~PlainColumn | ( | ) | [virtual] |
void casacore::PlainColumn::autoReleaseLock | ( | ) | const [inline, protected] |
Inspect the auto lock when the inspection interval has expired and release it when another process needs the lock.
Definition at line 197 of file PlainColumn.h.
References casacore::ColumnSet::autoReleaseLock(), and colSetPtr_p.
virtual void casacore::PlainColumn::bind | ( | DataManager * | ) | [virtual] |
Bind the column to a data manager.
void casacore::PlainColumn::checkReadLock | ( | Bool | wait | ) | const [inline, protected] |
Lock the table before reading or writing.
If manual or permanent locking is in effect, it checks if the table is locked.
Definition at line 193 of file PlainColumn.h.
References casacore::ColumnSet::checkReadLock(), and colSetPtr_p.
void casacore::PlainColumn::checkValueLength | ( | const String * | value | ) | const [protected] |
void casacore::PlainColumn::checkValueLength | ( | const void * | ) | const [inline, protected] |
Check the length of a value.
This a meant for String values for which a maximum length is defined. The void* version is a no-op for other values.
Definition at line 190 of file PlainColumn.h.
void casacore::PlainColumn::checkWriteLock | ( | Bool | wait | ) | const [inline, protected] |
Definition at line 195 of file PlainColumn.h.
References casacore::ColumnSet::checkWriteLock(), and colSetPtr_p.
virtual ColumnCache& casacore::PlainColumn::columnCache | ( | ) | [virtual] |
Get a pointer to the underlying column cache.
Implements casacore::BaseColumn.
virtual void casacore::PlainColumn::createDataManagerColumn | ( | ) | [pure virtual] |
Create a data manager column for a filled column.
Implemented in casacore::ArrayColumnData< T >, casacore::ScalarColumnData< T >, and casacore::ScalarRecordColumnData.
DataManager * casacore::PlainColumn::dataManager | ( | ) | const [inline] |
Get the pointer to the data manager.
Definition at line 185 of file PlainColumn.h.
References dataManPtr_p.
DataManagerColumn *& casacore::PlainColumn::dataManagerColumn | ( | ) | [inline] |
Get the pointer to the data manager column.
Definition at line 187 of file PlainColumn.h.
References dataColPtr_p.
Read the column.
virtual void casacore::PlainColumn::getFileDerived | ( | AipsIO & | , | |
const ColumnSet & | ||||
) | [protected, pure virtual] |
Read the column back.
The control information is read from the given AipsIO object. This is used to bind the column to the appropriate data manager.
Implemented in casacore::ArrayColumnData< T >, casacore::ScalarColumnData< T >, and casacore::ScalarRecordColumnData.
virtual Bool casacore::PlainColumn::isBound | ( | ) | const [virtual] |
Test if the column is bound to a storage manager or virtual column engine.
virtual Bool casacore::PlainColumn::isStored | ( | ) | const [virtual] |
Test if the column is stored (otherwise it is virtual).
Implements casacore::BaseColumn.
virtual Bool casacore::PlainColumn::isWritable | ( | ) | const [virtual] |
Test if the column is in principle writable.
This does not test if the table itself is writable. That has to be done by the caller.
Implements casacore::BaseColumn.
TableRecord& casacore::PlainColumn::keywordSet | ( | ) | [virtual] |
Implements casacore::BaseColumn.
uInt casacore::PlainColumn::nrow | ( | ) | const [virtual] |
Get nr of rows in the column.
Implements casacore::BaseColumn.
virtual void casacore::PlainColumn::putFileDerived | ( | AipsIO & | ) | [protected, pure virtual] |
Write the column.
The control information is written into the given AipsIO object, while the data is written by the storage manager.
Implemented in casacore::ArrayColumnData< T >, casacore::ScalarColumnData< T >, and casacore::ScalarRecordColumnData.
TableRecord& casacore::PlainColumn::rwKeywordSet | ( | ) | [virtual] |
Get access to the column keyword set.
Implements casacore::BaseColumn.
virtual void casacore::PlainColumn::setMaximumCacheSize | ( | uInt | nbytes | ) | [virtual] |
Set the maximum cache size (in bytes) to be used by a storage manager.
Implements casacore::BaseColumn.
virtual void casacore::PlainColumn::setShapeColumn | ( | const IPosition & | shape | ) | [virtual] |
Define the shape of all arrays in the column.
Reimplemented in casacore::ArrayColumnData< T >.
int casacore::PlainColumn::traceId | ( | ) | const [inline, protected] |
Get the trace-id of the table.
Definition at line 149 of file PlainColumn.h.
References colSetPtr_p, and casacore::ColumnSet::traceId().
ColumnSet* casacore::PlainColumn::colSetPtr_p [protected] |
Definition at line 143 of file PlainColumn.h.
Referenced by autoReleaseLock(), checkReadLock(), checkWriteLock(), and traceId().
DataManagerColumn* casacore::PlainColumn::dataColPtr_p [protected] |
Definition at line 142 of file PlainColumn.h.
Referenced by dataManagerColumn().
DataManager* casacore::PlainColumn::dataManPtr_p [protected] |
Definition at line 141 of file PlainColumn.h.
Referenced by dataManager().
String casacore::PlainColumn::originalName_p [protected] |
Definition at line 144 of file PlainColumn.h.
Bool casacore::PlainColumn::rtraceColumn_p [protected] |
Definition at line 145 of file PlainColumn.h.
Bool casacore::PlainColumn::wtraceColumn_p [protected] |
Definition at line 146 of file PlainColumn.h.