Loading...
Searching...
No Matches
casacore::ForwardColumnEngine Class Reference
tables package (libcasa_tables) » DataMan_module

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.
| ForwardColumnEngine (const Table &referencedTable, const String &dataManagerName)
| Create the engine.
| ForwardColumnEngine (const Table &referencedTable)
| Create the engine.
| ~ForwardColumnEngine ()
| Destructor is mandatory.
| ForwardColumnEngine (const ForwardColumnEngine &)=delete
| The copy constructor is forbidden.
ForwardColumnEngine & | operator= (const ForwardColumnEngine &)=delete
| Assignment is forbidden.
DataManager * | clone () const
| Clone the engine object.
String | dataManagerName () const
| Return the name of the data manager.
String | dataManagerType () const
| Return the type of the engine (i.e.
virtual Record | dataManagerSpec () const
| Record a record containing data manager specifications.
const String & | suffix () const
| Get the suffix to be used for names.
void | setRefTable (const Table &refTable)
| Set RefTable_p if not set yet.
Public Member Functions inherited from casacore::VirtualColumnEngine
| VirtualColumnEngine ()
| Create the object.
virtual | ~VirtualColumnEngine ()
| VirtualColumnEngine (const VirtualColumnEngine &)=delete
| The copy constructor cannot be used for this base class.
VirtualColumnEngine & | operator= (const VirtualColumnEngine &)=delete
| Assignment cannot be used for this base class.
Public Member Functions inherited from casacore::DataManager
| DataManager ()
| Default constructor.
virtual | ~DataManager ()
| DataManager (const DataManager &)=delete
| The copy constructor cannot be used for this base class.
DataManager & | operator= (const DataManager &)=delete
| Assignment cannot be used for this base class.
void | dataManagerInfo (Record &info) const
| Add SEQNR and SPEC (the DataManagerSpec subrecord) to the info.
virtual Record | getProperties () const
| Get data manager properties that can be modified.
virtual void | setProperties (const Record &spec)
| Modify data manager properties given in record fields.
virtual Bool | canReallocateColumns () const
| Tell if the data manager wants to reallocate the data manager column objects.
virtual DataManagerColumn * | reallocateColumn (DataManagerColumn *column)
| Reallocate the column object if it is part of this data manager.
uInt | sequenceNr () const
| Get the (unique) sequence nr of this data manager.
uInt | ncolumn () const
| Get the nr of columns in this data manager (can be zero).
Bool | asBigEndian () const
| Have the data to be stored in big or little endian canonical format?
const TSMOption & | tsmOption () const
| Get the TSM option.
std::shared_ptr< MultiFileBase > | multiFile ()
| Get the MultiFile pointer (can be 0).
String | keywordName (const String &keyword) const
| Compose a keyword name from the given keyword appended with the sequence number (e.g.
String | fileName () const
| Compose a unique filename from the table name and sequence number.
ByteIO::OpenOption | fileOption () const
| Get the AipsIO option of the underlying file.
virtual Bool | isRegular () const
| Is this a regular storage manager?
Table & | table () const
| Get the table this object is associated with.
virtual Bool | canRenameColumn () const
| Does the data manager allow to rename columns?
virtual void | setMaximumCacheSize (uInt nMiB)
| Set the maximum cache size (in bytes) to be used by a storage manager.
virtual void | showCacheStatistics (std::ostream &) const
| Show the data manager's IO statistics.
DataManagerColumn * | createScalarColumn (const String &columnName, int dataType, const String &dataTypeId)
| Create a column in the data manager on behalf of a table column.
DataManagerColumn * | createDirArrColumn (const String &columnName, int dataType, const String &dataTypeId)
| Create a direct array column.
DataManagerColumn * | createIndArrColumn (const String &columnName, int dataType, const String &dataTypeId)
| Create an indirect array column.
DataManager * | getClone () const
| Has the object already been cloned?
void | setClone (DataManager *clone) const
| Set the pointer to the clone.

## Static Public Member Functions

static String | className ()
| Return the name of the class.
static void | registerClass ()
| Register the class name and the static makeObject "constructor".
static DataManager * | makeObject (const String &dataManagerType, const Record &spec)
| Define the "constructor" to construct this engine when a table is read back.
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.
static DataManagerCtor | getCtor (const String &dataManagerType)
| Get the "constructor" of a data manager (thread-safe).
static Bool | isRegistered (const String &dataManagerType)
| Test if a data manager is registered (thread-safe).
static DataManager * | unknownDataManager (const String &dataManagerType, const Record &spec)
| Serve as default function for theirRegisterMap, which catches all unknown data manager types.

## Protected Member Functions

void | setSuffix (const String &suffix)
| Set the suffix.
void | addForwardColumn (ForwardColumn *colp)
| Add a ForwardColumn object to the block.
const Table & | refTable () const
| Get access to the refTable_p data member.
void | baseCreate ()
| Do the creation (i.e.
void | basePrepare ()
| Do the preparation of the engine by preparing all columns.
Protected Member Functions inherited from casacore::DataManager
void | decrementNcolumn ()
| Decrement number of columns (in case a column is deleted).
void | setEndian (Bool bigEndian)
| Tell the data manager if big or little endian format is needed.
void | setTsmOption (const TSMOption &tsmOption)
| Tell the data manager which TSM option to use.
void | setMultiFile (const std::shared_ptr< MultiFileBase > &mfile)
| Tell the data manager that MultiFile can be used.
virtual Bool | hasMultiFileSupport () const
| Does the data manager support use of MultiFile?
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.

## Private Member Functions

Bool | canAddRow () const
| This data manager allows to add rows.
Bool | canRemoveRow () const
| This data manager allows to delete rows.
void | addRow64 (rownr_t nrrow)
| Add rows to all columns.
void | removeRow64 (rownr_t rownr)
| Delete a row from all columns.
Bool | canAddColumn () const
| This data manager allows to add columns.
Bool | canRemoveColumn () const
| This data manager allows to delete columns.
void | addColumn (DataManagerColumn *)
| Add a column.
void | removeColumn (DataManagerColumn *)
| Delete a column.
DataManagerColumn * | makeScalarColumn (const String &columnName, int dataType, const String &dataTypeId)
| Create the column object for the scalar column in this engine.
DataManagerColumn * | makeIndArrColumn (const String &columnName, int dataType, const String &dataTypeId)
| Create the column object for the indirect array column in this engine.
void | create64 (rownr_t initialNrrow)
| Initialize the object for a new table.
void | prepare ()
| Initialize the engine.
void | reopenRW ()
| Reopen the engine for read/write access.

## Private Attributes

Block< ForwardColumn * > | refColumns_p
| Define the various engine column objects.
Table | refTable_p
| The referenced table.
String | dataManName_p
| The name of the data manager.
String | suffix_p
| The suffix to be used in names.

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

## Detailed Description

Virtual column engine forwarding to other columns.

### Review Status

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

### Intended use:

Public interface

### Prerequisite

- VirtualColumnEngine

### Synopsis

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.

### Motivation

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.

### Example

// The original table.
Table tab("someTable");
// Create another table with the same description.
SetupNewTable newtab("tForwardCol1.data", tab.tableDesc(), Table::New);
// Create an engine which forwards to the original table.
// Bind all columns in the new table to the forwarding engine.
ForwardColumnEngine fce(tab);
newtab.bindAll (fce);
// Create the new table.
// Every get and put on this table is forwarded to the original table.
// NB. Puts cannot be done here, because the original table was
// opened as readonly.
// Of course, some columns could have been bound to another
// data manager (storage manager, calibration engine,...).
Table forwTab(newtab);
casacore::ForwardColumnEngine::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::SetupNewTable
Create a new table - define shapes, data managers, etc.
Definition SetupNewTab.h:337
casacore::Table
Definition Table.h:157
casacore::Table::New
@ New
create table
Definition Table.h:175

Definition at line 401 of file ForwardCol.h.

## Constructor & Destructor Documentation

## ForwardColumnEngine() [1/4]

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.

References dataManagerName(), and casacore::Record().

Referenced by ForwardColumnEngine(), and operator=().

## ForwardColumnEngine() [2/4]

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.

References dataManagerName().

## ForwardColumnEngine() [3/4]

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.

## ~ForwardColumnEngine()

casacore::ForwardColumnEngine::~ForwardColumnEngine | ( |  | ) |

Destructor is mandatory.

## ForwardColumnEngine() [4/4]

casacore::ForwardColumnEngine::ForwardColumnEngine | ( | const ForwardColumnEngine & |  | ) |

delete

The copy constructor is forbidden.

References ForwardColumnEngine().

## Member Function Documentation

## addColumn()

void casacore::ForwardColumnEngine::addColumn | ( | DataManagerColumn * |  | ) |

private virtual

Add a column.

Reimplemented from casacore::DataManager.

## addForwardColumn()

void casacore::ForwardColumnEngine::addForwardColumn | ( | ForwardColumn * | colp | ) |

protected

Add a ForwardColumn object to the block.

## addRow64()

void casacore::ForwardColumnEngine::addRow64 | ( | rownr_t | nrrow | ) |

private virtual

Add rows to all columns.

This is not doing anything (but needed to override the default).

Reimplemented from casacore::VirtualColumnEngine.

## baseCreate()

void casacore::ForwardColumnEngine::baseCreate | ( |  | ) |

protected

Do the creation (i.e.

initialization) of the engine.

## basePrepare()

void casacore::ForwardColumnEngine::basePrepare | ( |  | ) |

protected

Do the preparation of the engine by preparing all columns.

## canAddColumn()

Bool casacore::ForwardColumnEngine::canAddColumn | ( |  | ) | const

private virtual

This data manager allows to add columns.

Reimplemented from casacore::DataManager.

## canAddRow()

Bool casacore::ForwardColumnEngine::canAddRow | ( |  | ) | const

private virtual

This data manager allows to add rows.

Reimplemented from casacore::VirtualColumnEngine.

## canRemoveColumn()

Bool casacore::ForwardColumnEngine::canRemoveColumn | ( |  | ) | const

private virtual

This data manager allows to delete columns.

Reimplemented from casacore::DataManager.

## canRemoveRow()

Bool casacore::ForwardColumnEngine::canRemoveRow | ( |  | ) | const

private virtual

This data manager allows to delete rows.

Reimplemented from casacore::VirtualColumnEngine.

## className()

String casacore::ForwardColumnEngine::className | ( |  | ) |

static

Return the name of the class.

## clone()

DataManager * casacore::ForwardColumnEngine::clone | ( |  | ) | const

virtual

Clone the engine object.

Implements casacore::DataManager.

Reimplemented in casacore::ForwardColumnIndexedRowEngine.

## create64()

void casacore::ForwardColumnEngine::create64 | ( | rownr_t | initialNrrow | ) |

private virtual

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.

## dataManagerName()

String casacore::ForwardColumnEngine::dataManagerName | ( |  | ) | const

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.

Referenced by ForwardColumnEngine(), ForwardColumnEngine(), casacore::ForwardColumnIndexedRowEngine::ForwardColumnIndexedRowEngine(), casacore::ForwardColumnIndexedRowEngine::ForwardColumnIndexedRowEngine(), and casacore::ForwardColumnIndexedRowEngine::makeObject().

## dataManagerSpec()

virtual Record casacore::ForwardColumnEngine::dataManagerSpec | ( |  | ) | const

virtual

Record a record containing data manager specifications.

Reimplemented from casacore::DataManager.

Reimplemented in casacore::ForwardColumnIndexedRowEngine.

References casacore::Record().

## dataManagerType()

String casacore::ForwardColumnEngine::dataManagerType | ( |  | ) | const

virtual

Return the type of the engine (i.e.

its class name ForwardColumnEngine).

Implements casacore::DataManager.

Reimplemented in casacore::ForwardColumnIndexedRowEngine.

Referenced by makeObject().

## makeIndArrColumn()

DataManagerColumn * casacore::ForwardColumnEngine::makeIndArrColumn | ( | const String & | columnName,
|  | int | dataType,
|  | const String & | dataTypeId )

private virtual

Create the column object for the indirect array column in this engine.

Reimplemented from casacore::VirtualColumnEngine.

Reimplemented in casacore::ForwardColumnIndexedRowEngine.

References casacore::dataType().

## makeObject()

DataManager * casacore::ForwardColumnEngine::makeObject | ( | const String & | dataManagerType,
|  | const Record & | spec )

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.

References dataManagerType(), and casacore::Record().

## makeScalarColumn()

DataManagerColumn * casacore::ForwardColumnEngine::makeScalarColumn | ( | const String & | columnName,
|  | int | dataType,
|  | const String & | dataTypeId )

private virtual

Create the column object for the scalar column in this engine.

Reimplemented from casacore::VirtualColumnEngine.

Reimplemented in casacore::ForwardColumnIndexedRowEngine.

References casacore::dataType().

## operator=()

ForwardColumnEngine & casacore::ForwardColumnEngine::operator= | ( | const ForwardColumnEngine & |  | ) |

delete

Assignment is forbidden.

References ForwardColumnEngine().

## prepare()

void casacore::ForwardColumnEngine::prepare | ( |  | ) |

private virtual

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.

## refTable()

const Table & casacore::ForwardColumnEngine::refTable | ( |  | ) | const

inline protected

Get access to the refTable_p data member.

Definition at line 460 of file ForwardCol.h.

References refTable_p.

Referenced by setRefTable().

## registerClass()

void casacore::ForwardColumnEngine::registerClass | ( |  | ) |

static

Register the class name and the static makeObject "constructor".

This will make the engine known to the table system.

References suffix().

## removeColumn()

void casacore::ForwardColumnEngine::removeColumn | ( | DataManagerColumn * |  | ) |

private virtual

Delete a column.

Reimplemented from casacore::DataManager.

## removeRow64()

void casacore::ForwardColumnEngine::removeRow64 | ( | rownr_t | rownr | ) |

private virtual

Delete a row from all columns.

This is not doing anything (but needed to override the default).

Reimplemented from casacore::VirtualColumnEngine.

## reopenRW()

void casacore::ForwardColumnEngine::reopenRW | ( |  | ) |

private virtual

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.

## setRefTable()

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.

References refTable().

## setSuffix()

void casacore::ForwardColumnEngine::setSuffix | ( | const String & | suffix | ) |

inline protected

Set the suffix.

Definition at line 557 of file ForwardCol.h.

References suffix(), and suffix_p.

## suffix()

const String & casacore::ForwardColumnEngine::suffix | ( |  | ) | const

inline

Get the suffix to be used for names.

Definition at line 554 of file ForwardCol.h.

References suffix_p.

Referenced by registerClass(), and setSuffix().

## Member Data Documentation

## dataManName_p

String casacore::ForwardColumnEngine::dataManName_p

private

The name of the data manager.

Definition at line 530 of file ForwardCol.h.

## refColumns_p

Block<ForwardColumn*> casacore::ForwardColumnEngine::refColumns_p

private

Define the various engine column objects.

Definition at line 523 of file ForwardCol.h.

## refTable_p

Table casacore::ForwardColumnEngine::refTable_p

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 528 of file ForwardCol.h.

Referenced by refTable().

## suffix_p

String casacore::ForwardColumnEngine::suffix_p

private

The suffix to be used in names.

Definition at line 532 of file ForwardCol.h.

Referenced by setSuffix(), and suffix().

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

- tables/DataMan/ForwardCol.h