MSMBase.h

Classes

MSMBase -- Base class for memory-based table storage manager class (full description)

class MSMBase : public DataManager

Interface

Public Members
MSMBase()
MSMBase (const String& storageManagerName)
MSMBase (const String& storageManagerName, const Record&)
~MSMBase()
DataManager* clone() const
String dataManagerType() const
String dataManagerName() const
uInt nrow() const
Bool canAddRow() const
Bool canRemoveRow() const
Bool canAddColumn() const
Bool canRemoveColumn() const
static DataManager* makeObject (const String& dataManagerType, const Record& spec)
Private Members
virtual Bool flush (AipsIO&, Bool fsync)
virtual void create (uInt nrrow)
virtual void open (uInt nrrow, AipsIO&)
virtual void resync (uInt nrrow)
virtual void deleteManager()
void addRow (uInt nrrow)
void removeRow (uInt rownr)
DataManagerColumn* makeScalarColumn (const String& name, int dataType, const String& dataTypeID)
DataManagerColumn* makeDirArrColumn (const String& name, int dataType, const String& dataTypeID)
DataManagerColumn* makeIndArrColumn (const String& name, int dataType, const String& dataTypeID)
Bool canReallocateColumns() const
DataManagerColumn* reallocateColumn (DataManagerColumn* column)
void addColumn (DataManagerColumn*)
void removeColumn (DataManagerColumn*)

Description

Review Status

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

Prerequisite

Etymology

MSMBase is the base class for MemoryStMan.

Synopsis

See class MemoryStMan for the description.

Member Description

MSMBase()

Create a memory storage manager. Its name will be blank.

MSMBase (const String& storageManagerName)
MSMBase (const String& storageManagerName, const Record&)

Create a memory storage manager with the given name. Its name can be used later in e.g. Table::addColumn to add a column to this storage manager.
Note that the 2nd constructor is needed for table creation from a record specification.

~MSMBase()

DataManager* clone() const

Clone this object. It does not clone MSMColumn objects possibly used.

String dataManagerType() const

Get the type name of the data manager (i.e. MemoryStMan).

String dataManagerName() const

Get the name given to this storage manager.

uInt nrow() const

Get the nr of rows in this storage manager.

Bool canAddRow() const

Does the storage manager allow to add rows? (yes)

Bool canRemoveRow() const

Does the storage manager allow to delete rows? (yes)

Bool canAddColumn() const

Does the storage manager allow to add columns? (yes)

Bool canRemoveColumn() const

Does the storage manager allow to delete columns? (yes)

static DataManager* makeObject (const String& dataManagerType, const Record& spec)

Make the object from the string. This function gets registered in the DataManager "constructor" map.

virtual Bool flush (AipsIO&, Bool fsync)

Flush and optionally fsync the data. It does not done anything and always returns a False status.

virtual void create (uInt nrrow)

Let the storage manager create the nr of rows needed.

virtual void open (uInt nrrow, AipsIO&)

Open the storage manager file for an existing table. It fills the rows with 0 values.

virtual void resync (uInt nrrow)

Resync the storage manager with the new file contents. It adds or removes rows as needed. It cannot know which rows are deleted, so it always deletes the last rows.

virtual void deleteManager()

The data manager will be deleted (because all its columns are requested to be deleted). It does not have to do anything.

void addRow (uInt nrrow)

Add rows to all columns.

void removeRow (uInt rownr)

Delete a row from all columns.

DataManagerColumn* makeScalarColumn (const String& name, int dataType, const String& dataTypeID)

Create a column in the storage manager on behalf of a table column.

Create a scalar column.

DataManagerColumn* makeDirArrColumn (const String& name, int dataType, const String& dataTypeID)

Create a column in the storage manager on behalf of a table column.

Create a direct array column.

DataManagerColumn* makeIndArrColumn (const String& name, int dataType, const String& dataTypeID)

Create a column in the storage manager on behalf of a table column.

Create an indirect array column.

Bool canReallocateColumns() const

The MemoryStMan wants to do reallocateColumn.

DataManagerColumn* reallocateColumn (DataManagerColumn* column)

Reallocate the column object if it is part of this data manager. It returns a pointer to the new column object. It is used to replace an MSMIndColumn object for indirect array with a fixed shape by an MSMDirColumn object.

void addColumn (DataManagerColumn*)

Add a column.

void removeColumn (DataManagerColumn*)

Delete a column.