28 #ifndef TABLES_BASEMAPPEDARRAYENGINE_H
29 #define TABLES_BASEMAPPEDARRAYENGINE_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/tables/DataMan/VirtColEng.h>
34 #include <casacore/tables/DataMan/VirtArrCol.h>
35 #include <casacore/casa/Arrays/IPosition.h>
40 template<
class T>
class ArrayColumn;
286 const String& storedColumnName);
488 template<
class VirtualType,
class StoredType>
491 {
return virtualName_p; }
493 template<
class VirtualType,
class StoredType>
496 {
return storedName_p; }
498 template<
class VirtualType,
class StoredType>
503 virtualName_p = virtualName;
504 storedName_p = storedName;
507 template<
class VirtualType,
class StoredType>
510 { isWritable_p = isWritable; }
512 template<
class VirtualType,
class StoredType>
515 {
return *column_p; }
521 #ifndef CASACORE_NO_AUTO_TEMPLATES
522 #include <casacore/tables/DataMan/BaseMappedArrayEngine.tcc>
virtual void mapOnPut(const Array< VirtualType > &array, Array< StoredType > &stored)
Map Bool array to bit flags array.
ArrayColumn< StoredType > & column()
Give access to the stored column.
void prepare1()
Do the 2 stages of the prepare (define columns and adding rows).
virtual void getArrayColumn(Array< VirtualType > &array)
Get an entire column.
virtual Slicer getStoredSlicer(const Slicer &virtualSlicer) const
Map the slicer for a virtual shape to a stored shape.
void setWritable(Bool isWritable)
Set if the column is writable or not.
virtual void mapOnGet(Array< VirtualType > &array, const Array< StoredType > &stored)
Map StoredType array to VirtualType array.
virtual void putArrayColumnCells(const RefRows &rownrs, const Array< VirtualType > &data)
Put some array values in the column.
void setNames(const String &virtualName, const String &storedName)
Set the virtual and stored column name.
virtual IPosition getStoredShape(rownr_t rownr, const IPosition &virtualShape)
Map the virtual shape to the stored shape.
virtual void getArrayColumnCells(const RefRows &rownrs, Array< VirtualType > &data)
Get some array values in the column.
virtual void putSlice(rownr_t rownr, const Slicer &slicer, const Array< VirtualType > &array)
Put into a section of the array in the given row.
void putColumnSlice(const Slicer &slicer, const Array< VirtualType > &array)
Put a section of all arrays in the column.
virtual Bool isShapeDefined(rownr_t rownr)
Test if the (underlying) array is defined in the given row.
virtual void setShapeColumn(const IPosition &shape)
Set the shape of the FixedShape arrays in the column.
virtual Bool canChangeShape() const
The data manager can handle changing the shape of an existing array when the underlying stored column...
const String & storedName() const
Get the stored column name.
ArrayColumn< StoredType > * column_p
virtual void putArray(rownr_t rownr, const Array< VirtualType > &array)
Put an array in the given row.
virtual void addRowInit(rownr_t startRow, rownr_t nrrow)
virtual IPosition shape(rownr_t rownr)
Get the shape of the (underlying) array in the given row.
virtual DataManagerColumn * makeIndArrColumn(const String &columnName, int dataType, const String &dataTypeId)
Create the column object for the array column in this engine.
void getColumnSlice(const Slicer &slicer, Array< VirtualType > &array)
Get a section of all arrays in the column.
virtual void getColumnSliceCells(const RefRows &rownrs, const Slicer &slicer, Array< VirtualType > &data)
Get a section of some arrays in the column.
virtual void create64(rownr_t initialNrrow)
Initialize the object for a new table.
~BaseMappedArrayEngine()
Destructor is mandatory.
virtual void addRow64(rownr_t nrrow)
Rows are added to the end of the table.
virtual Bool isWritable() const
The column is writable if the underlying stored column is writable.
virtual void putArrayColumn(const Array< VirtualType > &array)
Put an entire column.
BaseMappedArrayEngine(const BaseMappedArrayEngine< VirtualType, StoredType > &)
Copy constructor is only used by copy constructor of derived classes.
BaseMappedArrayEngine(const String &virtualColumnName, const String &storedColumnName)
Construct an engine to convert the virtual column to the stored column.
virtual uInt ndim(rownr_t rownr)
Get the dimensionality of the (underlying) array in the given row.
const String & virtualName() const
Get the virtual column name.
virtual void getArray(rownr_t rownr, Array< VirtualType > &array)
Get an array in the given row.
virtual void prepare()
Preparing consists of setting the writable switch and adding the initial number of rows in case of cr...
TableColumn makeTableColumn(const String &columnName)
Make a table column object for the given column.
BaseMappedArrayEngine()
The default constructor is required for reconstruction of the engine when a table is read back.
virtual void setShape(rownr_t rownr, const IPosition &shape)
Define the shape of the array in the given row.
virtual void putColumnSliceCells(const RefRows &rownrs, const Slicer &slicer, const Array< VirtualType > &data)
Put into a section of some arrays in the column.
virtual void getSlice(rownr_t rownr, const Slicer &slicer, Array< VirtualType > &array)
Get a section of the array in the given row.
const String & columnName() const
Get rhe column name.
String: the storage and methods of handling collections of characters.
virtual int dataType() const
Return the data type of the column.
virtual String dataTypeId() const
Return the data type Id of the column.
this file contains all the compiler specific defines
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
bool Bool
Define the standard types used by Casacore.
uInt64 rownr_t
Define the type of a row number in a table.