casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Protected Attributes
casa::PlainColumn Class Reference

Base class for a column in a plain table. More...

#include <PlainColumn.h>

Inheritance diagram for casa::PlainColumn:
casa::BaseColumn casa::ArrayColumnData< T > casa::ScalarColumnData< T > casa::ScalarRecordColumnData

List of all members.

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).
TableRecordrwKeywordSet ()
 Get access to the column keyword set.
TableRecordkeywordSet ()
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.
DataManagerdataManager () const
 Get the pointer to the data manager.
DataManagerColumn *& dataManagerColumn ()
 Get the pointer to the data manager column.
virtual ColumnCachecolumnCache ()
 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

DataManagerdataManPtr_p
DataManagerColumndataColPtr_p
ColumnSetcolSetPtr_p
String originalName_p

Detailed Description

Base class for a column in a plain table.

Intended use:

Internal

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.

Definition at line 84 of file PlainColumn.h.


Constructor & Destructor Documentation

virtual casa::PlainColumn::~PlainColumn ( ) [virtual]

Member Function Documentation

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.

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.

Get the pointer to the data manager.

Definition at line 179 of file PlainColumn.h.

References dataManPtr_p.

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.

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.

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 >.


Member Data Documentation

Definition at line 143 of file PlainColumn.h.

Referenced by autoReleaseLock(), checkReadLock(), and checkWriteLock().

Definition at line 142 of file PlainColumn.h.

Referenced by dataManagerColumn().

Definition at line 141 of file PlainColumn.h.

Referenced by dataManager().

Definition at line 144 of file PlainColumn.h.


The documentation for this class was generated from the following file: