casacore
|
Templated base class for virtual scalar column. More...
#include <VirtScaCol.h>
Public Member Functions | |
VirtualScalarColumn () | |
Create a column. More... | |
virtual | ~VirtualScalarColumn () |
Frees up the storage. More... | |
int | dataType () const |
Return the data type of the column. More... | |
String | dataTypeId () const |
Return the data type Id of the column. More... | |
virtual Bool | isWritable () const |
By default no data can be put in a virtual column. More... | |
virtual void | get (uInt rownr, T &data)=0 |
Get the scalar value in the given row. More... | |
virtual void | put (uInt rownr, const T &data) |
Put the scalar value into the given row. More... | |
![]() | |
DataManagerColumn () | |
Create a column. More... | |
virtual | ~DataManagerColumn () |
Frees up the storage. More... | |
void | setIsFixedShape (Bool isFixedShape) |
Set the isFixedShape flag. More... | |
Bool | isFixedShape () const |
Is this a fixed shape column? More... | |
virtual void | setMaxLength (uInt maxLength) |
Set the maximum length of the value (can be used for strings). More... | |
void | setFixedShapeColumn (const IPosition &shape) |
Set the shape of all (fixed-shaped) arrays in the column. More... | |
virtual void | setShape (uInt rownr, const IPosition &shape) |
Set the shape of an (variable-shaped) array in the given row. More... | |
virtual void | setShapeTiled (uInt rownr, const IPosition &shape, const IPosition &tileShape) |
Set the shape and tile shape of an (variable-shaped) array in the given row. More... | |
virtual Bool | isShapeDefined (uInt rownr) |
Is the value shape defined in the given row? By default it returns True. More... | |
virtual uInt | ndim (uInt rownr) |
Get the dimensionality of the item in the given row. More... | |
virtual IPosition | shape (uInt rownr) |
Get the shape of the item in the given row. More... | |
virtual Bool | canChangeShape () const |
Can the data manager handle chaging the shape of an existing array? Default is no. More... | |
virtual Bool | canAccessScalarColumnCells (Bool &reask) const |
Can the column data manager handle access to a clooection of cells in a scalar column? If not, the caller should access the column cells by looping through the cells in the column. More... | |
virtual Bool | canAccessArrayColumn (Bool &reask) const |
Can the column data manager handle access to a scalar column? If not, the caller should access the column by looping through all cells in the column. More... | |
virtual Bool | canAccessArrayColumnCells (Bool &reask) const |
Can the column data manager handle access to a collection of cells in an array column? If not, the caller should access the column cells by looping through the cells in the column. More... | |
virtual Bool | canAccessSlice (Bool &reask) const |
Can the column data manager handle access to a cell slice? If not, the caller should do slicing itself (by accessing the entire array and slicing it). More... | |
virtual Bool | canAccessColumnSlice (Bool &reask) const |
Can the column data manager handle access to a column slice? If not, the caller should access the column slice by looping through all cell slices in the column. More... | |
ColumnCache & | columnCache () |
Get access to the ColumnCache object. More... | |
const ColumnCache * | columnCachePtr () const |
void | get (uInt rownr, Bool *dataPtr) |
Get the scalar value in the given row. More... | |
void | get (uInt rownr, uChar *dataPtr) |
void | get (uInt rownr, Short *dataPtr) |
void | get (uInt rownr, uShort *dataPtr) |
void | get (uInt rownr, Int *dataPtr) |
void | get (uInt rownr, uInt *dataPtr) |
void | get (uInt rownr, float *dataPtr) |
void | get (uInt rownr, double *dataPtr) |
void | get (uInt rownr, Complex *dataPtr) |
void | get (uInt rownr, DComplex *dataPtr) |
void | get (uInt rownr, String *dataPtr) |
void | get (uInt rownr, void *dataPtr) |
This function is the get for all non-standard data types. More... | |
void | put (uInt rownr, const Bool *dataPtr) |
Put the scalar value into the given row. More... | |
void | put (uInt rownr, const uChar *dataPtr) |
void | put (uInt rownr, const Short *dataPtr) |
void | put (uInt rownr, const uShort *dataPtr) |
void | put (uInt rownr, const Int *dataPtr) |
void | put (uInt rownr, const uInt *dataPtr) |
void | put (uInt rownr, const float *dataPtr) |
void | put (uInt rownr, const double *dataPtr) |
void | put (uInt rownr, const Complex *dataPtr) |
void | put (uInt rownr, const DComplex *dataPtr) |
void | put (uInt rownr, const String *dataPtr) |
void | put (uInt rownr, const void *dataPtr) |
This function is the put for all non-standard data types. More... | |
virtual void | getScalarColumnCellsV (const RefRows &rownrs, void *dataPtr) |
Get some scalar values in the column. More... | |
virtual void | putScalarColumnCellsV (const RefRows &rownrs, const void *dataPtr) |
Put some scalar values in the column. More... | |
virtual void | getArrayV (uInt rownr, void *dataPtr) |
Get the array value in the given row. More... | |
virtual void | putArrayV (uInt rownr, const void *dataPtr) |
Put the array value into the given row. More... | |
virtual void | getArrayColumnV (void *dataPtr) |
Get all array values in the column. More... | |
virtual void | putArrayColumnV (const void *dataPtr) |
Put all array values in the column. More... | |
virtual void | getArrayColumnCellsV (const RefRows &rownrs, void *dataPtr) |
Get some array values in the column. More... | |
virtual void | putArrayColumnCellsV (const RefRows &rownrs, const void *dataPtr) |
Put some array values in the column. More... | |
virtual void | getSliceV (uInt rownr, const Slicer &slicer, void *dataPtr) |
Get a section of the array in the given row. More... | |
virtual void | putSliceV (uInt rownr, const Slicer &slicer, const void *dataPtr) |
Put into a section of the array in the given row. More... | |
virtual void | getColumnSliceV (const Slicer &slicer, void *dataPtr) |
Get a section of all arrays in the column. More... | |
virtual void | putColumnSliceV (const Slicer &slicer, const void *dataPtr) |
Put into a section of all arrays in the column. More... | |
virtual void | getColumnSliceCellsV (const RefRows &rownrs, const Slicer &slicer, void *dataPtr) |
Get a section of some arrays in the column. More... | |
virtual void | putColumnSliceCellsV (const RefRows &rownrs, const Slicer &slicer, const void *dataPtr) |
Put into a section of some arrays in the column. More... | |
void | throwGet () const |
Throw an "invalid operation" exception for the default implementation of get. More... | |
void | throwPut () const |
Throw an "invalid operation" exception for the default implementation of put. More... | |
void | setColumnName (const String &colName) |
Set the column name. More... | |
const String & | columnName () const |
Get rhe column name. More... | |
Protected Member Functions | |
Bool | canAccessScalarColumn (Bool &reask) const |
The class can handle a get/putScalarColumn. More... | |
virtual void | getScalarColumn (Vector< T > &data) |
Get all scalar values in the column. More... | |
virtual void | putScalarColumn (const Vector< T > &data) |
Put all scalar values in the column. More... | |
virtual uInt | getBlock (uInt rownr, uInt nrmax, T *dataPtr) |
Get scalars from the given row on with a maximum of nrmax values. More... | |
virtual void | putBlock (uInt rownr, uInt nrmax, const T *dataPtr) |
Put nrmax scalars from the given row on. More... | |
Private Member Functions | |
void | getBoolV (uInt rownr, Bool *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. More... | |
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) |
This function is the get for all non-standard data types. More... | |
void | putBoolV (uInt rownr, const Bool *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. More... | |
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) |
This function is the put for all non-standard data types. More... | |
void | getScalarColumnV (void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. More... | |
void | putScalarColumnV (const void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. More... | |
uInt | getBlockV (uInt rownr, uInt nrmax, void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. More... | |
void | putBlockV (uInt rownr, uInt nrmax, const void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. More... | |
VirtualScalarColumn (const VirtualScalarColumn< T > &) | |
The object cannot be copied. More... | |
VirtualScalarColumn< T > & | operator= (const VirtualScalarColumn< T > &) |
The object cannot be assigned to. More... | |
Templated base class for virtual scalar column.
Internal
VirtualScalarColumn handles a virtual column containing a scalar.
VirtualScalarColumn is the abstract base class to handle a scalar column for a virtual column engine. It is derived from DataManagerColumn and reimplements some virtual functions to make life easier for the derived classes. It does the following:
This class reimplements some virtual functions implemented by DataManagerColumn and types the data argument. In that way they are easier to implement in derived classes. Furthermore they allow default implementations.
static String dataTypeId(); // unique name of the class
Definition at line 126 of file VirtScaCol.h.
|
inline |
Create a column.
Definition at line 131 of file VirtScaCol.h.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
virtual |
Frees up the storage.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
private |
The object cannot be copied.
|
protectedvirtual |
The class can handle a get/putScalarColumn.
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
virtual |
Return the data type of the column.
Implements casacore::DataManagerColumn.
Referenced by casacore::VSCEngine< T >::sourceColumnName(), and casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
virtual |
Return the data type Id of the column.
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
pure virtual |
Get the scalar value in the given row.
Implemented in casacore::ParAngleColumn, casacore::LASTColumn, and casacore::HourangleColumn.
Referenced by casacore::VirtScaCol_global_functions_getVirtualScalarColumn::getVirtualScalarColumn().
|
protectedvirtual |
Get scalars from the given row on with a maximum of nrmax values.
It returns the actual number of values got. This can be used to get an entire column of scalars or to get a part of a column (for a cache for example). The argument dataPtr is in fact a T*, but a void* is needed to be generic. It must have length nrmax.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Implement the virtual functions defined in DataManagerColumn.
Get scalars from the given row on with a maximum of nrmax values.
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Implement the virtual functions defined in DataManagerColumn.
Get the scalar value in the given row.
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
This function is the get for all non-standard data types.
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
protectedvirtual |
Get all scalar values in the column.
The argument dataPtr is in fact a Vector<T>*, but a void* is needed to be generic. The vector pointed to by dataPtr has to have the correct length (which is guaranteed by the ScalarColumn getColumn function).
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Implement the virtual functions defined in DataManagerColumn.
Get all scalar values in the column.
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
virtual |
By default no data can be put in a virtual column.
Reimplemented from casacore::DataManagerColumn.
Reimplemented in casacore::VSCEngine< T >.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
private |
The object cannot be assigned to.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
virtual |
Put the scalar value into the given row.
The default implementation throws an exception.
Referenced by casacore::VirtScaCol_global_functions_getVirtualScalarColumn::putVirtualScalarColumn(), and casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
protectedvirtual |
Put nrmax scalars from the given row on.
It returns the actual number of values put. This can be used to put an entire column of scalars or to put a part of a column (for a cache for example). The argument dataPtr is in fact a const T*, but a const void* is needed to be generic. It must have length nrmax.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Implement the virtual functions defined in DataManagerColumn.
Put nrmax scalars from the given row on.
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Implement the virtual functions defined in DataManagerColumn.
Put the scalar value into the given row.
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
This function is the put for all non-standard data types.
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
protectedvirtual |
Put all scalar values in the column.
The argument dataPtr is in fact a const Vector<T>*, but a const void* is needed to be generic. The vector pointed to by dataPtr has to have the correct length (which is guaranteed by the ScalarColumn putColumn function).
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Implement the virtual functions defined in DataManagerColumn.
Put all scalar values in the column.
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().
|
privatevirtual |
Reimplemented from casacore::DataManagerColumn.
Referenced by casacore::VirtualScalarColumn< Double >::VirtualScalarColumn().