DataManager.h

Classes

Global Functions -- Define the type of the static "constructor" function. (full description)
DataManager -- Abstract base class for a data manager (full description)
DataManagerColumn -- Abstract base class for a column in a data manager (full description)

Define the type of the static "constructor" function. (source)

Interface

Description

Review Status

Reviewed By:
Gareth Hunt
Date Reviewed:
94Nov17

Synopsis

Class names of data managers and pointers to their associated constructor function are registered in a static map to be able to create the correct data manager object from a string giving the type name of the data manager. DataManagerCtor is the type of the constructor functions.

Member Description


class DataManager

Interface

Public Members
DataManager()
virtual ~DataManager()
virtual DataManager* clone() const = 0
virtual String dataManagerName() const
virtual String dataManagerType() const = 0
virtual Record dataManagerSpec() const
virtual Bool isStorageManager() const
virtual Bool canReallocateColumns() const
virtual DataManagerColumn* reallocateColumn (DataManagerColumn* column)
uInt sequenceNr() const
uInt ncolumn() const
Bool asBigEndian() const
String keywordName (const String& keyword) const
String fileName() const
ByteIO::OpenOption fileOption() const
Table& table() const
virtual void reopenRW()
virtual Bool canAddRow() const
virtual Bool canRemoveRow() const
virtual Bool canAddColumn() const
virtual Bool canRemoveColumn() const
virtual void setMaximumCacheSize (uInt nbytes)
DataManagerColumn* createScalarColumn (const String& columnName, int dataType, const String& dataTypeId)
DataManagerColumn* createDirArrColumn (const String& columnName, int dataType, const String& dataTypeId)
DataManagerColumn* createIndArrColumn (const String& columnName, int dataType, const String& dataTypeId)
virtual void deleteManager() = 0
Protected Members
void decrementNcolumn()
void setEndian (Bool bigEndian)
void throwDataTypeOther (const String& columnName, int dataType) const
Private Members
DataManager (const DataManager&)
DataManager& operator= (const DataManager&)
virtual DataManagerColumn* makeScalarColumn (const String& columnName, int dataType, const String& dataTypeId) = 0
virtual DataManagerColumn* makeDirArrColumn (const String& columnName, int dataType, const String& dataTypeId) = 0
virtual DataManagerColumn* makeIndArrColumn (const String& columnName, int dataType, const String& dataTypeId) = 0
void checkDataType (const DataManagerColumn* colPtr, const String& columnName, int dataType, const String& dataTypeId) const
virtual void addRow (uInt nrrow)
virtual void removeRow (uInt rownr)
virtual void addColumn (DataManagerColumn*)
virtual void removeColumn (DataManagerColumn*)
void setSeqnr (uInt nr)
void linkToTable (Table& tab)
virtual Bool flush (AipsIO& ios, Bool fsync) = 0
virtual void create (uInt nrrow) = 0
virtual void open (uInt nrrow, AipsIO& ios) = 0
virtual void resync (uInt nrrow) = 0
virtual void prepare()
Public Members
static void registerCtor (const String& dataManagerType, DataManagerCtor fn)
static DataManagerCtor getCtor (const String& dataManagerType)
static Bool isRegistered (const String& dataManagerType)
static void registerAllCtor()
static DataManager* unknownDataManager (const String& dataManagerType, const Record& spec)
DataManager* getClone() const
void setClone (DataManager* clone) const

Description

Review Status

Reviewed By:
Gareth Hunt
Date Reviewed:
94Nov17

Prerequisite

Synopsis

