PlainColumn.h

Classes

PlainColumn -- Base class for a column in a plain table (full description)

class PlainColumn : public BaseColumn

Interface

Public Members
PlainColumn (const BaseColumnDesc*, ColumnSet*)
virtual ~PlainColumn()
virtual Bool isWritable() const
virtual Bool isStored() const
TableRecord& rwKeywordSet()
TableRecord& keywordSet()
uInt nrow() const
virtual void setShapeColumn (const IPosition& shape)
virtual Bool isBound() const
virtual void bind (DataManager*)
virtual void createDataManagerColumn() = 0
DataManager* dataManager() const
DataManagerColumn*& dataManagerColumn()
virtual ColumnCache& columnCache()
virtual void setMaximumCacheSize (uInt nbytes)
void putFile (AipsIO&, const TableAttr&)
void getFile (AipsIO&, const ColumnSet&, const TableAttr&)
Protected Members
virtual void putFileDerived (AipsIO&) = 0
virtual void getFileDerived (AipsIO&, const ColumnSet&) = 0
void checkValueLength (const void*) const
void checkValueLength (const String* value) const
void checkValueLength (const Array<String>* value) const
void checkReadLock (Bool wait) const
void checkWriteLock (Bool wait) const
void autoReleaseLock() const

Description

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Prerequisite

Etymology

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.

Synopsis

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.

To Do

Member Description

PlainColumn (const BaseColumnDesc*, ColumnSet*)

virtual ~PlainColumn()

virtual Bool isWritable() const

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.

virtual Bool isStored() const

Test if the column is stored (otherwise it is virtual).

TableRecord& rwKeywordSet()
TableRecord& keywordSet()

Get access to the column keyword set.

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.

virtual void putFileDerived (AipsIO&) = 0

Write the column. The control information is written into the given AipsIO object, while the data is written by the storage manager.

virtual void getFileDerived (AipsIO&, const ColumnSet&) = 0

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.

void checkValueLength (const void*) const
void checkValueLength (const String* value) const
void checkValueLength (const Array<String>* value) const

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.

void checkReadLock (Bool wait) const
void checkWriteLock (Bool wait) const

Lock the table before reading or writing. If manual or permanent locking is in effect, it checks if the table is locked.

void autoReleaseLock() const

Inspect the auto lock when the inspection interval has expired and release it when another process needs the lock.