28 #ifndef TABLES_FORWARDCOLROW_H
29 #define TABLES_FORWARDCOLROW_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/tables/DataMan/ForwardCol.h>
34 #include <casacore/tables/Tables/ScalarColumn.h>
39 class ForwardColumnIndexedRowEngine;
95 const Table& referencedTable);
298 const String& rowColumnName,
308 const String& rowColumnName);
341 const String& dataTypeId);
346 const String& dataTypeId);
Non-templated base class for templated Array class.
const String & columnName() const
Get rhe column name.
Abstract base class for a data manager.
Virtual column engine forwarding to other columns.
String dataManagerName() const
Return the name of the data manager.
Virtual column engine forwarding to other columns/rows.
DataManager * clone() const
Clone the engine object.
ForwardColumnIndexedRowEngine(const String &dataManagerName, const Record &spec)
The default constructor is required for reconstruction of the engine when a table is read back.
PtrBlock< ForwardColumnIndexedRow * > refColumns_p
Define the various engine column objects.
static void registerClass()
Register the class name and the static makeObject "constructor".
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
void reopenRW()
Reopen the engine for read/write access.
void prepare()
Initialize the engine.
~ForwardColumnIndexedRowEngine()
Destructor is mandatory.
void create64(rownr_t initialNrrow)
Initialize the object for a new table.
DataManagerColumn * makeScalarColumn(const String &columnName, int dataType, const String &dataTypeId)
Create the column object for the scalar column in this engine.
ForwardColumnIndexedRowEngine(const ForwardColumnIndexedRowEngine &)
The copy constructor is forbidden (so it is private).
Int64 lastRow_p
Cache of last row used to get row number.
ScalarColumn< uInt > rowColumn_p
static String className()
Return the name of the class.
ForwardColumnIndexedRowEngine(const Table &referencedTable, const String &rowColumnName)
Create the engine.
DataManagerColumn * makeIndArrColumn(const String &columnName, int dataType, const String &dataTypeId)
Create the column object for the indirect array column in this engine.
ForwardColumnIndexedRowEngine(const Table &referencedTable, const String &rowColumnName, const String &dataManagerName)
Create the engine.
String rowColumnName_p
Define the column with the row numbers (must have data type uInt).
rownr_t convertRownr(rownr_t rownr)
Convert the rownr to the rownr in the underlying table.
String dataManagerType() const
Return the type name of the engine (i.e.
static DataManager * makeObject(const String &dataManagerName, const Record &spec)
Define the "constructor" to construct this engine when a table is read back.
virtual void getString(rownr_t rownr, String *dataPtr)
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 putuChar(rownr_t rownr, const uChar *dataPtr)
void getArrayV(rownr_t rownr, ArrayBase &dataPtr)
Get the array value in the given row.
virtual void putuShort(rownr_t rownr, const uShort *dataPtr)
virtual void putBool(rownr_t rownr, const Bool *dataPtr)
Put the scalar value with a standard data type into the given row.
virtual void getInt(rownr_t rownr, Int *dataPtr)
void putSliceV(rownr_t rownr, const Slicer &slicer, const ArrayBase &dataPtr)
Put into a section of the array in the given row.
void getSliceV(rownr_t rownr, const Slicer &slicer, ArrayBase &dataPtr)
Get a section of the array in the given row.
ForwardColumnIndexedRow & operator=(const ForwardColumnIndexedRow &)
Assignment is not needed and therefore forbidden (so make it private).
virtual void putInt(rownr_t rownr, const Int *dataPtr)
virtual void getOther(rownr_t rownr, void *dataPtr)
Get the scalar value with a non-standard data type in the given row.
void prepare(const Table &thisTable)
Initialize the object.
virtual void putuInt(rownr_t rownr, const uInt *dataPtr)
virtual void putString(rownr_t rownr, const String *dataPtr)
virtual void getInt64(rownr_t rownr, Int64 *dataPtr)
virtual void getfloat(rownr_t rownr, float *dataPtr)
ForwardColumnIndexedRow(ForwardColumnIndexedRowEngine *enginePtr, const String &columnName, int dataType, const String &dataTypeId, const Table &referencedTable)
Construct it for the given column.
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)
IPosition shape(rownr_t rownr)
Get the shape of the item in the given row.
virtual void putComplex(rownr_t rownr, const Complex *dataPtr)
ForwardColumnIndexedRow(const ForwardColumnIndexedRow &)
Copy constructor is not needed and therefore forbidden (so make it private).
virtual void getuInt(rownr_t rownr, uInt *dataPtr)
virtual void getuChar(rownr_t rownr, uChar *dataPtr)
ForwardColumnIndexedRowEngine * enginePtr_p
rownr_t convertRownr(rownr_t rownr)
Convert the rownr to the rownr in the underlying table.
virtual void getDComplex(rownr_t rownr, DComplex *dataPtr)
virtual void getuShort(rownr_t rownr, uShort *dataPtr)
virtual void putfloat(rownr_t rownr, const float *dataPtr)
Bool isShapeDefined(rownr_t rownr)
Is the value shape defined in the given row?
~ForwardColumnIndexedRow()
Destructor is mandatory.
void setShape(rownr_t rownr, const IPosition &shape)
Set the shape of an (indirect) array in the given row.
virtual void getComplex(rownr_t rownr, Complex *dataPtr)
virtual void putDComplex(rownr_t rownr, const DComplex *dataPtr)
uInt ndim(rownr_t rownr)
Get the dimensionality of the item in the given row.
Bool canChangeShape() const
This data manager cannot handle changing array shapes.
virtual void getShort(rownr_t rownr, Short *dataPtr)
virtual void putdouble(rownr_t rownr, const double *dataPtr)
virtual void getdouble(rownr_t rownr, double *dataPtr)
virtual void putInt64(rownr_t rownr, const Int64 *dataPtr)
int dataType() const
Get the data type of the column as defined in DataType.h.
String dataTypeId() const
Get the data type id of the column for dataType==TpOther.
A drop-in replacement for Block<T*>.
String: the storage and methods of handling collections of characters.
std::complex< Float > Complex
std::complex< Double > DComplex
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.