casa
$Rev:20696$
|
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 | |
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 |
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.
casa::PlainColumn::PlainColumn | ( | const BaseColumnDesc * | , |
ColumnSet * | |||
) |
virtual casa::PlainColumn::~PlainColumn | ( | ) | [virtual] |
void casa::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 191 of file PlainColumn.h.
References casa::ColumnSet::autoReleaseLock(), and colSetPtr_p.
virtual void casa::PlainColumn::bind | ( | DataManager * | ) | [virtual] |
Bind the column to a data manager.
void casa::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 187 of file PlainColumn.h.
References casa::ColumnSet::checkReadLock(), and colSetPtr_p.
void casa::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 184 of file PlainColumn.h.
void casa::PlainColumn::checkValueLength | ( | const String * | value | ) | const [protected] |
void casa::PlainColumn::checkValueLength | ( | const Array< String > * | value | ) | const [protected] |
void casa::PlainColumn::checkWriteLock | ( | Bool | wait | ) | const [inline, protected] |
Definition at line 189 of file PlainColumn.h.
References casa::ColumnSet::checkWriteLock(), and colSetPtr_p.
virtual ColumnCache& casa::PlainColumn::columnCache | ( | ) | [virtual] |
Get a pointer to the underlying column cache.
Implements casa::BaseColumn.
virtual void casa::PlainColumn::createDataManagerColumn | ( | ) | [pure virtual] |
Create a data manager column for a filled column.
Implemented in casa::ArrayColumnData< T >, casa::ScalarColumnData< T >, and casa::ScalarRecordColumnData.
DataManager * casa::PlainColumn::dataManager | ( | ) | const [inline] |
Get the pointer to the data manager.
Definition at line 179 of file PlainColumn.h.
References dataManPtr_p.
DataManagerColumn *& casa::PlainColumn::dataManagerColumn | ( | ) | [inline] |
Get the pointer to the data manager column.
Definition at line 181 of file PlainColumn.h.
References dataColPtr_p.
void casa::PlainColumn::getFile | ( | AipsIO & | , |
const ColumnSet & | , | ||
const TableAttr & | |||
) |
Read the column.
virtual void casa::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 casa::ArrayColumnData< T >, casa::ScalarColumnData< T >, and casa::ScalarRecordColumnData.
virtual Bool casa::PlainColumn::isBound | ( | ) | const [virtual] |
Test if the column is bound to a storage manager or virtual column engine.
virtual Bool casa::PlainColumn::isStored | ( | ) | const [virtual] |
Test if the column is stored (otherwise it is virtual).
Implements casa::BaseColumn.
virtual Bool casa::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 casa::BaseColumn.
TableRecord& casa::PlainColumn::keywordSet | ( | ) | [virtual] |
Implements casa::BaseColumn.
uInt casa::PlainColumn::nrow | ( | ) | const [virtual] |
Get nr of rows in the column.
Implements casa::BaseColumn.
void casa::PlainColumn::putFile | ( | AipsIO & | , |
const TableAttr & | |||
) |
Write the column.
virtual void casa::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 casa::ArrayColumnData< T >, casa::ScalarColumnData< T >, and casa::ScalarRecordColumnData.
TableRecord& casa::PlainColumn::rwKeywordSet | ( | ) | [virtual] |
Get access to the column keyword set.
Implements casa::BaseColumn.
virtual void casa::PlainColumn::setMaximumCacheSize | ( | uInt | nbytes | ) | [virtual] |
Set the maximum cache size (in bytes) to be used by a storage manager.
Implements casa::BaseColumn.
virtual void casa::PlainColumn::setShapeColumn | ( | const IPosition & | shape | ) | [virtual] |
Define the shape of all arrays in the column.
Reimplemented in casa::ArrayColumnData< T >.
ColumnSet* casa::PlainColumn::colSetPtr_p [protected] |
Definition at line 143 of file PlainColumn.h.
Referenced by autoReleaseLock(), checkReadLock(), and checkWriteLock().
DataManagerColumn* casa::PlainColumn::dataColPtr_p [protected] |
Definition at line 142 of file PlainColumn.h.
Referenced by dataManagerColumn().
DataManager* casa::PlainColumn::dataManPtr_p [protected] |
Definition at line 141 of file PlainColumn.h.
Referenced by dataManager().
String casa::PlainColumn::originalName_p [protected] |
Definition at line 144 of file PlainColumn.h.