Go to the documentation of this file.
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>
523 #endif //# CASACORE_NO_AUTO_TEMPLATES
virtual void mapOnPut(const Array< VirtualType > &array, Array< StoredType > &stored)
Map Bool array to bit flags array.
Specify which elements to extract from an n-dimensional array.
virtual void getSlice(uInt rownr, const Slicer &slicer, Array< VirtualType > &array)
Get a section of the array in the given row.
BaseMappedArrayEngine()
The default constructor is required for reconstruction of the engine when a table is read back.
virtual void setShapeColumn(const IPosition &shape)
Set the shape of the FixedShape arrays in the column.
TableColumn makeTableColumn(const String &columnName)
Make a table column object for the given column.
void getColumnSlice(const Slicer &slicer, Array< VirtualType > &array)
Get a section of all arrays in the column.
A Vector of integers, for indexing into Array<T> objects.
virtual void setShape(uInt rownr, const IPosition &shape)
Define the shape of the array in the given row.
Templated virtual column engine for a table array of any type.
Read/write access to a table column.
BaseMappedArrayEngine(const String &virtualColumnName, const String &storedColumnName)
Construct an engine to convert the virtual column to the stored column.
virtual void getColumnSliceCells(const RefRows &rownrs, const Slicer &slicer, Array< VirtualType > &data)
Get a section of some arrays in the column.
void putColumnSlice(const Slicer &slicer, const Array< VirtualType > &array)
Put a section of all arrays in the column.
virtual Bool isShapeDefined(uInt rownr)
Test if the (underlying) array is defined in the given row.
void setNames(const String &virtualName, const String &storedName)
Set the virtual and stored column name.
virtual int dataType() const
Return the data type of the column.
Abstract base class for a column in a data manager.
void prepare1()
Do the 2 stages of the prepare (define columns and adding rows).
virtual void putArrayColumn(const Array< VirtualType > &array)
Put an entire column.
const String & columnName() const
Get rhe column name.
virtual void addRow(uInt nrrow)
Rows are added to the end of the table.
virtual Slicer getStoredSlicer(const Slicer &virtualSlicer) const
Map the slicer for a virtual shape to a stored shape.
Class holding the row numbers in a RefTable.
virtual void getArrayColumn(Array< VirtualType > &array)
Get an entire column.
virtual uInt ndim(uInt rownr)
Get the dimensionality of the (underlying) array in the given row.
virtual IPosition getStoredShape(uInt rownr, const IPosition &virtualShape)
Map the virtual shape to the stored shape.
virtual Bool isWritable() const
The column is writable if the underlying stored column is writable.
Templated base class for virtual array column.
virtual String dataTypeId() const
Return the data type Id of the column.
Abstract base class for virtual column handling.
virtual Bool canChangeShape() const
The data manager can handle changing the shape of an existing array when the underlying stored column...
virtual DataManagerColumn * makeIndArrColumn(const String &columnName, int dataType, const String &dataTypeId)
Create the column object for the array column in this engine.
virtual void getArray(uInt rownr, Array< VirtualType > &array)
Get an array in the given row.
~BaseMappedArrayEngine()
Destructor is mandatory.
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.
const String & storedName() const
Get the stored column name.
virtual void putSlice(uInt rownr, const Slicer &slicer, const Array< VirtualType > &array)
Put into a section of the array in the given row.
ArrayColumn< StoredType > * column_p
const String & virtualName() const
Get the virtual column name.
ArrayColumn< StoredType > & column()
Give access to the stored column.
virtual void addRowInit(uInt startRow, uInt nrrow)
virtual void getArrayColumnCells(const RefRows &rownrs, Array< VirtualType > &data)
Get some array values in the column.
virtual IPosition shape(uInt rownr)
Get the shape of the (underlying) array in the given row.
void setWritable(Bool isWritable)
Set if the column is writable or not.
virtual void putArrayColumnCells(const RefRows &rownrs, const Array< VirtualType > &data)
Put some array values in the column.
template <class T, class U> class vector;
virtual void mapOnGet(Array< VirtualType > &array, const Array< StoredType > &stored)
Map StoredType array to VirtualType array.
String: the storage and methods of handling collections of characters.
virtual void create(uInt initialNrrow)
Initialize the object for a new table.
BaseMappedArrayEngine(const BaseMappedArrayEngine< VirtualType, StoredType > &)
Copy constructor is only used by copy constructor of derived classes.
bool Bool
Define the standard types used by Casacore.
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 prepare()
Preparing consists of setting the writable switch and adding the initial number of rows in case of cr...
virtual void putArray(uInt rownr, const Array< VirtualType > &array)
Put an array in the given row.