28 #ifndef TABLES_FORWARDCOL_H
29 #define TABLES_FORWARDCOL_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);
428 const String& dataManagerName);
514 const String& dataTypeId);
519 const String& dataTypeId);
A Vector of integers, for indexing into Array<T> objects.
void putStringV(uInt rownr, const String *dataPtr)
Abstract base class for virtual column handling.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
void putColumnSliceV(const Slicer &slicer, const void *dataPtr)
Put a section into all arrays in the column.
Bool canRemoveRow() const
This data manager allows to delete rows.
void getStringV(uInt rownr, String *dataPtr)
Create a new table - define shapes, data managers, etc.
void putuShortV(uInt rownr, const uShort *dataPtr)
virtual void getScalarColumnCellsV(const RefRows &rownrs, void *dataPtr)
Get some scalar values in the column.
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
void getComplexV(uInt rownr, Complex *dataPtr)
virtual void getColumnSliceCellsV(const RefRows &rownrs, const Slicer &slicer, void *dataPtr)
Get a section of some arrays in the column.
Main interface class to a read/write table.
const String & columnName() const
Get rhe column name.
DataManager * clone() const
Clone the engine object.
void putBoolV(uInt rownr, const Bool *dataPtr)
Put the scalar value with a standard data type into the given row.
void putShortV(uInt rownr, const Short *dataPtr)
Abstract base class for a column in a data manager.
void removeRow(uInt rownr)
Delete a row from all columns.
void basePrepare()
Do the preparation of the engine by preparing all columns.
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.
Bool canChangeShape() const
This data manager may be able to handle changing array shapes.
virtual void putColumnSliceCellsV(const RefRows &rownrs, const Slicer &slicer, const void *dataPtr)
Put into a section of some arrays in the column.
void getDComplexV(uInt rownr, DComplex *dataPtr)
void getuShortV(uInt rownr, uShort *dataPtr)
void putInt64V(uInt rownr, const Int64 *dataPtr)
static void registerClass()
Register the class name and the static makeObject "constructor".
virtual void putScalarColumnCellsV(const RefRows &rownrs, const void *dataPtr)
Put some scalar values in the column.
void getScalarColumnV(void *dataPtr)
Get all scalar values in the column.
String dataTypeId() const
Get the data type id of the column for dataType==TpOther.
void prepare()
Initialize the engine.
void getfloatV(uInt rownr, float *dataPtr)
Bool canAccessArrayColumn(Bool &reask) const
This data manager may be able to do get/putArrayColumn.
virtual void prepare(const Table &thisTable)
Initialize the object.
Virtual column engine forwarding to other columns.
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.
void putIntV(uInt rownr, const Int *dataPtr)
void getuCharV(uInt rownr, uChar *dataPtr)
Bool canAccessScalarColumn(Bool &reask) const
This data manager may be able to do get/putScalarColumn.
String dataManName_p
The name of the data manager.
Bool canAccessColumnSlice(Bool &reask) const
This data manager may be able to do get/putColumnSlice.
void addForwardColumn(ForwardColumn *colp)
Add a ForwardColumn object to the block.
String suffix_p
The suffix to be used in names.
Bool isWritable() const
Test if data can be put into this column.
Table refTable_p
The referenced table.
void putArrayColumnV(const void *dataPtr)
Put all scalar values in the column.
ForwardColumn & operator=(const ForwardColumn &)
Assignment is not needed and therefore forbidden (so make it private).
void putArrayV(uInt rownr, const void *dataPtr)
Put the array value into the given row.
void setRefTable(const Table &refTable)
Set RefTable_p if not set yet.
uInt ndim(uInt rownr)
Get the dimensionality of the item in the given row.
void addRow(uInt nrrow)
Add rows to all columns.
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 getSliceV(uInt rownr, const Slicer &slicer, void *dataPtr)
Get 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.
virtual void putArrayColumnCellsV(const RefRows &rownrs, const void *dataPtr)
Put some array values in the column.
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.
void getOtherV(uInt rownr, void *dataPtr)
Get the scalar value with a non-standard data type in the given row.
bool Bool
Define the standard types used by Casacore.
void getArrayColumnV(void *dataPtr)
Get all scalar values in the column.
void setShape(uInt rownr, const IPosition &shape)
Set the shape of an (indirect) array in the given row.
void putfloatV(uInt rownr, const float *dataPtr)
void create(uInt initialNrrow)
Initialize the object for a new table.
void getBoolV(uInt rownr, Bool *dataPtr)
Get the scalar value with a standard data type in the given row.
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.
void getShortV(uInt rownr, Short *dataPtr)
A drop-in replacement for Block<T*>.
void addColumn(DataManagerColumn *)
Add a column.
void getInt64V(uInt rownr, Int64 *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.
void putOtherV(uInt rownr, const void *dataPtr)
Put the scalar value with a non-standard data type into the given row.
void putDComplexV(uInt rownr, const DComplex *dataPtr)
void putSliceV(uInt rownr, const Slicer &slicer, const void *dataPtr)
Put into a section of the array in the given row.
void putScalarColumnV(const void *dataPtr)
Put all scalar values in the column.
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.
void getColumnSliceV(const Slicer &slicer, void *dataPtr)
Get a section of all arrays in the column.
String: the storage and methods of handling collections of characters.
Bool canRemoveColumn() const
This data manager allows to delete columns.
void getArrayV(uInt rownr, void *dataPtr)
Get the array value in the given row.
void putComplexV(uInt rownr, const Complex *dataPtr)
virtual void getArrayColumnCellsV(const RefRows &rownrs, void *dataPtr)
Get some array 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.
void getIntV(uInt rownr, Int *dataPtr)
void putdoubleV(uInt rownr, const double *dataPtr)
Bool canAccessSlice(Bool &reask) const
This data manager may be able to do get/putSlice.
ForwardColumnEngine * enginePtr_p
void putuCharV(uInt rownr, const uChar *dataPtr)
String dataManagerName() const
Return the name of the data manager.
Bool isShapeDefined(uInt rownr)
Is the value shape defined in the given row?
IPosition shape(uInt rownr)
Get the shape of the item in the given row.
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 getuIntV(uInt rownr, uInt *dataPtr)
PtrBlock< ForwardColumn * > refColumns_p
Define the various engine column objects.
void getdoubleV(uInt rownr, double *dataPtr)
int dataType() const
Get the data type of the column as defined in DataType.h.
void putuIntV(uInt rownr, const uInt *dataPtr)
TableOption
Define the possible options how a table can be opened.
Abstract base class for a table column.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.