casacore
|
Virtual column engine forwarding to other columns. More...
#include <ForwardCol.h>
Public Member Functions | |
ForwardColumnEngine (const String &dataManagerName, const Record &spec) | |
The default constructor is required for reconstruction of the engine when a table is read back. More... | |
ForwardColumnEngine (const Table &referencedTable, const String &dataManagerName) | |
Create the engine. More... | |
ForwardColumnEngine (const Table &referencedTable) | |
Create the engine. More... | |
~ForwardColumnEngine () | |
Destructor is mandatory. More... | |
DataManager * | clone () const |
Clone the engine object. More... | |
String | dataManagerName () const |
Return the name of the data manager. More... | |
String | dataManagerType () const |
Return the type of the engine (i.e. More... | |
virtual Record | dataManagerSpec () const |
Record a record containing data manager specifications. More... | |
const String & | suffix () const |
Get the suffix to be used for names. More... | |
void | setRefTable (const Table &refTable) |
Set RefTable_p if not set yet. More... | |
Public Member Functions inherited from casacore::VirtualColumnEngine | |
VirtualColumnEngine () | |
Create the object. More... | |
virtual | ~VirtualColumnEngine () |
Public Member Functions inherited from casacore::DataManager | |
DataManager () | |
Default constructor. More... | |
virtual | ~DataManager () |
void | dataManagerInfo (Record &info) const |
Add SEQNR and SPEC (the DataManagerSpec subrecord) to the info. More... | |
virtual Record | getProperties () const |
Get data manager properties that can be modified. More... | |
virtual void | setProperties (const Record &spec) |
Modify data manager properties given in record fields. More... | |
virtual Bool | canReallocateColumns () const |
Tell if the data manager wants to reallocate the data manager column objects. More... | |
virtual DataManagerColumn * | reallocateColumn (DataManagerColumn *column) |
Reallocate the column object if it is part of this data manager. More... | |
uInt | sequenceNr () const |
Get the (unique) sequence nr of this data manager. More... | |
uInt | ncolumn () const |
Get the nr of columns in this data manager (can be zero). More... | |
Bool | asBigEndian () const |
Have the data to be stored in big or little endian canonical format? More... | |
const TSMOption & | tsmOption () const |
Get the TSM option. More... | |
MultiFileBase * | multiFile () |
Get the MultiFile pointer (can be 0). More... | |
String | keywordName (const String &keyword) const |
Compose a keyword name from the given keyword appended with the sequence number (e.g. More... | |
String | fileName () const |
Compose a unique filename from the table name and sequence number. More... | |
ByteIO::OpenOption | fileOption () const |
Get the AipsIO option of the underlying file. More... | |
virtual Bool | isRegular () const |
Is this a regular storage manager? It is regular if it allows addition of rows and writing data in them. More... | |
Table & | table () const |
Get the table this object is associated with. More... | |
virtual Bool | canRenameColumn () const |
Does the data manager allow to rename columns? (default yes) More... | |
virtual void | setMaximumCacheSize (uInt nMiB) |
Set the maximum cache size (in bytes) to be used by a storage manager. More... | |
virtual void | showCacheStatistics (std::ostream &) const |
Show the data manager's IO statistics. More... | |
DataManagerColumn * | createScalarColumn (const String &columnName, int dataType, const String &dataTypeId) |
Create a column in the data manager on behalf of a table column. More... | |
DataManagerColumn * | createDirArrColumn (const String &columnName, int dataType, const String &dataTypeId) |
Create a direct array column. More... | |
DataManagerColumn * | createIndArrColumn (const String &columnName, int dataType, const String &dataTypeId) |
Create an indirect array column. More... | |
DataManager * | getClone () const |
Has the object already been cloned? More... | |
void | setClone (DataManager *clone) const |
Set the pointer to the clone. More... | |
Static Public Member Functions | |
static String | className () |
Return the name of the class. More... | |
static void | registerClass () |
Register the class name and the static makeObject "constructor". More... | |
static DataManager * | makeObject (const String &dataManagerType, const Record &spec) |
Define the "constructor" to construct this engine when a table is read back. More... | |
Static Public Member Functions inherited from casacore::DataManager | |
static void | registerCtor (const String &type, DataManagerCtor func) |
Register a mapping of a data manager type to its static construction function. More... | |
static DataManagerCtor | getCtor (const String &dataManagerType) |
Get the "constructor" of a data manager (thread-safe). More... | |
static Bool | isRegistered (const String &dataManagerType) |
Test if a data manager is registered (thread-safe). More... | |
static DataManager * | unknownDataManager (const String &dataManagerType, const Record &spec) |
Serve as default function for theirRegisterMap, which catches all unknown data manager types. More... | |
Protected Member Functions | |
void | setSuffix (const String &suffix) |
Set the suffix. More... | |
void | addForwardColumn (ForwardColumn *colp) |
Add a ForwardColumn object to the block. More... | |
const Table & | refTable () const |
Get access to the refTable_p data member. More... | |
void | baseCreate () |
Do the creation (i.e. More... | |
void | basePrepare () |
Do the preparation of the engine by preparing all columns. More... | |
Protected Member Functions inherited from casacore::DataManager | |
void | decrementNcolumn () |
Decrement number of columns (in case a column is deleted). More... | |
void | setEndian (Bool bigEndian) |
Tell the data manager if big or little endian format is needed. More... | |
void | setTsmOption (const TSMOption &tsmOption) |
Tell the data manager which TSM option to use. More... | |
void | setMultiFile (MultiFileBase *mfile) |
Tell the data manager that MultiFile can be used. More... | |
virtual Bool | hasMultiFileSupport () const |
Does the data manager support use of MultiFile? A derived class has to return True if it can use the MultiFile. More... | |
void | throwDataTypeOther (const String &columnName, int dataType) const |
Throw an exception in case data type is TpOther, because the storage managers (and maybe other data managers) do not support such columns. More... | |
Private Member Functions | |
ForwardColumnEngine (const ForwardColumnEngine &) | |
The copy constructor is forbidden (so it is private). More... | |
ForwardColumnEngine & | operator= (const ForwardColumnEngine &) |
Assignment is forbidden (so it is private). More... | |
Bool | canAddRow () const |
This data manager allows to add rows. More... | |
Bool | canRemoveRow () const |
This data manager allows to delete rows. More... | |
void | addRow64 (rownr_t nrrow) |
Add rows to all columns. More... | |
void | removeRow64 (rownr_t rownr) |
Delete a row from all columns. More... | |
Bool | canAddColumn () const |
This data manager allows to add columns. More... | |
Bool | canRemoveColumn () const |
This data manager allows to delete columns. More... | |
void | addColumn (DataManagerColumn *) |
Add a column. More... | |
void | removeColumn (DataManagerColumn *) |
Delete a column. More... | |
DataManagerColumn * | makeScalarColumn (const String &columnName, int dataType, const String &dataTypeId) |
Create the column object for the scalar column in this engine. More... | |
DataManagerColumn * | makeIndArrColumn (const String &columnName, int dataType, const String &dataTypeId) |
Create the column object for the indirect array column in this engine. More... | |
void | create64 (rownr_t initialNrrow) |
Initialize the object for a new table. More... | |
void | prepare () |
Initialize the engine. More... | |
void | reopenRW () |
Reopen the engine for read/write access. More... | |
Private Attributes | |
PtrBlock< ForwardColumn * > | refColumns_p |
Define the various engine column objects. More... | |
Table | refTable_p |
The referenced table. More... | |
String | dataManName_p |
The name of the data manager. More... | |
String | suffix_p |
The suffix to be used in names. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from casacore::DataManager | |
static rownr_t | MAXROWNR32 |
Define the highest row number that can be represented as signed 32-bit. More... | |
Virtual column engine forwarding to other columns.
Public interface
ForwardColumnEngine is a data manager which forwards the gets and puts of columns to columns with the same names in another table. It is, in fact, a reference to the other table columns. The engine consists of a set of ForwardColumn objects, which handle the actual gets and puts.
This class will be used by the calibration software. Most columns in a measurement table will be forwarded (thus bound to a ForwardColumnEngine object), while a few (i.e. the data themselves) will be calculated by a dedicated calibration engine.
Definition at line 404 of file ForwardCol.h.
casacore::ForwardColumnEngine::ForwardColumnEngine | ( | const String & | dataManagerName, |
const Record & | spec | ||
) |
The default constructor is required for reconstruction of the engine when a table is read back.
casacore::ForwardColumnEngine::ForwardColumnEngine | ( | const Table & | referencedTable, |
const String & | dataManagerName | ||
) |
Create the engine.
The columns using this engine will reference the given table. The data manager gets the given name.
casacore::ForwardColumnEngine::ForwardColumnEngine | ( | const Table & | referencedTable | ) |
Create the engine.
The columns using this engine will reference the given table. The data manager has no name.
casacore::ForwardColumnEngine::~ForwardColumnEngine | ( | ) |
Destructor is mandatory.
|
private |
The copy constructor is forbidden (so it is private).
|
privatevirtual |
Add a column.
Reimplemented from casacore::DataManager.
|
protected |
Add a ForwardColumn object to the block.
|
privatevirtual |
Add rows to all columns.
This is not doing anything (but needed to override the default).
Reimplemented from casacore::VirtualColumnEngine.
|
protected |
Do the creation (i.e.
initialization) of the engine.
|
protected |
Do the preparation of the engine by preparing all columns.
|
privatevirtual |
This data manager allows to add columns.
Reimplemented from casacore::DataManager.
|
privatevirtual |
This data manager allows to add rows.
Reimplemented from casacore::VirtualColumnEngine.
|
privatevirtual |
This data manager allows to delete columns.
Reimplemented from casacore::DataManager.
|
privatevirtual |
This data manager allows to delete rows.
Reimplemented from casacore::VirtualColumnEngine.
|
static |
Return the name of the class.
|
virtual |
Clone the engine object.
Implements casacore::DataManager.
Reimplemented in casacore::ForwardColumnIndexedRowEngine.
|
privatevirtual |
Initialize the object for a new table.
It defines the column keywords containing the name of the original table, which can be the parent of the referenced table.
Reimplemented from casacore::VirtualColumnEngine.
Reimplemented in casacore::ForwardColumnIndexedRowEngine.
|
virtual |
Return the name of the data manager.
This is the name of this instantiation of the data manager, thus not its type name.
Reimplemented from casacore::DataManager.
|
virtual |
Record a record containing data manager specifications.
Reimplemented from casacore::DataManager.
Reimplemented in casacore::ForwardColumnIndexedRowEngine.
|
virtual |
Return the type of the engine (i.e.
its class name ForwardColumnEngine).
Implements casacore::DataManager.
Reimplemented in casacore::ForwardColumnIndexedRowEngine.
|
privatevirtual |
Create the column object for the indirect array column in this engine.
Reimplemented from casacore::VirtualColumnEngine.
Reimplemented in casacore::ForwardColumnIndexedRowEngine.
|
static |
Define the "constructor" to construct this engine when a table is read back.
This "constructor" has to be registered by the user of the engine. If the engine is commonly used, its registration can be added into the registerAllCtor function in DataManReg.cc. This function gets automatically invoked by the table system.
|
privatevirtual |
Create the column object for the scalar column in this engine.
Reimplemented from casacore::VirtualColumnEngine.
Reimplemented in casacore::ForwardColumnIndexedRowEngine.
|
private |
Assignment is forbidden (so it is private).
|
privatevirtual |
Initialize the engine.
It gets the name of the original table(s) from the column keywords, opens those tables and attaches the ForwardColumn objects to the columns in those tables.
Reimplemented from casacore::VirtualColumnEngine.
Reimplemented in casacore::ForwardColumnIndexedRowEngine.
|
inlineprotected |
Get access to the refTable_p data member.
Definition at line 457 of file ForwardCol.h.
References refTable_p.
|
static |
Register the class name and the static makeObject "constructor".
This will make the engine known to the table system.
|
privatevirtual |
Delete a column.
Reimplemented from casacore::DataManager.
|
privatevirtual |
Delete a row from all columns.
This is not doing anything (but needed to override the default).
Reimplemented from casacore::VirtualColumnEngine.
|
privatevirtual |
Reopen the engine for read/write access.
It makes all its columns writable if their underlying table is writable.
Reimplemented from casacore::DataManager.
Reimplemented in casacore::ForwardColumnIndexedRowEngine.
void casacore::ForwardColumnEngine::setRefTable | ( | const Table & | refTable | ) |
Set RefTable_p if not set yet.
This is done by ForwardColumn to cover the case for existing tables where the default constructor of ForwardColumnEngine is used and refTable_p is not filled in.
|
inlineprotected |
|
inline |
Get the suffix to be used for names.
Definition at line 557 of file ForwardCol.h.
References suffix_p.
Referenced by setSuffix().
|
private |
The name of the data manager.
Definition at line 533 of file ForwardCol.h.
|
private |
Define the various engine column objects.
Definition at line 526 of file ForwardCol.h.
|
private |
The referenced table.
For newly created tables this is filled in by the constructor. For existing tables this is filled in by the first ForwardColumn object being constructed.
Definition at line 531 of file ForwardCol.h.
Referenced by refTable().
|
private |
The suffix to be used in names.
Definition at line 535 of file ForwardCol.h.
Referenced by setSuffix(), and suffix().