VirtArrCol.h

Classes

VirtualArrayColumn -- Templated base class for virtual array column (full description)

class VirtualArrayColumn : public DataManagerColumn

Interface

Public Members
VirtualArrayColumn()
virtual ~VirtualArrayColumn()
virtual int dataType() const
virtual String dataTypeId() const
virtual Bool isWritable() const
virtual Bool canAccessSlice (Bool& reask) const
virtual Bool canAccessArrayColumn (Bool& reask) const
virtual Bool canAccessColumnSlice (Bool& reask) const
Protected Members
virtual void setShapeColumn (const IPosition& shape)
virtual void setShape (uInt rownr, const IPosition& shape)
virtual Bool isShapeDefined (uInt rownr)
virtual uInt ndim (uInt rownr)
virtual IPosition shape (uInt rownr)
virtual void getArray (uInt rownr, Array<T>& data) = 0
virtual void putArray (uInt rownr, const Array<T>& data)
virtual void getSlice (uInt rownr, const Slicer& slicer, Array<T>& data)
virtual void putSlice (uInt rownr, const Slicer& slicer, const Array<T>& data)
virtual void getArrayColumn (Array<T>& data)
virtual void putArrayColumn (const Array<T>& data)
virtual void getArrayColumnCells (const RefRows& rownrs, Array<T>& data)
virtual void putArrayColumnCells (const RefRows& rownrs, const Array<T>& data)
virtual void getColumnSlice (const Slicer& slicer, Array<T>& data)
virtual void putColumnSlice (const Slicer& slicer, const Array<T>& data)
virtual void getColumnSliceCells (const RefRows& rownrs, const Slicer& slicer, Array<T>& data)
virtual void putColumnSliceCells (const RefRows& rownrs, const Slicer& slicer, const Array<T>& data)
Private Members
void getArrayV (uInt rownr, void* dataPtr)
void putArrayV (uInt rownr, const void* dataPtr)
void getArrayColumnCellsV (const RefRows& rownrs, void* dataPtr)
void putArrayColumnCellsV (const RefRows& rownrs, const void* dataPtr)
void getSliceV (uInt rownr, const Slicer& slicer, void* dataPtr)
void putSliceV (uInt rownr, const Slicer& slicer, const void* dataPtr)
void getArrayColumnV (void* dataPtr)
void putArrayColumnV (const void* dataPtr)
void getColumnSliceV (const Slicer& slicer, void* dataPtr)
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)
VirtualArrayColumn (const VirtualArrayColumn<T>&)
VirtualArrayColumn<T>& operator= (const VirtualArrayColumn<T>&)

Description

Review Status

Reviewed By:
Gareth Hunt
Date Reviewed:
94Nov17

Prerequisite

Etymology

VirtualArrayColumn handles a virtual column containing an array.

Synopsis

VirtualArrayColumn is the abstract base class to handle an array column for a virtual column engine (both direct and indirect arrays). It is derived from DataManagerColumn and reimplements some virtual functions to make life easier for the derived classes. It does the following: An example of a virtual array column class is ScaledComplexData. Note that this class is (indirectly) multiple derived from VirtualColumnEngine and VirtualArrayColumn, so it combines the functionality of DataManager and DataManagerColumn. This is possible, because one ScaledComplexData engine can handle only one column.

Motivation

This class reimplements some virtual functions implemented by DataManagerColumn and types the data argument. In that way they are easier to implement in derived classes. Furthermore they allow default implementations.

Template Type Argument Requirements (T)

To Do

Member Description

VirtualArrayColumn()

Create a column.

virtual ~VirtualArrayColumn()

Frees up the storage.

virtual int dataType() const

Return the data type of the column.

virtual String dataTypeId() const

Return the data type Id of the column.

virtual Bool isWritable() const

By default no data can be put in a virtual column.

virtual Bool canAccessSlice (Bool& reask) const

The class can handle a get/putSlice.

virtual Bool canAccessArrayColumn (Bool& reask) const

The class can handle a get/putArrayColumn.

virtual Bool canAccessColumnSlice (Bool& reask) const

The class can handle a get/putColumnSlice.

virtual void setShapeColumn (const IPosition& shape)

Set the shape of all arrays in the column. It is only called if the column contains direct arrays. By default it throws a "not possible" exception.

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

Set the shape of an array in the given row. It is only called if the column contains indirect arrays. By default it throws a "not possible" exception.

virtual Bool isShapeDefined (uInt rownr)

Is the value shape defined in the given row? By default it throws a "not possible" exception.

