Virtual column forwarding to another row/column. More...
#include <ForwardColRow.h>
Public Member Functions | |
ForwardColumnIndexedRow (ForwardColumnIndexedRowEngine *enginePtr, const String &columnName, int dataType, const String &dataTypeId, const Table &referencedTable) | |
Construct it for the given column. | |
~ForwardColumnIndexedRow () | |
Destructor is mandatory. | |
void | prepare (const Table &thisTable) |
Initialize the object. | |
Private Member Functions | |
ForwardColumnIndexedRow (const ForwardColumnIndexedRow &) | |
Copy constructor is not needed and therefore forbidden (so make it private). | |
ForwardColumnIndexedRow & | operator= (const ForwardColumnIndexedRow &) |
Assignment is not needed and therefore forbidden (so make it private). | |
Bool | canChangeShape () const |
This data manager cannot handle changing array shapes. | |
Bool | canAccessScalarColumn (Bool &reask) const |
This data manager cannot do get/putColumn. | |
Bool | canAccessArrayColumn (Bool &reask) const |
This data manager cannot do get/putColumn. | |
Bool | canAccessColumnSlice (Bool &reask) const |
This data manager cannot do get/putColumn. | |
void | setShape (uInt rownr, const IPosition &shape) |
Set the shape of an (indirect) array in the given row. | |
Bool | isShapeDefined (uInt rownr) |
Is the value shape defined in the given row? | |
uInt | ndim (uInt rownr) |
Get the dimensionality of the item in the given row. | |
IPosition | shape (uInt rownr) |
Get the shape of the item in the given row. | |
void | getBoolV (uInt rownr, Bool *dataPtr) |
Get the scalar value with a standard data type in the given row. | |
void | getuCharV (uInt rownr, uChar *dataPtr) |
void | getShortV (uInt rownr, Short *dataPtr) |
void | getuShortV (uInt rownr, uShort *dataPtr) |
void | getIntV (uInt rownr, Int *dataPtr) |
void | getuIntV (uInt rownr, uInt *dataPtr) |
void | getfloatV (uInt rownr, float *dataPtr) |
void | getdoubleV (uInt rownr, double *dataPtr) |
void | getComplexV (uInt rownr, Complex *dataPtr) |
void | getDComplexV (uInt rownr, DComplex *dataPtr) |
void | getStringV (uInt rownr, String *dataPtr) |
void | getOtherV (uInt rownr, void *dataPtr) |
Get the scalar value with a non-standard data type in the given row. | |
void | putBoolV (uInt rownr, const Bool *dataPtr) |
Put the scalar value with a standard data type into the given row. | |
void | putuCharV (uInt rownr, const uChar *dataPtr) |
void | putShortV (uInt rownr, const Short *dataPtr) |
void | putuShortV (uInt rownr, const uShort *dataPtr) |
void | putIntV (uInt rownr, const Int *dataPtr) |
void | putuIntV (uInt rownr, const uInt *dataPtr) |
void | putfloatV (uInt rownr, const float *dataPtr) |
void | putdoubleV (uInt rownr, const double *dataPtr) |
void | putComplexV (uInt rownr, const Complex *dataPtr) |
void | putDComplexV (uInt rownr, const DComplex *dataPtr) |
void | putStringV (uInt rownr, const String *dataPtr) |
void | putOtherV (uInt rownr, const void *dataPtr) |
Put the scalar value with a non-standard data type into the given row. | |
void | getArrayV (uInt rownr, void *dataPtr) |
Get the array value in the given row. | |
void | putArrayV (uInt rownr, const void *dataPtr) |
Put the array value into the given row. | |
void | getSliceV (uInt rownr, const Slicer &slicer, void *dataPtr) |
Get a section of the array in the given row. | |
void | putSliceV (uInt rownr, const Slicer &slicer, const void *dataPtr) |
Put into a section of the array in the given row. | |
uInt | convertRownr (uInt rownr) |
Convert the rownr to the rownr in the underlying table. | |
Private Attributes | |
ForwardColumnIndexedRowEngine * | enginePtr_p |
Virtual column forwarding to another row/column.
Internal
ForwardColumnIndexedRow handles the forwarding of the gets and puts for an individual row/column on behalf of the virtual column engine ForwardColumnIndexedRowEngine. It forwards them to a row/column in another table. The row forwarding is done using a special column containing row numbers indexing the referenced table.
ForwardColumnIndexedRow represents a virtual column which forwards the gets and puts to a column with the same name in another table. It is, in fact, a reference to the other column. The row numbers in the column are mapped to row numbers in the referenced column using a special column containing the mapping. The name of the other table is stored as a keyword in the forwarding column. When the referenced column is in its turn a ForwardColumn (note: not a ForwardColumnIndexedRow), the table mentioned in there will be used. In this way, the length of the forwarding chain is kept to a minimum.
An object of this class is created (and deleted) by the virtual column engine
ForwardColumnIndexedRowEngine which creates a ForwardColumnIndexedRow object for each column being forwarded.
Definition at line 86 of file ForwardColRow.h.
casacore::ForwardColumnIndexedRow::ForwardColumnIndexedRow | ( | ForwardColumnIndexedRowEngine * | enginePtr, | |
const String & | columnName, | |||
int | dataType, | |||
const String & | dataTypeId, | |||
const Table & | referencedTable | |||
) |
Construct it for the given column.
casacore::ForwardColumnIndexedRow::~ForwardColumnIndexedRow | ( | ) |
Destructor is mandatory.
casacore::ForwardColumnIndexedRow::ForwardColumnIndexedRow | ( | const ForwardColumnIndexedRow & | ) | [private] |
Copy constructor is not needed and therefore forbidden (so make it private).
Bool casacore::ForwardColumnIndexedRow::canAccessArrayColumn | ( | Bool & | reask | ) | const [private, virtual] |
This data manager cannot do get/putColumn.
Reimplemented from casacore::ForwardColumn.
Bool casacore::ForwardColumnIndexedRow::canAccessColumnSlice | ( | Bool & | reask | ) | const [private, virtual] |
This data manager cannot do get/putColumn.
Reimplemented from casacore::ForwardColumn.
Bool casacore::ForwardColumnIndexedRow::canAccessScalarColumn | ( | Bool & | reask | ) | const [private, virtual] |
This data manager cannot do get/putColumn.
Reimplemented from casacore::ForwardColumn.
Bool casacore::ForwardColumnIndexedRow::canChangeShape | ( | ) | const [private, virtual] |
This data manager cannot handle changing array shapes.
Reimplemented from casacore::ForwardColumn.
Convert the rownr to the rownr in the underlying table.
Definition at line 407 of file ForwardColRow.h.
References casacore::ForwardColumnIndexedRowEngine::convertRownr(), and enginePtr_p.
void casacore::ForwardColumnIndexedRow::getArrayV | ( | uInt | rownr, | |
void * | dataPtr | |||
) | [private, virtual] |
Get the array value in the given row.
The argument dataPtr is in fact a Array<T>*, but a void* is needed to be generic. The array pointed to by dataPtr has to have the correct shape (which is guaranteed by the ArrayColumn get function).
Reimplemented from casacore::ForwardColumn.
Get the scalar value with a standard data type in the given row.
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::getComplexV | ( | uInt | rownr, | |
Complex * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::getDComplexV | ( | uInt | rownr, | |
DComplex * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::getdoubleV | ( | uInt | rownr, | |
double * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::getfloatV | ( | uInt | rownr, | |
float * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::getOtherV | ( | uInt | rownr, | |
void * | dataPtr | |||
) | [private, virtual] |
Get the scalar value with a non-standard data type in the given row.
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::getShortV | ( | uInt | rownr, | |
Short * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::getSliceV | ( | uInt | rownr, | |
const Slicer & | slicer, | |||
void * | dataPtr | |||
) | [private, virtual] |
Get a section of the array in the given row.
The argument dataPtr is in fact a Array<T>*, but a void* is needed to be generic. The array pointed to by dataPtr has to have the correct shape (which is guaranteed by the ArrayColumn getSlice function).
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::getStringV | ( | uInt | rownr, | |
String * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::getuCharV | ( | uInt | rownr, | |
uChar * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::getuShortV | ( | uInt | rownr, | |
uShort * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
Is the value shape defined in the given row?
Reimplemented from casacore::ForwardColumn.
Get the dimensionality of the item in the given row.
Reimplemented from casacore::ForwardColumn.
ForwardColumnIndexedRow& casacore::ForwardColumnIndexedRow::operator= | ( | const ForwardColumnIndexedRow & | ) | [private] |
Assignment is not needed and therefore forbidden (so make it private).
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::prepare | ( | const Table & | thisTable | ) | [virtual] |
Initialize the object.
This means binding the column to the column with the same name in the original table. It checks if the description of both columns is the same.
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::putArrayV | ( | uInt | rownr, | |
const void * | dataPtr | |||
) | [private, virtual] |
Put the array value into the given row.
This throws an exception, because putting is not supported.
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::putBoolV | ( | uInt | rownr, | |
const Bool * | dataPtr | |||
) | [private, virtual] |
Put the scalar value with a standard data type into the given row.
This throws an exception, because putting is not supported.
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::putComplexV | ( | uInt | rownr, | |
const Complex * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::putDComplexV | ( | uInt | rownr, | |
const DComplex * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::putdoubleV | ( | uInt | rownr, | |
const double * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::putfloatV | ( | uInt | rownr, | |
const float * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::putIntV | ( | uInt | rownr, | |
const Int * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::putOtherV | ( | uInt | rownr, | |
const void * | dataPtr | |||
) | [private, virtual] |
Put the scalar value with a non-standard data type into the given row.
This throws an exception, because putting is not supported.
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::putShortV | ( | uInt | rownr, | |
const Short * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::putSliceV | ( | uInt | rownr, | |
const Slicer & | slicer, | |||
const void * | dataPtr | |||
) | [private, virtual] |
Put into a section of the array in the given row.
This throws an exception, because putting is not supported.
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::putStringV | ( | uInt | rownr, | |
const String * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::putuCharV | ( | uInt | rownr, | |
const uChar * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::putuIntV | ( | uInt | rownr, | |
const uInt * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::putuShortV | ( | uInt | rownr, | |
const uShort * | dataPtr | |||
) | [private, virtual] |
Reimplemented from casacore::ForwardColumn.
void casacore::ForwardColumnIndexedRow::setShape | ( | uInt | rownr, | |
const IPosition & | shape | |||
) | [private, virtual] |
Set the shape of an (indirect) array in the given row.
This throws an exception, because putting is not supported.
Reimplemented from casacore::ForwardColumn.
Get the shape of the item in the given row.
Reimplemented from casacore::ForwardColumn.
Reimplemented from casacore::ForwardColumn.
Definition at line 203 of file ForwardColRow.h.
Referenced by convertRownr().