Go to the documentation of this file.
28 #ifndef TABLES_FORWARDCOL_H
29 #define TABLES_FORWARDCOL_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/tables/DataMan/VirtColEng.h>
34 #include <casacore/tables/DataMan/DataManager.h>
35 #include <casacore/tables/Tables/Table.h>
36 #include <casacore/tables/Tables/TableColumn.h>
37 #include <casacore/casa/Containers/Block.h>
38 #include <casacore/casa/BasicSL/String.h>
43 class ForwardColumnEngine;
100 const Table& referencedTable);
256 const void* dataPtr);
314 const void* dataPtr);
336 const Slicer& slicer,
void* dataPtr);
345 const void* dataPtr);
514 const String& dataTypeId);
519 const String& dataTypeId);
void getBoolV(uInt rownr, Bool *dataPtr)
Get the scalar value with a standard data type in the given row.
void addRow(uInt nrrow)
Add rows to all columns.
void putComplexV(uInt rownr, const Complex *dataPtr)
void getOtherV(uInt rownr, void *dataPtr)
Get the scalar value with a non-standard data type in the given row.
ForwardColumn & operator=(const ForwardColumn &)
Assignment is not needed and therefore forbidden (so make it private).
Specify which elements to extract from an n-dimensional array.
DataManagerColumn * makeScalarColumn(const String &columnName, int dataType, const String &dataTypeId)
Create the column object for the scalar column in this engine.
virtual void putColumnSliceCellsV(const RefRows &rownrs, const Slicer &slicer, const void *dataPtr)
Put into a section of some arrays in the column.
void putColumnSliceV(const Slicer &slicer, const void *dataPtr)
Put a section into all arrays in the column.
A Vector of integers, for indexing into Array<T> objects.
void fillTableName(const Table &thisTable, const Table &referencedTable)
Define the special keyword containing the name of the original table.
void removeRow(uInt rownr)
Delete a row from all columns.
Abstract base class for a data manager.
void getComplexV(uInt rownr, Complex *dataPtr)
void addForwardColumn(ForwardColumn *colp)
Add a ForwardColumn object to the block.
void setShapeColumn(const IPosition &shape)
Set the shape of an direct array.
A drop-in replacement for Block<T*>.
Bool canAddRow() const
This data manager allows to add rows.
Read/write access to a table column.
static void registerClass()
Register the class name and the static makeObject "constructor".
void getSliceV(uInt rownr, const Slicer &slicer, void *dataPtr)
Get a section of the array in the given row.
std::complex< Double > DComplex
void setRW()
Set the column to writable if its underlying table is writable.
Bool canChangeShape() const
This data manager may be able to handle changing array shapes.
void putShortV(uInt rownr, const Short *dataPtr)
ForwardColumnEngine(const ForwardColumnEngine &)
The copy constructor is forbidden (so it is private).
static SetupNewTable setupNewTable(const Table &table, const String &tableName, Table::TableOption option)
Create a SetupNewTable object with the given name and option and with the description from the given ...
void getuIntV(uInt rownr, uInt *dataPtr)
DataManagerColumn * makeIndArrColumn(const String &columnName, int dataType, const String &dataTypeId)
Create the column object for the indirect array column in this engine.
void getArrayV(uInt rownr, void *dataPtr)
Get the array value in the given row.
void getIntV(uInt rownr, Int *dataPtr)
String dataTypeId() const
Get the data type id of the column for dataType==TpOther.
const String & suffix() const
Get the suffix to be used for names.
PtrBlock< ForwardColumn * > refColumns_p
Define the various engine column objects.
void getInt64V(uInt rownr, Int64 *dataPtr)
void putfloatV(uInt rownr, const float *dataPtr)
Abstract base class for a column in a data manager.
void putuCharV(uInt rownr, const uChar *dataPtr)
static String className()
Return the name of the class.
String suffix_p
The suffix to be used in names.
Bool canAddColumn() const
This data manager allows to add columns.
void putdoubleV(uInt rownr, const double *dataPtr)
void putArrayV(uInt rownr, const void *dataPtr)
Put the array value into the given row.
void putOtherV(uInt rownr, const void *dataPtr)
Put the scalar value with a non-standard data type into the given row.
Bool isWritable() const
Test if data can be put into this column.
int dataType() const
Get the data type of the column as defined in DataType.h.
ForwardColumn(ForwardColumnEngine *enginePtr, const String &columnName, int dataType, const String &dataTypeId, const Table &referencedTable)
Construct it for the given column.
Bool canRemoveRow() const
This data manager allows to delete rows.
Virtual column forwarding to another column.
const Table & refTable() const
Get access to the refTable_p data member.
IPosition shape(uInt rownr)
Get the shape of the item in the given row.
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
void putScalarColumnV(const void *dataPtr)
Put all scalar values in the column.
const String & columnName() const
Get rhe column name.
void basePrepare(const Table &thisTable, Bool writable)
Do the preparation of the base class column object.
Bool canAccessArrayColumn(Bool &reask) const
This data manager may be able to do get/putArrayColumn.
void setShape(uInt rownr, const IPosition &shape)
Set the shape of an (indirect) array in the given row.
ForwardColumnEngine(const Table &referencedTable)
Create the engine.
Main interface class to a read/write table.
void getArrayColumnV(void *dataPtr)
Get all scalar values in the column.
~ForwardColumnEngine()
Destructor is mandatory.
void getDComplexV(uInt rownr, DComplex *dataPtr)
void getScalarColumnV(void *dataPtr)
Get all scalar values in the column.
void putuShortV(uInt rownr, const uShort *dataPtr)
BaseColumn * colPtr() const
Class holding the row numbers in a RefTable.
virtual void getScalarColumnCellsV(const RefRows &rownrs, void *dataPtr)
Get some scalar values in the column.
uInt ndim(uInt rownr)
Get the dimensionality of the item in the given row.
Abstract base class for a table column.
void getShortV(uInt rownr, Short *dataPtr)
String dataManName_p
The name of the data manager.
String dataManagerType() const
Return the type of the engine (i.e.
Bool canAccessColumnSlice(Bool &reask) const
This data manager may be able to do get/putColumnSlice.
ForwardColumnEngine * enginePtr_p
void create(uInt initialNrrow)
Initialize the object for a new table.
void putDComplexV(uInt rownr, const DComplex *dataPtr)
ForwardColumn(const ForwardColumn &)
Copy constructor is not needed and therefore forbidden (so make it private).
Abstract base class for virtual column handling.
Create a new table - define shapes, data managers, etc.
void putuIntV(uInt rownr, const uInt *dataPtr)
void setRefTable(const Table &refTable)
Set RefTable_p if not set yet.
this file contains all the compiler specific defines
static DataManager * makeObject(const String &dataManagerType, const Record &spec)
Define the "constructor" to construct this engine when a table is read back.
ForwardColumnEngine & operator=(const ForwardColumnEngine &)
Assignment is forbidden (so it is private).
void getuShortV(uInt rownr, uShort *dataPtr)
void putStringV(uInt rownr, const String *dataPtr)
void getStringV(uInt rownr, String *dataPtr)
void setSuffix(const String &suffix)
Set the suffix.
void removeColumn(DataManagerColumn *)
Delete a column.
void getfloatV(uInt rownr, float *dataPtr)
Bool isShapeDefined(uInt rownr)
Is the value shape defined in the given row?
void reopenRW()
Reopen the engine for read/write access.
void putInt64V(uInt rownr, const Int64 *dataPtr)
void getuCharV(uInt rownr, uChar *dataPtr)
String dataManagerName() const
Return the name of the data manager.
virtual void getColumnSliceCellsV(const RefRows &rownrs, const Slicer &slicer, void *dataPtr)
Get a section of some arrays in the column.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Table refTable_p
The referenced table.
void getdoubleV(uInt rownr, double *dataPtr)
void addColumn(DataManagerColumn *)
Add a column.
ForwardColumnEngine(const String &dataManagerName, const Record &spec)
The default constructor is required for reconstruction of the engine when a table is read back.
void baseCreate()
Do the creation (i.e.
String: the storage and methods of handling collections of characters.
Virtual column engine forwarding to other columns.
Bool canAccessSlice(Bool &reask) const
This data manager may be able to do get/putSlice.
bool Bool
Define the standard types used by Casacore.
std::complex< Float > Complex
virtual void putScalarColumnCellsV(const RefRows &rownrs, const void *dataPtr)
Put some scalar values in the column.
A hierarchical collection of named fields of various types.
Bool canRemoveColumn() const
This data manager allows to delete columns.
void basePrepare()
Do the preparation of the engine by preparing all columns.
void putArrayColumnV(const void *dataPtr)
Put all scalar values in the column.
virtual void getArrayColumnCellsV(const RefRows &rownrs, void *dataPtr)
Get some array values in the column.
DataManager * clone() const
Clone the engine object.
virtual void prepare(const Table &thisTable)
Initialize the object.
TableOption
Define the possible options how a table can be opened.
void putSliceV(uInt rownr, const Slicer &slicer, const void *dataPtr)
Put into a section of the array 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 putIntV(uInt rownr, const Int *dataPtr)
void getColumnSliceV(const Slicer &slicer, void *dataPtr)
Get a section of all arrays in the column.
ForwardColumnEngine(const Table &referencedTable, const String &dataManagerName)
Create the engine.
virtual ~ForwardColumn()
Destructor is mandatory.
virtual void putArrayColumnCellsV(const RefRows &rownrs, const void *dataPtr)
Put some array values in the column.
Bool canAccessScalarColumn(Bool &reask) const
This data manager may be able to do get/putScalarColumn.
void prepare()
Initialize the engine.