virtual uInt ndim (uInt rownr)

Get the dimensionality of the item in the given row. By default it throws a "not possible" exception.

virtual IPosition shape (uInt rownr)

Get the shape of the item in the given row. By default it throws a "not possible" exception.

virtual void getArray (uInt rownr, Array<T>& data) = 0

Get the array value in the given row. The data array has to have the correct shape (which is guaranteed by the ArrayColumn::get function).

virtual void putArray (uInt rownr, const Array<T>& data)

Put the array value into the given row. The data array has to have the correct shape (which is guaranteed by the ArrayColumn::put function). By default it throws a "not possible" exception.

virtual void getSlice (uInt rownr, const Slicer& slicer, Array<T>& data)

Get a section of the array in the given row. The data array has to have the correct shape (which is guaranteed by the ArrayColumn::getSlice function). The default implementation gets the slice by getting the full array first.

virtual void putSlice (uInt rownr, const Slicer& slicer, const Array<T>& data)

Put into a section of the array in the given row. The data array has to have the correct shape (which is guaranteed by the ArrayColumn::putSlice function). The default implementation gets the slice by accessing the full array.

virtual void getArrayColumn (Array<T>& data)

Get an entire column. The data array has to have the correct shape (which is guaranteed by the ArrayColum::getColumn function). The default implementation gets the column row by row.

virtual void putArrayColumn (const Array<T>& data)

Put an entire column. The data array has to have the correct shape (which is guaranteed by the ArrayColumn::putColumn function). The default implementation puts the column row by row.

virtual void getArrayColumnCells (const RefRows& rownrs, Array<T>& data)

Get some array values in the column. The data array has to have the correct length (which is guaranteed by the ArrayColumn::getColumn function). By default it throws a "not possible" exception.

virtual void putArrayColumnCells (const RefRows& rownrs, const Array<T>& data)

Put some array values in the column. The data array has to have the correct length (which is guaranteed by the ArrayColumn::putColumn function). By default it throws a "not possible" exception.

virtual void getColumnSlice (const Slicer& slicer, Array<T>& data)

Get a section of all arrays in the column. The data array has to have the correct shape (which is guaranteed by the ArrayColumn::getColumn function). The default implementation gets the column row by row.

virtual void putColumnSlice (const Slicer& slicer, const Array<T>& data)

Put a section of all arrays in the column. The data array has to have the correct shape (which is guaranteed by the ArrayColumn putColumn function). The default implementation puts the column row by row.

virtual void getColumnSliceCells (const RefRows& rownrs, const Slicer& slicer, Array<T>& data)

Get a section of some arrays in the column. The data array has to have the correct shape (which is guaranteed by the ArrayColumn::getColumn function). By default it throws a "not possible" exception.

virtual void putColumnSliceCells (const RefRows& rownrs, const Slicer& slicer, const Array<T>& data)

Put into a section of some arrays in the column. The data array has to have the correct shape (which is guaranteed by the ArrayColumn::putColumn function). By default it throws a "not possible" exception.

void getArrayV (uInt rownr, void* dataPtr)

Implement the virtual functions defined in DataManagerColumn. Get the array value in the given row.

void putArrayV (uInt rownr, const void* dataPtr)

Implement the virtual functions defined in DataManagerColumn. Put the array value into the given row.

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

Implement the virtual functions defined in DataManagerColumn. Get some array values in the column.

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

Implement the virtual functions defined in DataManagerColumn. Put some array values in the column.

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

Implement the virtual functions defined in DataManagerColumn. Get a section of the array in the given row.

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

Implement the virtual functions defined in DataManagerColumn. Put into a section of the array in the given row.

void getArrayColumnV (void* dataPtr)

Implement the virtual functions defined in DataManagerColumn. Get an entire column.

void putArrayColumnV (const void* dataPtr)

Implement the virtual functions defined in DataManagerColumn. Put an entire column.

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

Implement the virtual functions defined in DataManagerColumn. Get a section of all arrays in the column.

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

Implement the virtual functions defined in DataManagerColumn. Put into section of all arrays in the column.

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

Implement the virtual functions defined in DataManagerColumn. Get a section of some arrays in the column.

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

Implement the virtual functions defined in DataManagerColumn. Put into a section of some arrays in the column.

VirtualArrayColumn (const VirtualArrayColumn<T>&)

The object cannot be copied.

VirtualArrayColumn<T>& operator= (const VirtualArrayColumn<T>&)

The object cannot be assigned to.