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);
254 const void* dataPtr);
312 const void* dataPtr);
334 const Slicer& slicer,
void* dataPtr);
343 const void* dataPtr);
426 const String& dataManagerName);
441 String dataManagerName()
const;
444 String dataManagerType()
const;
447 virtual Record dataManagerSpec()
const;
450 const String& suffix()
const;
453 static String className();
457 static void registerClass();
461 void setSuffix (
const String& suffix);
468 {
return refTable_p; }
484 Bool canAddRow()
const;
487 Bool canRemoveRow()
const;
491 void addRow (
uInt nrrow);
495 void removeRow (
uInt rownr);
498 Bool canAddColumn()
const;
501 Bool canRemoveColumn()
const;
517 const String& dataTypeId);
522 void create (
uInt initialNrrow);
553 void setRefTable (
const Table& refTable);
571 { suffix_p = suffix; }
A Vector of integers, for indexing into Array<T> objects.
void putStringV(uInt rownr, const String *dataPtr)
Abstract base class for virtual column handling.
void putColumnSliceV(const Slicer &slicer, const void *dataPtr)
Put a section into all arrays in the column.
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.
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.
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.
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 ...
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)
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 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 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.
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.
uInt ndim(uInt rownr)
Get the dimensionality of the item in the given row.
ForwardColumn(ForwardColumnEngine *enginePtr, const String &columnName, int dataType, const String &dataTypeId, const Table &referencedTable)
Construct it for the given column.
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.
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 getBoolV(uInt rownr, Bool *dataPtr)
Get the scalar value with a standard data type in the given row.
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 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.
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.
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.
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)
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.
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.
this file contains all the compiler specific defines
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.