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);
428 const String& dataManagerName);
443 String dataManagerName()
const;
446 String dataManagerType()
const;
449 virtual Record dataManagerSpec()
const;
452 const String& suffix()
const;
455 static String className();
459 static void registerClass();
463 void setSuffix (
const String& suffix);
470 {
return refTable_p; }
486 Bool canAddRow()
const;
489 Bool canRemoveRow()
const;
493 void addRow (
uInt nrrow);
497 void removeRow (
uInt rownr);
500 Bool canAddColumn()
const;
503 Bool canRemoveColumn()
const;
519 const String& dataTypeId);
524 void create (
uInt initialNrrow);
555 void setRefTable (
const Table& refTable);
573 { 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.
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.
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.
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.
Bool canAccessSlice(Bool &reask) const
This data manager may be able to do get/putSlice.
const String & columnName() const
Get rhe column name.
void getDComplexV(uInt rownr, DComplex *dataPtr)
void getuShortV(uInt rownr, uShort *dataPtr)
void putInt64V(uInt rownr, const Int64 *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.
int dataType() const
Get the data type of the column as defined in DataType.h.
void getfloatV(uInt rownr, float *dataPtr)
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)
String dataManName_p
The name of the data manager.
String suffix_p
The suffix to be used in names.
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.
Bool canAccessColumnSlice(Bool &reask) const
This data manager may be able to do get/putColumnSlice.
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.
Bool canAccessScalarColumn(Bool &reask) const
This data manager may be able to do get/putScalarColumn.
Bool canAccessArrayColumn(Bool &reask) const
This data manager may be able to do get/putArrayColumn.
virtual ~ForwardColumn()
Destructor is mandatory.
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.
String dataTypeId() const
Get the data type id of the column for dataType==TpOther.
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.
const Table & refTable() const
Get access to the refTable_p data member.
Read/write access to a table column.
void getShortV(uInt rownr, Short *dataPtr)
A drop-in replacement for Block<T*>.
Bool isWritable() const
Test if data can be put into this column.
BaseColumn * colPtr() const
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.
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.
const String & suffix() const
Get the suffix to be used for names.
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)
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)
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.