casa::PlainColumn Class Reference
[Tables_internal_classes]

#include <PlainColumn.h>

Inheritance diagram for casa::PlainColumn:

Inheritance graph
[legend]
Collaboration diagram for casa::PlainColumn:

Collaboration graph
[legend]
List of all members.

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.

To Do

Definition at line 84 of file 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).
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.
TableRecordrwKeywordSet ()
 Get access to the column keyword set.
TableRecordkeywordSet ()

Protected Member Functions

virtual void putFileDerived (AipsIO &)=0
 Write the column.
virtual void getFileDerived (AipsIO &, const ColumnSet &)=0
 Read the column back.
void autoReleaseLock () const
 Inspect the auto lock when the inspection interval has expired and release it when another process needs the lock.
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

Protected Attributes

DataManagerdataManPtr_p
DataManagerColumndataColPtr_p
ColumnSetcolSetPtr_p
String originalName_p


Constructor & Destructor Documentation

casa::PlainColumn::PlainColumn ( const BaseColumnDesc ,
ColumnSet  
)

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


Member Function Documentation

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.

virtual Bool casa::PlainColumn::isStored (  )  const [virtual]

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

Implements casa::BaseColumn.

TableRecord& casa::PlainColumn::rwKeywordSet (  )  [virtual]

Get access to the column keyword set.

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.

virtual void casa::PlainColumn::setShapeColumn ( const IPosition shape  )  [virtual]

Define the shape of all arrays in the column.

virtual Bool casa::PlainColumn::isBound (  )  const [virtual]

Test if the column is bound to a storage manager or virtual column engine.

virtual void casa::PlainColumn::bind ( DataManager  )  [virtual]

Bind the column to a data manager.

virtual void casa::PlainColumn::createDataManagerColumn (  )  [pure virtual]

Create a data manager column for a filled column.

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.

virtual ColumnCache& casa::PlainColumn::columnCache (  )  [virtual]

Get a pointer to the underlying column cache.

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.

void casa::PlainColumn::putFile ( AipsIO ,
const TableAttr  
)

Write the column.

void casa::PlainColumn::getFile ( AipsIO ,
const ColumnSet ,
const TableAttr  
)

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

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.

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::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::checkWriteLock ( Bool  wait  )  const [inline, protected]

Definition at line 189 of file PlainColumn.h.

References casa::ColumnSet::checkWriteLock(), and colSetPtr_p.

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.


Member Data Documentation

DataManager* casa::PlainColumn::dataManPtr_p [protected]

Definition at line 141 of file PlainColumn.h.

Referenced by dataManager().

DataManagerColumn* casa::PlainColumn::dataColPtr_p [protected]

Definition at line 142 of file PlainColumn.h.

Referenced by dataManagerColumn().

ColumnSet* casa::PlainColumn::colSetPtr_p [protected]

Definition at line 143 of file PlainColumn.h.

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

String casa::PlainColumn::originalName_p [protected]

Definition at line 144 of file PlainColumn.h.


The documentation for this class was generated from the following file:
Generated on Mon Sep 1 22:45:32 2008 for NRAOCASA by  doxygen 1.5.1