26#ifndef TABLES_FORWARDCOL_H
27#define TABLES_FORWARDCOL_H
30#include <casacore/casa/aips.h>
31#include <casacore/tables/DataMan/VirtColEng.h>
32#include <casacore/tables/DataMan/DataManager.h>
33#include <casacore/tables/Tables/Table.h>
34#include <casacore/tables/Tables/TableColumn.h>
35#include <casacore/casa/Containers/Block.h>
36#include <casacore/casa/BasicSL/String.h>
98 const Table& referencedTable);
499 const String& dataTypeId);
504 const String& dataTypeId);
Non-templated base class for templated Array class.
DataManagerColumn()
Create a column.
const String & columnName() const
Get rhe column name.
Abstract base class for a data manager.
Virtual column engine forwarding to other columns.
Bool canAddColumn() const
This data manager allows to add columns.
String dataManagerType() const
Return the type of the engine (i.e.
void baseCreate()
Do the creation (i.e.
Bool canRemoveColumn() const
This data manager allows to delete columns.
DataManagerColumn * makeScalarColumn(const String &columnName, int dataType, const String &dataTypeId)
Create the column object for the scalar column in this engine.
void setSuffix(const String &suffix)
Set the suffix.
String dataManagerName() const
Return the name of the data manager.
const String & suffix() const
Get the suffix to be used for names.
void removeColumn(DataManagerColumn *)
Delete a column.
DataManager * clone() const
Clone the engine object.
void addColumn(DataManagerColumn *)
Add a column.
void addRow64(rownr_t nrrow)
Add rows to all columns.
void reopenRW()
Reopen the engine for read/write access.
const Table & refTable() const
Get access to the refTable_p data member.
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
Table refTable_p
The referenced table.
void create64(rownr_t initialNrrow)
Initialize the object for a new table.
DataManagerColumn * makeIndArrColumn(const String &columnName, int dataType, const String &dataTypeId)
Create the column object for the indirect array column in this engine.
static DataManager * makeObject(const String &dataManagerType, const Record &spec)
Define the "constructor" to construct this engine when a table is read back.
Block< ForwardColumn * > refColumns_p
Define the various engine column objects.
void addForwardColumn(ForwardColumn *colp)
Add a ForwardColumn object to the block.
Bool canAddRow() const
This data manager allows to add rows.
ForwardColumnEngine & operator=(const ForwardColumnEngine &)=delete
Assignment is forbidden.
void basePrepare()
Do the preparation of the engine by preparing all columns.
String suffix_p
The suffix to be used in names.
ForwardColumnEngine(const Table &referencedTable, const String &dataManagerName)
Create the engine.
ForwardColumnEngine(const ForwardColumnEngine &)=delete
The copy constructor is forbidden.
static void registerClass()
Register the class name and the static makeObject "constructor".
static String className()
Return the name of the class.
String dataManName_p
The name of the data manager.
void removeRow64(rownr_t rownr)
Delete a row from all columns.
void setRefTable(const Table &refTable)
Set RefTable_p if not set yet.
void prepare()
Initialize the engine.
ForwardColumnEngine(const Table &referencedTable)
Create the engine.
~ForwardColumnEngine()
Destructor is mandatory.
Bool canRemoveRow() const
This data manager allows to delete rows.
ForwardColumnEngine(const String &dataManagerName, const Record &spec)
The default constructor is required for reconstruction of the engine when a table is read back.
virtual void getScalarColumnCellsV(const RefRows &rownrs, ArrayBase &dataPtr)
Get some scalar values in the column.
void setRW()
Set the column to writable if its underlying table is writable.
virtual void putString(rownr_t rownr, const String *dataPtr)
void setShape(rownr_t rownr, const IPosition &shape)
Set the shape of an (indirect) array in the given row.
virtual void getString(rownr_t rownr, String *dataPtr)
virtual void putfloat(rownr_t rownr, const float *dataPtr)
BaseColumn * colPtr() const
virtual void putdouble(rownr_t rownr, const double *dataPtr)
void putArrayColumnV(const ArrayBase &dataPtr)
Put all scalar values in the column.
void getScalarColumnV(ArrayBase &dataPtr)
Get all scalar values in the column.
virtual void putArrayColumnCellsV(const RefRows &rownrs, const ArrayBase &dataPtr)
Put some array values in the column.
Bool isWritable() const
Test if data can be put into this column.
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 ...
virtual void getDComplex(rownr_t rownr, DComplex *dataPtr)
ForwardColumn & operator=(const ForwardColumn &)=delete
Assignment is not needed and therefore forbidden.
ForwardColumn(const ForwardColumn &)=delete
Copy constructor is not needed and therefore forbidden.
void getColumnSliceV(const Slicer &slicer, ArrayBase &dataPtr)
Get a section of all arrays in the column.
void getArrayColumnV(ArrayBase &dataPtr)
Get all scalar values in the column.
uInt ndim(rownr_t rownr)
Get the dimensionality of the item in the given row.
virtual void putOther(rownr_t rownr, const void *dataPtr)
Put the scalar value with a non-standard data type into the given row.
virtual void getBool(rownr_t rownr, Bool *dataPtr)
Get the scalar value with a standard data type in the given row.
virtual void getShort(rownr_t rownr, Short *dataPtr)
virtual void getColumnSliceCellsV(const RefRows &rownrs, const Slicer &slicer, ArrayBase &dataPtr)
Get a section of some arrays in the column.
virtual void getuChar(rownr_t rownr, uChar *dataPtr)
virtual void putInt(rownr_t rownr, const Int *dataPtr)
virtual void putuShort(rownr_t rownr, const uShort *dataPtr)
virtual void putScalarColumnCellsV(const RefRows &rownrs, const ArrayBase &dataPtr)
Put some scalar values in the column.
virtual void putuInt(rownr_t rownr, const uInt *dataPtr)
virtual void getInt64(rownr_t rownr, Int64 *dataPtr)
virtual void getuShort(rownr_t rownr, uShort *dataPtr)
virtual void putColumnSliceCellsV(const RefRows &rownrs, const Slicer &slicer, const ArrayBase &dataPtr)
Put into a section of some arrays in the column.
int dataType() const
Get the data type of the column as defined in DataType.h.
void getArrayV(rownr_t rownr, ArrayBase &dataPtr)
Get the array value in the given row.
virtual void getOther(rownr_t rownr, void *dataPtr)
Get the scalar value with a non-standard data type in the given row.
virtual void getComplex(rownr_t rownr, Complex *dataPtr)
virtual void getInt(rownr_t rownr, Int *dataPtr)
String dataTypeId() const
Get the data type id of the column for dataType==TpOther.
Bool isShapeDefined(rownr_t rownr)
Is the value shape defined in the given row?
void fillTableName(const Table &thisTable, const Table &referencedTable)
Define the special keyword containing the name of the original table.
void getSliceV(rownr_t rownr, const Slicer &slicer, ArrayBase &dataPtr)
Get a section of the array in the given row.
Bool canChangeShape() const
This data manager may be able to handle changing array shapes.
virtual void getArrayColumnCellsV(const RefRows &rownrs, ArrayBase &dataPtr)
Get some array values in the column.
virtual void putInt64(rownr_t rownr, const Int64 *dataPtr)
ForwardColumn(ForwardColumnEngine *enginePtr, const String &columnName, int dataType, const String &dataTypeId, const Table &referencedTable)
Construct it for the given column.
virtual void putBool(rownr_t rownr, const Bool *dataPtr)
Put the scalar value with a standard data type into the given row.
virtual ~ForwardColumn()
Destructor is mandatory.
void putColumnSliceV(const Slicer &slicer, const ArrayBase &dataPtr)
Put a section into all arrays in the column.
virtual void getdouble(rownr_t rownr, double *dataPtr)
virtual void putDComplex(rownr_t rownr, const DComplex *dataPtr)
IPosition shape(rownr_t rownr)
Get the shape of the item in the given row.
void basePrepare(const Table &thisTable, Bool writable)
Do the preparation of the base class column object.
void putArrayV(rownr_t rownr, const ArrayBase &dataPtr)
Put the array value into the given row.
virtual void putShort(rownr_t rownr, const Short *dataPtr)
virtual void putuChar(rownr_t rownr, const uChar *dataPtr)
void putScalarColumnV(const ArrayBase &dataPtr)
Put all scalar values in the column.
ForwardColumnEngine * enginePtr_p
void putSliceV(rownr_t rownr, const Slicer &slicer, const ArrayBase &dataPtr)
Put into a section of the array in the given row.
void setShapeColumn(const IPosition &shape)
Set the shape of an direct array.
virtual void prepare(const Table &thisTable)
Initialize the object.
virtual void getfloat(rownr_t rownr, float *dataPtr)
virtual void putComplex(rownr_t rownr, const Complex *dataPtr)
virtual void getuInt(rownr_t rownr, uInt *dataPtr)
Create a new table - define shapes, data managers, etc.
String: the storage and methods of handling collections of characters.
TableOption
Define the possible options how a table can be opened.
VirtualColumnEngine()
Create the object.
this file contains all the compiler specific defines
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size).
bool Bool
Define the standard types used by Casacore.
uInt64 rownr_t
Define the type of a row number in a table.
DataType dataType(const RecordFieldId &) const