Base class for memory-based table storage manager class. More...
#include <MSMBase.h>
Public Member Functions | |
MSMBase () | |
Create a memory storage manager. | |
MSMBase (const String &storageManagerName) | |
Create a memory storage manager with the given name. | |
MSMBase (const String &storageManagerName, const Record &) | |
~MSMBase () | |
DataManager * | clone () const |
Clone this object. | |
String | dataManagerType () const |
Get the type name of the data manager (i.e. | |
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 Public Member Functions | |
static DataManager * | makeObject (const String &dataManagerType, const Record &spec) |
Make the object from the string. | |
Private Member Functions | |
virtual Bool | flush (AipsIO &, Bool fsync) |
Flush and optionally fsync the data. | |
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. | |
virtual void | prepare () |
Let the data manager initialize itself further. | |
virtual void | resync (uInt nrrow) |
Resync the storage manager with the new file contents. | |
virtual void | deleteManager () |
The data manager will be deleted (because all its columns are requested to be deleted). | |
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. | |
DataManagerColumn * | makeDirArrColumn (const String &name, int dataType, const String &dataTypeID) |
Create a direct array column. | |
DataManagerColumn * | makeIndArrColumn (const String &name, int dataType, const String &dataTypeID) |
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. | |
void | addColumn (DataManagerColumn *) |
Add a column. | |
void | removeColumn (DataManagerColumn *) |
Delete a column. | |
Private Attributes | |
String | stmanName_p |
Name given by user to this storage manager. | |
uInt | nrrow_p |
The number of rows in the columns. | |
uInt | nrrowCreate_p |
The number of rows in create(). | |
PtrBlock< MSMColumn * > | colSet_p |
The assembly of all columns. |
Base class for memory-based table storage manager class.
Internal
MSMBase is the base class for MemoryStMan.
See class MemoryStMan for the description.
Definition at line 66 of file MSMBase.h.
casacore::MSMBase::MSMBase | ( | ) |
Create a memory storage manager.
Its name will be blank.
casacore::MSMBase::MSMBase | ( | const String & | storageManagerName | ) |
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.
casacore::MSMBase::~MSMBase | ( | ) |
void casacore::MSMBase::addColumn | ( | DataManagerColumn * | ) | [private, virtual] |
Add a column.
Reimplemented from casacore::DataManager.
void casacore::MSMBase::addRow | ( | uInt | nrrow | ) | [private, virtual] |
Add rows to all columns.
Reimplemented from casacore::DataManager.
Bool casacore::MSMBase::canAddColumn | ( | ) | const [virtual] |
Does the storage manager allow to add columns? (yes).
Reimplemented from casacore::DataManager.
Bool casacore::MSMBase::canAddRow | ( | ) | const [virtual] |
Does the storage manager allow to add rows? (yes).
Reimplemented from casacore::DataManager.
Bool casacore::MSMBase::canReallocateColumns | ( | ) | const [private, virtual] |
The MemoryStMan wants to do reallocateColumn.
Reimplemented from casacore::DataManager.
Bool casacore::MSMBase::canRemoveColumn | ( | ) | const [virtual] |
Does the storage manager allow to delete columns? (yes).
Reimplemented from casacore::DataManager.
Bool casacore::MSMBase::canRemoveRow | ( | ) | const [virtual] |
Does the storage manager allow to delete rows? (yes).
Reimplemented from casacore::DataManager.
DataManager* casacore::MSMBase::clone | ( | ) | const [virtual] |
Clone this object.
It does not clone MSMColumn objects possibly used.
Implements casacore::DataManager.
virtual void casacore::MSMBase::create | ( | uInt | nrrow | ) | [private, virtual] |
Let the storage manager create the nr of rows needed.
Implements casacore::DataManager.
String casacore::MSMBase::dataManagerName | ( | ) | const [virtual] |
Get the name given to this storage manager.
Reimplemented from casacore::DataManager.
String casacore::MSMBase::dataManagerType | ( | ) | const [virtual] |
virtual void casacore::MSMBase::deleteManager | ( | ) | [private, virtual] |
The data manager will be deleted (because all its columns are requested to be deleted).
It does not have to do anything.
Implements casacore::DataManager.
Flush and optionally fsync the data.
It does not done anything and always returns a False status.
Implements casacore::DataManager.
DataManagerColumn* casacore::MSMBase::makeDirArrColumn | ( | const String & | name, | |
int | dataType, | |||
const String & | dataTypeID | |||
) | [private, virtual] |
Create a direct array column.
Implements casacore::DataManager.
DataManagerColumn* casacore::MSMBase::makeIndArrColumn | ( | const String & | name, | |
int | dataType, | |||
const String & | dataTypeID | |||
) | [private, virtual] |
Create an indirect array column.
Implements casacore::DataManager.
static DataManager* casacore::MSMBase::makeObject | ( | const String & | dataManagerType, | |
const Record & | spec | |||
) | [static] |
Make the object from the string.
This function gets registered in the DataManager "constructor" map.
DataManagerColumn* casacore::MSMBase::makeScalarColumn | ( | const String & | name, | |
int | dataType, | |||
const String & | dataTypeID | |||
) | [private, virtual] |
Create a column in the storage manager on behalf of a table column.
Create a scalar column.
Implements casacore::DataManager.
uInt casacore::MSMBase::nrow | ( | ) | const [inline] |
Open the storage manager file for an existing table.
It fills the rows with 0 values.
Implements casacore::DataManager.
virtual void casacore::MSMBase::prepare | ( | ) | [private, virtual] |
Let the data manager initialize itself further.
It creates nr of rows (given to create) if needed. Note this is done after reallocateColumn.
Reimplemented from casacore::DataManager.
DataManagerColumn* casacore::MSMBase::reallocateColumn | ( | DataManagerColumn * | column | ) | [private, virtual] |
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.
Reimplemented from casacore::DataManager.
void casacore::MSMBase::removeColumn | ( | DataManagerColumn * | ) | [private, virtual] |
Delete a column.
Reimplemented from casacore::DataManager.
void casacore::MSMBase::removeRow | ( | uInt | rownr | ) | [private, virtual] |
Delete a row from all columns.
Reimplemented from casacore::DataManager.
virtual void casacore::MSMBase::resync | ( | uInt | nrrow | ) | [private, virtual] |
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.
Implements casacore::DataManager.
PtrBlock<MSMColumn*> casacore::MSMBase::colSet_p [private] |
uInt casacore::MSMBase::nrrow_p [private] |
uInt casacore::MSMBase::nrrowCreate_p [private] |
String casacore::MSMBase::stmanName_p [private] |