DataManager is the abstract base class for all kind of table data managers. There are currently 2 classes of data managers: DataManager contains some common data and defines several virtual functions, which usually have to be implemented in the derived classes. It also contains some helper functions for the derived classes (like fileName().

The actual handling of a column by the data manager is defined in the abstract base class DataManagerColumn. Each data manager must have an associated class (derived from DataManagerColumn) to handle the columns.

There is a protocol defined how a data manager is created and initialized. For a new table it is:

For an existing table the procedure is slightly different:

Motivation

An abstract base class is needed to support data managers and virtual column engines in the table system in a transparant way.

To Do

Member Description

DataManager()

Default constructor.

virtual ~DataManager()

virtual DataManager* clone() const = 0

Make a clone of the derived object.

virtual String dataManagerName() const

Return the name of the data manager. This is the name of this instantiation of the data manager, thus not its type name. By default it returns an empty string.

virtual String dataManagerType() const = 0

Return the type name of the data manager (in fact its class name). It has to be a unique name, thus if the class is templated the template parameter has to be part of the name. This is used by the open/flush mechanism to be able to reconstruct the correct data manager.

virtual Record dataManagerSpec() const

Record a record containing data manager specifications. The default impementation returns an empty record.

virtual Bool isStorageManager() const

Is the data manager a storage manager? The default is yes.

virtual Bool canReallocateColumns() const

Tell if the data manager wants to reallocate the data manager column objects. This is used by the tiling storage manager. By default it returns False.

virtual DataManagerColumn* reallocateColumn (DataManagerColumn* column)

Reallocate the column object if it is part of this data manager. It returns a pointer to the new column object. This function is used by the tiling storage manager. By default it does nothing and returns the input pointer.

uInt sequenceNr() const

Get the (unique) sequence nr of this data manager.

uInt ncolumn() const

Get the nr of columns in this data manager (can be zero).

Bool asBigEndian() const

Have the data to be stored in big or little endian canonical format?

String keywordName (const String& keyword) const

Compose a keyword name from the given keyword appended with the sequence number (e.g. key_0). This makes the keyword name unique if multiple data managers are used with the same type.

String fileName() const

Compose a unique filename from the table name and sequence number.

ByteIO::OpenOption fileOption() const

Get the AipsIO option of the underlying file.

Table& table() const

Get the table this object is associated with.

virtual void reopenRW()

Reopen the data manager for read/write access. By default it is assumed that a reopen for read/write does not have to do anything.

virtual Bool canAddRow() const

Does the data manager allow to add rows? (default no)

virtual Bool canRemoveRow() const

Does the data manager allow to delete rows? (default no)

virtual Bool canAddColumn() const

Does the data manager allow to add columns? (default no)

virtual Bool canRemoveColumn() const

Does the data manager allow to delete columns? (default no)

virtual void setMaximumCacheSize (uInt nbytes)

Set the maximum cache size (in bytes) to be used by a storage manager. The default implementation does nothing.

DataManagerColumn* createScalarColumn (const String& columnName, int dataType, const String& dataTypeId)

Create a column in the data manager on behalf of a table column. It calls makeXColumn and checks the data type.

Create a scalar column. The dataTypeId argument is gives the id (i.e. name) of the data type of the column. It is only used for virtual columns of a non-standard data type to be able to check if the correctness of the column data type.
Storage managers only handle standard data types and can readily ignore this argument.

DataManagerColumn* createDirArrColumn (const String& columnName, int dataType, const String& dataTypeId)

Create a column in the data manager on behalf of a table column. It calls makeXColumn and checks the data type.

Create a direct array column.

DataManagerColumn* createIndArrColumn (const String& columnName, int dataType, const String& dataTypeId)

Create a column in the data manager on behalf of a table column. It calls makeXColumn and checks the data type.

Create an indirect array column.

virtual void deleteManager() = 0

The data manager will be deleted (because all its columns are requested to be deleted). So clean up the things needed (e.g. delete files).

void decrementNcolumn()

Decrement number of columns (in case a column is deleted).

void setEndian (Bool bigEndian)

Tell the data manager if big or little endian format is needed.

void throwDataTypeOther (const String& columnName, int dataType) const

Throw an exception in case data type is TpOther, because the storage managers (and maybe other data managers) do not support such columns.

DataManager (const DataManager&)

The copy constructor cannot be used for this base class. The clone function should be used instead. The private declaration of this constructor makes it unusable.

DataManager& operator= (const DataManager&)

Assignment cannot be used for this base class. The private declaration of this operator makes it unusable.

virtual DataManagerColumn* makeScalarColumn (const String& columnName, int dataType, const String& dataTypeId) = 0

Create a column in the data manager on behalf of a table column.

Create a scalar column.

virtual DataManagerColumn* makeDirArrColumn (const String& columnName, int dataType, const String& dataTypeId) = 0

Create a column in the data manager on behalf of a table column.

Create a direct array column.

virtual DataManagerColumn* makeIndArrColumn (const String& columnName, int dataType, const String& dataTypeId) = 0

Create a column in the data manager on behalf of a table column.

Create an indirect array column.

void checkDataType (const DataManagerColumn* colPtr, const String& columnName, int dataType, const String& dataTypeId) const

Check if the data type of the created data manager column is correct.

virtual void addRow (uInt nrrow)

Add rows to all columns. The default implementation throws a "not possible" exception.

virtual void removeRow (uInt rownr)

Delete a row from all columns. The default implementation throws a "not possible" exception.

virtual void addColumn (DataManagerColumn*)

Add a column. The default implementation throws a "not possible" exception.

virtual void removeColumn (DataManagerColumn*)

Delete a column. The default implementation throws a "not possible" exception.

void setSeqnr (uInt nr)

Set the sequence number of this data manager.

void linkToTable (Table& tab)

Link the data manager to the Table object.

virtual Bool flush (AipsIO& ios, Bool fsync) = 0

Flush and optionally fsync the data. The AipsIO stream represents the main table file and can be used by virtual column engines to store SMALL amounts of data. It returns a True status if it had to flush (i.e. if data have changed).

virtual void create (uInt nrrow) = 0

Let the data manager initialize itself for a new table.

virtual void open (uInt nrrow, AipsIO& ios) = 0

Let the data manager initialize itself for an existing table. The AipsIO stream represents the main table file and must be used by virtual column engines to retrieve the data stored in the flush function.

virtual void resync (uInt nrrow) = 0

Resync the data by rereading cached data from the file. This is called when a lock is acquired on the file and it appears that data in this data manager has been changed by another process.

virtual void prepare()

Let the data manager initialize itself further. Prepare is called after create/open has been called for all columns. In this way one can be sure that referenced columns are read back and partly initialized. The default implementation does nothing.

static void registerCtor (const String& dataManagerType, DataManagerCtor fn)

Register a mapping of a data manager type to its static "constructor".

static DataManagerCtor getCtor (const String& dataManagerType)

Get the "constructor" of a data manager.

static Bool isRegistered (const String& dataManagerType)

Test if the data manager is registered.

static void registerAllCtor()

Register all mappings. This will be a bunch of register calls. It is implemented in DataManReg.cc. In this way it is easier to add new functions to it (or maybe eventually automate that process).

static DataManager* unknownDataManager (const String& dataManagerType, const Record& spec)

Serve as default function for registerMap, which catches all unknown data manager types.

Thrown Exceptions

DataManager* getClone() const

Has the object already been cloned?

void setClone (DataManager* clone) const

Set the pointer to the clone.


class DataManagerColumn

Interface

DataManagerColumn() : isFixedShape_p(False)
virtual ~DataManagerColumn()
void setIsFixedShape (Bool isFixedShape)
Bool isFixedShape() const
virtual int dataType() const = 0
virtual String dataTypeId() const
virtual Bool isWritable() const
virtual void setMaxLength (uInt maxLength)
void setFixedShapeColumn (const IPosition& shape)
virtual void setShape (uInt rownr, const IPosition& shape)
virtual void setShapeTiled (uInt rownr, const IPosition& shape, const IPosition& tileShape)
virtual Bool isShapeDefined (uInt rownr)
virtual uInt ndim (uInt rownr)
virtual IPosition shape (uInt rownr)
virtual Bool canChangeShape() const
virtual Bool canAccessScalarColumn (Bool& reask) const
virtual Bool canAccessScalarColumnCells (Bool& reask) const
virtual Bool canAccessArrayColumn (Bool& reask) const
virtual Bool canAccessArrayColumnCells (Bool& reask) const
virtual Bool canAccessSlice (Bool& reask) const
virtual Bool canAccessColumnSlice (Bool& reask) const
ColumnCache& columnCache()
const ColumnCache* columnCachePtr() const
void get (uInt rownr, Bool* dataPtr)
void get (uInt rownr, uChar* dataPtr)
void get (uInt rownr, Short* dataPtr)
void get (uInt rownr, uShort* dataPtr)
void get (uInt rownr, Int* dataPtr)
void get (uInt rownr, uInt* dataPtr)
void get (uInt rownr, float* dataPtr)
void get (uInt rownr, double* dataPtr)
void get (uInt rownr, Complex* dataPtr)
void get (uInt rownr, DComplex* dataPtr)
void get (uInt rownr, String* dataPtr)
void get (uInt rownr, void* dataPtr)
void put (uInt rownr, const Bool* dataPtr)
void put (uInt rownr, const uChar* dataPtr)
void put (uInt rownr, const Short* dataPtr)
void put (uInt rownr, const uShort* dataPtr)
void put (uInt rownr, const Int* dataPtr)
void put (uInt rownr, const uInt* dataPtr)
void put (uInt rownr, const float* dataPtr)
void put (uInt rownr, const double* dataPtr)
void put (uInt rownr, const Complex* dataPtr)
void put (uInt rownr, const DComplex* dataPtr)
void put (uInt rownr, const String* dataPtr)
void put (uInt rownr, const void* dataPtr)
virtual void getScalarColumnV (void* dataPtr)
virtual void putScalarColumnV (const void* dataPtr)
virtual void getScalarColumnCellsV (const RefRows& rownrs, void* dataPtr)
virtual void putScalarColumnCellsV (const RefRows& rownrs, const void* dataPtr)
virtual uInt getBlockV (uInt rownr, uInt nrmax, void* dataPtr)
virtual void putBlockV (uInt rownr, uInt nrmax, const void* dataPtr)
virtual void getArrayV (uInt rownr, void* dataPtr)
virtual void putArrayV (uInt rownr, const void* dataPtr)
virtual void getArrayColumnV (void* dataPtr)
virtual void putArrayColumnV (const void* dataPtr)
virtual void getArrayColumnCellsV (const RefRows& rownrs, void* dataPtr)
virtual void putArrayColumnCellsV (const RefRows& rownrs, const void* dataPtr)
virtual void getSliceV (uInt rownr, const Slicer& slicer, void* dataPtr)
virtual void putSliceV (uInt rownr, const Slicer& slicer, const void* dataPtr)
virtual void getColumnSliceV (const Slicer& slicer, void* dataPtr)
virtual void putColumnSliceV (const Slicer& slicer, const void* dataPtr)
virtual void getColumnSliceCellsV (const RefRows& rownrs, const Slicer& slicer, void* dataPtr)
virtual void putColumnSliceCellsV (const RefRows& rownrs, const Slicer& slicer, const void* dataPtr)
void throwGet() const
void throwPut() const
Protected Members
virtual void getBoolV (uInt rownr, Bool* dataPtr)
virtual void getuCharV (uInt rownr, uChar* dataPtr)
virtual void getShortV (uInt rownr, Short* dataPtr)
virtual void getuShortV (uInt rownr, uShort* dataPtr)
virtual void getIntV (uInt rownr, Int* dataPtr)
virtual void getuIntV (uInt rownr, uInt* dataPtr)
virtual void getfloatV (uInt rownr, float* dataPtr)
virtual void getdoubleV (uInt rownr, double* dataPtr)
virtual void getComplexV (uInt rownr, Complex* dataPtr)
virtual void getDComplexV (uInt rownr, DComplex* dataPtr)
virtual void getStringV (uInt rownr, String* dataPtr)
virtual void getOtherV (uInt rownr, void* dataPtr)
virtual void putBoolV (uInt rownr, const Bool* dataPtr)
virtual void putuCharV (uInt rownr, const uChar* dataPtr)
virtual void putShortV (uInt rownr, const Short* dataPtr)
virtual void putuShortV (uInt rownr, const uShort* dataPtr)
virtual void putIntV (uInt rownr, const Int* dataPtr)
virtual void putuIntV (uInt rownr, const uInt* dataPtr)
virtual void putfloatV (uInt rownr, const float* dataPtr)
virtual void putdoubleV (uInt rownr, const double* dataPtr)
virtual void putComplexV (uInt rownr, const Complex* dataPtr)
virtual void putDComplexV (uInt rownr, const DComplex* dataPtr)
virtual void putStringV (uInt rownr, const String* dataPtr)
virtual void putOtherV (uInt rownr, const void* dataPtr)
Private Members
virtual void setShapeColumn (const IPosition& shape)
DataManagerColumn (const DataManagerColumn&)
DataManagerColumn& operator= (const DataManagerColumn&)

Description

Review Status

Reviewed By:
Gareth Hunt
Date Reviewed:
94Nov17

Prerequisite

Etymology

DataManagerColumn handles a column for a data manager.

Synopsis

DataManagerColumn is the abstract base class to handle a column in a data manager. Each data manager class must have one or more associated classes derived from DataManagerColumn to handle the columns. For example, storage manager StManAipsIO has columns classes StManColumnAipsIO, StManColumnArrayAipsIO and StManColumnIndArrayAipsIO to handle scalars, direct arrays and indirect arrays, resp.. However, using multiple inheritance it is possible that the derived DataManager and DataManagerColumn classes are the same. This is used in class ScaledArrayEngine which represents both the data manager and its column class. It can do that, because the virtual column engine ScaledArrayEngine can handle only one column.

In the synopsis of class DataManager it is described how the (derived) DataManagerColumn objects gets created and deleted.

DataManagerColumn defines various virtual functions to get or put (slices) of data in a column. These functions are called by the table column classes ScalarColumnData and ArrayColumnData. It does not define functions create, open, flush and prepare like those defined in DataManager. It is left to the derived classes to define those as needed and to interact properly with their data manager object.

Motivation

An abstract base class is needed to support multiple data managers in the table system

To Do

Member Description

DataManagerColumn() : isFixedShape_p(False)

Create a column.

virtual ~DataManagerColumn()

Frees up the storage.

void setIsFixedShape (Bool isFixedShape)

Set the isFixedShape flag.

Bool isFixedShape() const

Is this a fixed shape column?

virtual int dataType() const = 0

Get the data type of the column as defined in DataType.h.

virtual String dataTypeId() const

Get the data type id of the column for dataType==TpOther. The default implementation returns an emptry string. This function is required for virtual column engines handling non-standard data types. It is used to check the data type.

virtual Bool isWritable() const

Test if data can be put into this column. This does not test if the data file is writable, only if it is in principle allowed to store data into the column. (It may not be allowed for virtual columns). The default is True.

virtual void setMaxLength (uInt maxLength)

Set the maximum length of the value (can be used for strings). By default the maximum length is ignored.

void setFixedShapeColumn (const IPosition& shape)

Set the shape of all (fixed-shaped) arrays in the column. Effectively it is the same as setShapeColumn, but it also sets the isFixedShape_p flag.

virtual void setShape (uInt rownr, const IPosition& shape)

Set the shape of an (variable-shaped) array in the given row. By default it throws a "not possible" exception.

virtual void setShapeTiled (uInt rownr, const IPosition& shape, const IPosition& tileShape)

Set the shape and tile shape of an (variable-shaped) array in the given row. By default it ignores the tile shape (thus only sets the shape).

virtual Bool isShapeDefined (uInt rownr)

Is the value shape defined in the given row? By default it returns True.

virtual uInt ndim (uInt rownr)

Get the dimensionality of the item in the given row. By default it returns shape(rownr).nelements().

virtual IPosition shape (uInt rownr)

Get the shape of the item in the given row. By default it returns a zero-length IPosition (for a scalar value).

virtual Bool canChangeShape() const

Can the data manager handle chaging the shape of an existing array? Default is no.

virtual Bool canAccessScalarColumn (Bool& reask) const

Can the column data manager handle access to a scalar column? If not, the caller should access the column by looping through all cells in the column. Default is no.
The returned reask switch determines if the information is permanent. False indicates it is permanent; True indicates it will be reasked for the next get/putColumn. By default reask is set to False.

virtual Bool canAccessScalarColumnCells (Bool& reask) const

Can the column data manager handle access to a clooection of cells in a scalar column? If not, the caller should access the column cells by looping through the cells in the column. Default is no.
The returned reask switch determines if the information is permanent. False indicates it is permanent; True indicates it will be reasked for the next get/putColumn. By default reask is set to False.

virtual Bool canAccessArrayColumn (Bool& reask) const

Can the column data manager handle access to a scalar column? If not, the caller should access the column by looping through all cells in the column. Default is no.
The returned reask switch determines if the information is permanent. False indicates it is permanent; True indicates it will be reasked for the next get/putColumn. By default reask is set to False.

virtual Bool canAccessArrayColumnCells (Bool& reask) const

Can the column data manager handle access to a collection of cells in an array column? If not, the caller should access the column cells by looping through the cells in the column. Default is no.
The returned reask switch determines if the information is permanent. False indicates it is permanent; True indicates it will be reasked for the next get/putColumn. By default reask is set to False.

virtual Bool canAccessSlice (Bool& reask) const

Can the column data manager handle access to a cell slice? If not, the caller should do slicing itself (by accessing the entire array and slicing it). Default is no.
The returned reask switch determines if the information is permanent. False indicates it is permanent; True indicates it will be reasked for the next get/putColumn. By default reask is set to False.

virtual Bool canAccessColumnSlice (Bool& reask) const

Can the column data manager handle access to a column slice? If not, the caller should access the column slice by looping through all cell slices in the column. Default is no.
The returned reask switch determines if the information is permanent. False indicates it is permanent; True indicates it will be reasked for the next get/putColumn. By default reask is set to False.

ColumnCache& columnCache()
const ColumnCache* columnCachePtr() const

Get access to the ColumnCache object.

void get (uInt rownr, void* dataPtr)

Get the scalar value in the given row. These functions are non-virtual and are converted to their virtual getV equivalent to achieve that a derived templated class (like VirtualScalarColumn) does not have to declare and implement all these functions. The compiler complains about hiding virtual functions if you do not declare all virtual functions with the same name in a derived class.

This function is the get for all non-standard data types.

void get (uInt rownr, Bool* dataPtr)
void get (uInt rownr, uChar* dataPtr)
void get (uInt rownr, Short* dataPtr)
void get (uInt rownr, uShort* dataPtr)
void get (uInt rownr, Int* dataPtr)
void get (uInt rownr, uInt* dataPtr)
void get (uInt rownr, float* dataPtr)
void get (uInt rownr, double* dataPtr)
void get (uInt rownr, Complex* dataPtr)
void get (uInt rownr, DComplex* dataPtr)
void get (uInt rownr, String* dataPtr)

Get the scalar value in the given row. These functions are non-virtual and are converted to their virtual getV equivalent to achieve that a derived templated class (like VirtualScalarColumn) does not have to declare and implement all these functions. The compiler complains about hiding virtual functions if you do not declare all virtual functions with the same name in a derived class.

void put (uInt rownr, const void* dataPtr)

Put the scalar value into the given row. These functions are non-virtual and are converted to their virtual putV equivalent to achieve that a derived templated class (like VirtualScalarColumn) does not have to declare and implement all these functions. The compiler complains about hiding virtual functions if you do not declare all virtual functions with the same name in a derived class.

This function is the put for all non-standard data types.

void put (uInt rownr, const Bool* dataPtr)
void put (uInt rownr, const uChar* dataPtr)
void put (uInt rownr, const Short* dataPtr)
void put (uInt rownr, const uShort* dataPtr)
void put (uInt rownr, const Int* dataPtr)
void put (uInt rownr, const uInt* dataPtr)
void put (uInt rownr, const float* dataPtr)
void put (uInt rownr, const double* dataPtr)
void put (uInt rownr, const Complex* dataPtr)
void put (uInt rownr, const DComplex* dataPtr)
void put (uInt rownr, const String* dataPtr)

Put the scalar value into the given row. These functions are non-virtual and are converted to their virtual putV equivalent to achieve that a derived templated class (like VirtualScalarColumn) does not have to declare and implement all these functions. The compiler complains about hiding virtual functions if you do not declare all virtual functions with the same name in a derived class.

virtual void getScalarColumnV (void* dataPtr)

Get all scalar values in the column. The argument dataPtr is in fact a Vector*, but a void* is needed to be generic. The vector pointed to by dataPtr has to have the correct length (which is guaranteed by the ScalarColumn getColumn function). The default implementation throws an "invalid operation" exception.

virtual void putScalarColumnV (const void* dataPtr)

Put all scalar values in the column. The argument dataPtr is in fact a const Vector*, but a const void* is needed to be generic. The vector pointed to by dataPtr has to have the correct length (which is guaranteed by the ScalarColumn putColumn function). The default implementation throws an "invalid operation" exception.

virtual void getScalarColumnCellsV (const RefRows& rownrs, void* dataPtr)

Get some scalar values in the column. The argument dataPtr is in fact a Vector*, but a void* is needed to be generic. The vector pointed to by dataPtr has to have the correct length (which is guaranteed by the ScalarColumn getColumn function). The default implementation throws an "invalid operation" exception.

virtual void putScalarColumnCellsV (const RefRows& rownrs, const void* dataPtr)

Put some scalar values in the column. The argument dataPtr is in fact a const Vector*, but a const void* is needed to be generic. The vector pointed to by dataPtr has to have the correct length (which is guaranteed by the ScalarColumn getColumn function). The default implementation throws an "invalid operation" exception.

virtual uInt getBlockV (uInt rownr, uInt nrmax, void* dataPtr)

Get scalars from the given row on with a maximum of nrmax values. It returns the actual number of values got. This can be used to get an entire column of scalars or to get a part of a column (for a cache for example). The argument dataPtr is in fact a T*, but a void* is needed to be generic. The default implementation throws an "invalid operation" exception.

virtual void putBlockV (uInt rownr, uInt nrmax, const void* dataPtr)

Put nrmax scalars from the given row on. It returns the actual number of values put. This can be used to put an entire column of scalars or to put a part of a column (for a cache for example). The argument dataPtr is in fact a const T*, but a const void* is needed to be generic. The default implementation throws an "invalid operation" exception.

virtual void getArrayV (uInt rownr, void* dataPtr)

Get the array value in the given row. The argument dataPtr is in fact an Array*, but a void* is needed to be generic. The array pointed to by dataPtr has to have the correct shape (which is guaranteed by the ArrayColumn get function). The default implementation throws an "invalid operation" exception.

virtual void putArrayV (uInt rownr, const void* dataPtr)

Put the array value into the given row. The argument dataPtr is in fact a const Array*, but a const void* is needed to be generic. The array pointed to by dataPtr has to have the correct shape (which is guaranteed by the ArrayColumn put function). The default implementation throws an "invalid operation" exception.

virtual void getArrayColumnV (void* dataPtr)

Get all array values in the column. The argument dataPtr is in fact an Array*, but a void* is needed to be generic. The vector pointed to by dataPtr has to have the correct length (which is guaranteed by the ArrayColumn getColumn function). The default implementation throws an "invalid operation" exception.

virtual void putArrayColumnV (const void* dataPtr)

Put all array values in the column. The argument dataPtr is in fact a const Array*, but a const void* is needed to be generic. The vector pointed to by dataPtr has to have the correct length (which is guaranteed by the ArrayColumn putColumn function). The default implementation throws an "invalid operation" exception.

virtual void getArrayColumnCellsV (const RefRows& rownrs, void* dataPtr)

Get some array values in the column. The argument dataPtr is in fact an Array*, but a void* is needed to be generic. The vector pointed to by dataPtr has to have the correct length (which is guaranteed by the ArrayColumn getColumn function). The default implementation throws an "invalid operation" exception.

virtual void putArrayColumnCellsV (const RefRows& rownrs, const void* dataPtr)

Put some array values in the column. The argument dataPtr is in fact an const Array*, but a const void* is needed to be generic. The vector pointed to by dataPtr has to have the correct length (which is guaranteed by the ArrayColumn getColumn function). The default implementation throws an "invalid operation" exception.

virtual void getSliceV (uInt rownr, const Slicer& slicer, void* dataPtr)

Get a section of the array in the given row. The argument dataPtr is in fact an Array*, but a void* is needed to be generic. The array pointed to by dataPtr has to have the correct shape (which is guaranteed by the ArrayColumn getSlice function). The default implementation throws an "invalid operation" exception.

virtual void putSliceV (uInt rownr, const Slicer& slicer, const void* dataPtr)

Put into a section of the array in the given row. The argument dataPtr is in fact a const Array*, but a const void* is needed to be generic. The array pointed to by dataPtr has to have the correct shape (which is guaranteed by the ArrayColumn putSlice function). The default implementation throws an "invalid operation" exception.

virtual void getColumnSliceV (const Slicer& slicer, void* dataPtr)

Get a section of all arrays in the column. The argument dataPtr is in fact an Array*, but a void* is needed to be generic. The array pointed to by dataPtr has to have the correct shape (which is guaranteed by the ArrayColumn getColumn function). The default implementation throws an "invalid operation" exception.

virtual void putColumnSliceV (const Slicer& slicer, const void* dataPtr)

Put into a section of all arrays in the column. The argument dataPtr is in fact a const Array*, but a const void* is needed to be generic. The array pointed to by dataPtr has to have the correct shape (which is guaranteed by the ArrayColumn putColumn function). The default implementation throws an "invalid operation" exception.

virtual void getColumnSliceCellsV (const RefRows& rownrs, const Slicer& slicer, void* dataPtr)

Get a section of some arrays in the column. The argument dataPtr is in fact an Array*, but a void* is needed to be generic. The array pointed to by dataPtr has to have the correct shape (which is guaranteed by the ArrayColumn getColumn function). The default implementation throws an "invalid operation" exception.

virtual void putColumnSliceCellsV (const RefRows& rownrs, const Slicer& slicer, const void* dataPtr)

Put into a section of some arrays in the column. The argument dataPtr is in fact a const Array*, but a const void* is needed to be generic. The array pointed to by dataPtr has to have the correct shape (which is guaranteed by the ArrayColumn putColumn function). The default implementation throws an "invalid operation" exception.

void throwGet() const

Throw an "invalid operation" exception for the default implementation of get.

void throwPut() const

Throw an "invalid operation" exception for the default implementation of put.

virtual void getOtherV (uInt rownr, void* dataPtr)

Get the scalar value in the given row. The default implementation throws an "invalid operation" exception.

This function is the get for all non-standard data types.

virtual void getBoolV (uInt rownr, Bool* dataPtr)
virtual void getuCharV (uInt rownr, uChar* dataPtr)
virtual void getShortV (uInt rownr, Short* dataPtr)
virtual void getuShortV (uInt rownr, uShort* dataPtr)
virtual void getIntV (uInt rownr, Int* dataPtr)
virtual void getuIntV (uInt rownr, uInt* dataPtr)
virtual void getfloatV (uInt rownr, float* dataPtr)
virtual void getdoubleV (uInt rownr, double* dataPtr)
virtual void getComplexV (uInt rownr, Complex* dataPtr)
virtual void getDComplexV (uInt rownr, DComplex* dataPtr)
virtual void getStringV (uInt rownr, String* dataPtr)

Get the scalar value in the given row. The default implementation throws an "invalid operation" exception.

virtual void putOtherV (uInt rownr, const void* dataPtr)

Put the scalar value into the given row. The default implementation throws an "invalid operation" exception.

This function is the put for all non-standard data types.

virtual void putBoolV (uInt rownr, const Bool* dataPtr)
virtual void putuCharV (uInt rownr, const uChar* dataPtr)
virtual void putShortV (uInt rownr, const Short* dataPtr)
virtual void putuShortV (uInt rownr, const uShort* dataPtr)
virtual void putIntV (uInt rownr, const Int* dataPtr)
virtual void putuIntV (uInt rownr, const uInt* dataPtr)
virtual void putfloatV (uInt rownr, const float* dataPtr)
virtual void putdoubleV (uInt rownr, const double* dataPtr)
virtual void putComplexV (uInt rownr, const Complex* dataPtr)
virtual void putDComplexV (uInt rownr, const DComplex* dataPtr)
virtual void putStringV (uInt rownr, const String* dataPtr)

Put the scalar value into the given row. The default implementation throws an "invalid operation" exception.

virtual void setShapeColumn (const IPosition& shape)

Set the shape of all (fixed-shaped) arrays in the column. By default it throws a "not possible" exception.

DataManagerColumn (const DataManagerColumn&)

The copy constructor cannot be used for this base class. The private declaration of this constructor makes it unusable.

DataManagerColumn& operator= (const DataManagerColumn&)

Assignment cannot be used for this base class. The private declaration of this operator makes it unusable.