28 #ifndef TABLES_FORWARDCOL_H
29 #define TABLES_FORWARDCOL_H
43 class ForwardColumnEngine;
100 const Table& referencedTable);
416 const String& dataManagerName);
502 const String& dataTypeId);
507 const String& dataTypeId);
A Vector of integers, for indexing into Array<T> objects.
virtual void putuShort(rownr_t rownr, const uShort *dataPtr)
Abstract base class for virtual column handling.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Bool canRemoveRow() const
This data manager allows to delete rows.
Non-templated base class for templated Array class.
Create a new table - define shapes, data managers, etc.
ForwardColumnEngine(const String &dataManagerName, const Record &spec)
The default constructor is required for reconstruction of the engine when a table is read back...
std::complex< Float > Complex
Main interface class to a read/write table.
virtual void getDComplex(rownr_t rownr, DComplex *dataPtr)
virtual void putShort(rownr_t rownr, const Short *dataPtr)
const String & columnName() const
Get rhe column name.
DataManager * clone() const
Clone the engine object.
Abstract base class for a column in a data manager.
void basePrepare()
Do the preparation of the engine by preparing all columns.
void setShape(rownr_t rownr, const IPosition &shape)
Set the shape of an (indirect) array in the given row.
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 removeColumn(DataManagerColumn *)
Delete a column.
virtual void putComplex(rownr_t rownr, const Complex *dataPtr)
Bool canChangeShape() const
This data manager may be able to handle changing array shapes.
virtual void putuChar(rownr_t rownr, const uChar *dataPtr)
virtual void getColumnSliceCellsV(const RefRows &rownrs, const Slicer &slicer, ArrayBase &dataPtr)
Get a section of some arrays in the column.
static void registerClass()
Register the class name and the static makeObject "constructor".
String dataTypeId() const
Get the data type id of the column for dataType==TpOther.
virtual void getdouble(rownr_t rownr, double *dataPtr)
void prepare()
Initialize the engine.
IPosition shape(rownr_t rownr)
Get the shape of the item in the given row.
virtual void getString(rownr_t rownr, String *dataPtr)
virtual void prepare(const Table &thisTable)
Initialize the object.
Virtual column engine forwarding to other columns.
virtual void putArrayColumnCellsV(const RefRows &rownrs, const ArrayBase &dataPtr)
Put some array values in the column.
void baseCreate()
Do the creation (i.e.
~ForwardColumnEngine()
Destructor is mandatory.
DataManagerColumn * makeScalarColumn(const String &columnName, int dataType, const String &dataTypeId)
Create the column object for the scalar column in this engine.
virtual void getArrayColumnCellsV(const RefRows &rownrs, ArrayBase &dataPtr)
Get some array values in the column.
virtual void getOther(rownr_t rownr, void *dataPtr)
Get the scalar value with a non-standard data type in the given row.
void putArrayColumnV(const ArrayBase &dataPtr)
Put all scalar values in the column.
virtual void getScalarColumnCellsV(const RefRows &rownrs, ArrayBase &dataPtr)
Get some scalar values in the column.
String dataManName_p
The name of the data manager.
void addForwardColumn(ForwardColumn *colp)
Add a ForwardColumn object to the block.
String suffix_p
The suffix to be used in names.
virtual void getuInt(rownr_t rownr, uInt *dataPtr)
virtual void getInt64(rownr_t rownr, Int64 *dataPtr)
virtual void getInt(rownr_t rownr, Int *dataPtr)
Bool isWritable() const
Test if data can be put into this column.
Table refTable_p
The referenced table.
virtual void getuChar(rownr_t rownr, uChar *dataPtr)
ForwardColumn & operator=(const ForwardColumn &)
Assignment is not needed and therefore forbidden (so make it private).
void setRefTable(const Table &refTable)
Set RefTable_p if not set yet.
void putArrayV(rownr_t rownr, const ArrayBase &dataPtr)
Put the array value into the given row.
void create64(rownr_t initialNrrow)
Initialize the object for a new table.
virtual void putColumnSliceCellsV(const RefRows &rownrs, const Slicer &slicer, const ArrayBase &dataPtr)
Put into a section of some arrays in the column.
Bool canAddColumn() const
This data manager allows to add columns.
ForwardColumn(ForwardColumnEngine *enginePtr, const String &columnName, int dataType, const String &dataTypeId, const Table &referencedTable)
Construct it for the given column.
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
std::complex< Double > DComplex
void setRW()
Set the column to writable if its underlying table is writable.
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.
Class holding the row numbers in a RefTable.
Virtual column forwarding to another column.
void getColumnSliceV(const Slicer &slicer, ArrayBase &dataPtr)
Get a section of all arrays in the column.
virtual void getComplex(rownr_t rownr, Complex *dataPtr)
virtual void putDComplex(rownr_t rownr, const DComplex *dataPtr)
void reopenRW()
Reopen the engine for read/write access.
virtual ~ForwardColumn()
Destructor is mandatory.
BaseColumn * colPtr() const
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
virtual void putdouble(rownr_t rownr, const double *dataPtr)
virtual void putInt64(rownr_t rownr, const Int64 *dataPtr)
String dataManagerType() const
Return the type of the engine (i.e.
Read/write access to a table column.
const String & suffix() const
Get the suffix to be used for names.
virtual void putScalarColumnCellsV(const RefRows &rownrs, const ArrayBase &dataPtr)
Put some scalar values in the column.
virtual void putOther(rownr_t rownr, const void *dataPtr)
Put the scalar value with a non-standard data type into the given row.
void getSliceV(rownr_t rownr, const Slicer &slicer, ArrayBase &dataPtr)
Get a section of the array in the given row.
A drop-in replacement for Block<T*>.
void addRow64(rownr_t nrrow)
Add rows to all columns.
void addColumn(DataManagerColumn *)
Add a column.
virtual void getuShort(rownr_t rownr, uShort *dataPtr)
void fillTableName(const Table &thisTable, const Table &referencedTable)
Define the special keyword containing the name of the original table.
const Table & refTable() const
Get access to the refTable_p data member.
Specify which elements to extract from an n-dimensional array.
uInt64 rownr_t
Define the type of a row number in a table.
virtual void putBool(rownr_t rownr, const Bool *dataPtr)
Put the scalar value with a standard data type into the given row.
virtual void getfloat(rownr_t rownr, float *dataPtr)
void getScalarColumnV(ArrayBase &dataPtr)
Get all scalar values in the column.
void removeRow64(rownr_t rownr)
Delete a row from all columns.
Abstract base class for a data manager.
static String className()
Return the name of the class.
Bool canAddRow() const
This data manager allows to add rows.
void basePrepare(const Table &thisTable, Bool writable)
Do the preparation of the base class column object.
void setSuffix(const String &suffix)
Set the suffix.
virtual void putfloat(rownr_t rownr, const float *dataPtr)
virtual void putInt(rownr_t rownr, const Int *dataPtr)
void putColumnSliceV(const Slicer &slicer, const ArrayBase &dataPtr)
Put a section into all arrays in the column.
uInt ndim(rownr_t rownr)
Get the dimensionality of the item in the given row.
String: the storage and methods of handling collections of characters.
virtual void putString(rownr_t rownr, const String *dataPtr)
Bool canRemoveColumn() const
This data manager allows to delete columns.
void getArrayV(rownr_t rownr, ArrayBase &dataPtr)
Get the array value in the given row.
virtual void getBool(rownr_t rownr, Bool *dataPtr)
Get the scalar value with a standard data type in the given row.
void putScalarColumnV(const ArrayBase &dataPtr)
Put all scalar values in the column.
DataManagerColumn * makeIndArrColumn(const String &columnName, int dataType, const String &dataTypeId)
Create the column object for the indirect array column in this engine.
virtual void getShort(rownr_t rownr, Short *dataPtr)
ForwardColumnEngine * enginePtr_p
virtual void putuInt(rownr_t rownr, const uInt *dataPtr)
String dataManagerName() const
Return the name of the data manager.
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).
PtrBlock< ForwardColumn * > refColumns_p
Define the various engine column objects.
int dataType() const
Get the data type of the column as defined in DataType.h.
void getArrayColumnV(ArrayBase &dataPtr)
Get all scalar values in the column.
TableOption
Define the possible options how a table can be opened.
Bool isShapeDefined(rownr_t rownr)
Is the value shape defined in the given row?
Abstract base class for a table column.