casa
$Rev:20696$
|
Templated base class for virtual array column. More...
#include <VirtArrCol.h>
Public Member Functions | |
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. | |
Protected Member Functions | |
virtual void | setShapeColumn (const IPosition &shape) |
Set the shape of all arrays in the column. | |
virtual void | setShape (uInt rownr, const IPosition &shape) |
Set the shape of an array in the given row. | |
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. | |
virtual IPosition | shape (uInt rownr) |
Get the shape of the item in the given row. | |
virtual void | getArray (uInt rownr, Array< T > &data)=0 |
Get the array value in the given row. | |
virtual void | putArray (uInt rownr, const Array< T > &data) |
Put the array value into the given row. | |
virtual void | getSlice (uInt rownr, const Slicer &slicer, Array< T > &data) |
Get a section of the array in the given row. | |
virtual void | putSlice (uInt rownr, const Slicer &slicer, const Array< T > &data) |
Put into a section of the array in the given row. | |
virtual void | getArrayColumn (Array< T > &data) |
Get an entire column. | |
virtual void | putArrayColumn (const Array< T > &data) |
Put an entire column. | |
virtual void | getArrayColumnCells (const RefRows &rownrs, Array< T > &data) |
Get some array values in the column. | |
virtual void | putArrayColumnCells (const RefRows &rownrs, const Array< T > &data) |
Put some array values in the column. | |
virtual void | getColumnSlice (const Slicer &slicer, Array< T > &data) |
Get a section of all arrays in the column. | |
virtual void | putColumnSlice (const Slicer &slicer, const Array< T > &data) |
Put a section of all arrays in the column. | |
virtual void | getColumnSliceCells (const RefRows &rownrs, const Slicer &slicer, Array< T > &data) |
Get a section of some arrays in the column. | |
virtual void | putColumnSliceCells (const RefRows &rownrs, const Slicer &slicer, const Array< T > &data) |
Put into a section of some arrays in the column. | |
Private Member Functions | |
void | getArrayV (uInt rownr, void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. | |
void | putArrayV (uInt rownr, const void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. | |
void | getArrayColumnCellsV (const RefRows &rownrs, void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. | |
void | putArrayColumnCellsV (const RefRows &rownrs, const void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. | |
void | getSliceV (uInt rownr, const Slicer &slicer, void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. | |
void | putSliceV (uInt rownr, const Slicer &slicer, const void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. | |
void | getArrayColumnV (void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. | |
void | putArrayColumnV (const void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. | |
void | getColumnSliceV (const Slicer &slicer, void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. | |
void | putColumnSliceV (const Slicer &slicer, const void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. | |
virtual void | getColumnSliceCellsV (const RefRows &rownrs, const Slicer &slicer, void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. | |
virtual void | putColumnSliceCellsV (const RefRows &rownrs, const Slicer &slicer, const void *dataPtr) |
Implement the virtual functions defined in DataManagerColumn. | |
VirtualArrayColumn (const VirtualArrayColumn< T > &) | |
The object cannot be copied. | |
VirtualArrayColumn< T > & | operator= (const VirtualArrayColumn< T > &) |
The object cannot be assigned to. |
Templated base class for virtual array column.
Internal
VirtualArrayColumn handles a virtual column containing an array.
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.
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.
static String dataTypeId(); // unique name of the class
Definition at line 140 of file VirtArrCol.h.
casa::VirtualArrayColumn< T >::VirtualArrayColumn | ( | ) | [inline] |
Create a column.
Definition at line 145 of file VirtArrCol.h.
virtual casa::VirtualArrayColumn< T >::~VirtualArrayColumn | ( | ) | [virtual] |
Frees up the storage.
casa::VirtualArrayColumn< T >::VirtualArrayColumn | ( | const VirtualArrayColumn< T > & | ) | [private] |
The object cannot be copied.
virtual Bool casa::VirtualArrayColumn< T >::canAccessArrayColumn | ( | Bool & | reask | ) | const [virtual] |
The class can handle a get/putArrayColumn.
Reimplemented from casa::DataManagerColumn.
virtual Bool casa::VirtualArrayColumn< T >::canAccessColumnSlice | ( | Bool & | reask | ) | const [virtual] |
The class can handle a get/putColumnSlice.
Reimplemented from casa::DataManagerColumn.
virtual Bool casa::VirtualArrayColumn< T >::canAccessSlice | ( | Bool & | reask | ) | const [virtual] |
The class can handle a get/putSlice.
Reimplemented from casa::DataManagerColumn.
virtual int casa::VirtualArrayColumn< T >::dataType | ( | ) | const [virtual] |
Return the data type of the column.
Implements casa::DataManagerColumn.
virtual String casa::VirtualArrayColumn< T >::dataTypeId | ( | ) | const [virtual] |
Return the data type Id of the column.
Reimplemented from casa::DataManagerColumn.
virtual void casa::VirtualArrayColumn< T >::getArray | ( | uInt | rownr, |
Array< T > & | data | ||
) | [protected, pure virtual] |
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).
Implemented in casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::BitFlagsEngine< StoredType >, casa::ScaledComplexData< VirtualType, StoredType >, casa::ScaledArrayEngine< VirtualType, StoredType >, casa::CompressComplex, and casa::CompressFloat.
virtual void casa::VirtualArrayColumn< T >::getArrayColumn | ( | Array< T > & | data | ) | [protected, virtual] |
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.
Reimplemented in casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::BitFlagsEngine< StoredType >, casa::ScaledComplexData< VirtualType, StoredType >, casa::ScaledArrayEngine< VirtualType, StoredType >, casa::CompressComplex, and casa::CompressFloat.
virtual void casa::VirtualArrayColumn< T >::getArrayColumnCells | ( | const RefRows & | rownrs, |
Array< T > & | data | ||
) | [protected, virtual] |
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.
Reimplemented in casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::BitFlagsEngine< StoredType >, and casa::ScaledComplexData< VirtualType, StoredType >.
void casa::VirtualArrayColumn< T >::getArrayColumnCellsV | ( | const RefRows & | rownrs, |
void * | dataPtr | ||
) | [private, virtual] |
Implement the virtual functions defined in DataManagerColumn.
Get some array values in the column.
Reimplemented from casa::DataManagerColumn.
void casa::VirtualArrayColumn< T >::getArrayColumnV | ( | void * | dataPtr | ) | [private, virtual] |
Implement the virtual functions defined in DataManagerColumn.
Get an entire column.
Reimplemented from casa::DataManagerColumn.
void casa::VirtualArrayColumn< T >::getArrayV | ( | uInt | rownr, |
void * | dataPtr | ||
) | [private, virtual] |
Implement the virtual functions defined in DataManagerColumn.
Get the array value in the given row.
Reimplemented from casa::DataManagerColumn.
virtual void casa::VirtualArrayColumn< T >::getColumnSlice | ( | const Slicer & | slicer, |
Array< T > & | data | ||
) | [protected, virtual] |
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.
Reimplemented in casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::ScaledComplexData< VirtualType, StoredType >, casa::BitFlagsEngine< StoredType >, casa::ScaledArrayEngine< VirtualType, StoredType >, casa::CompressComplex, and casa::CompressFloat.
virtual void casa::VirtualArrayColumn< T >::getColumnSliceCells | ( | const RefRows & | rownrs, |
const Slicer & | slicer, | ||
Array< T > & | data | ||
) | [protected, virtual] |
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.
Reimplemented in casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::ScaledComplexData< VirtualType, StoredType >, and casa::BitFlagsEngine< StoredType >.
virtual void casa::VirtualArrayColumn< T >::getColumnSliceCellsV | ( | const RefRows & | rownrs, |
const Slicer & | slicer, | ||
void * | dataPtr | ||
) | [private, virtual] |
Implement the virtual functions defined in DataManagerColumn.
Get a section of some arrays in the column.
Reimplemented from casa::DataManagerColumn.
void casa::VirtualArrayColumn< T >::getColumnSliceV | ( | const Slicer & | slicer, |
void * | dataPtr | ||
) | [private, virtual] |
Implement the virtual functions defined in DataManagerColumn.
Get a section of all arrays in the column.
Reimplemented from casa::DataManagerColumn.
virtual void casa::VirtualArrayColumn< T >::getSlice | ( | uInt | rownr, |
const Slicer & | slicer, | ||
Array< T > & | data | ||
) | [protected, virtual] |
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.
Reimplemented in casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::BitFlagsEngine< StoredType >, casa::ScaledComplexData< VirtualType, StoredType >, casa::ScaledArrayEngine< VirtualType, StoredType >, casa::CompressComplex, and casa::CompressFloat.
void casa::VirtualArrayColumn< T >::getSliceV | ( | uInt | rownr, |
const Slicer & | slicer, | ||
void * | dataPtr | ||
) | [private, virtual] |
Implement the virtual functions defined in DataManagerColumn.
Get a section of the array in the given row.
Reimplemented from casa::DataManagerColumn.
virtual Bool casa::VirtualArrayColumn< T >::isShapeDefined | ( | uInt | rownr | ) | [protected, virtual] |
Is the value shape defined in the given row? By default it throws a "not possible" exception.
Reimplemented from casa::DataManagerColumn.
Reimplemented in casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, and casa::BaseMappedArrayEngine< Bool, StoredType >.
virtual Bool casa::VirtualArrayColumn< T >::isWritable | ( | ) | const [virtual] |
By default no data can be put in a virtual column.
Reimplemented from casa::DataManagerColumn.
Reimplemented in casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, and casa::BaseMappedArrayEngine< Bool, StoredType >.
virtual uInt casa::VirtualArrayColumn< T >::ndim | ( | uInt | rownr | ) | [protected, virtual] |
Get the dimensionality of the item in the given row.
By default it throws a "not possible" exception.
Reimplemented from casa::DataManagerColumn.
Reimplemented in casa::RetypedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, and casa::ScaledComplexData< VirtualType, StoredType >.
VirtualArrayColumn<T>& casa::VirtualArrayColumn< T >::operator= | ( | const VirtualArrayColumn< T > & | ) | [private] |
The object cannot be assigned to.
virtual void casa::VirtualArrayColumn< T >::putArray | ( | uInt | rownr, |
const Array< T > & | data | ||
) | [protected, virtual] |
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.
Reimplemented in casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::BitFlagsEngine< StoredType >, casa::ScaledComplexData< VirtualType, StoredType >, casa::ScaledArrayEngine< VirtualType, StoredType >, casa::CompressComplex, and casa::CompressFloat.
virtual void casa::VirtualArrayColumn< T >::putArrayColumn | ( | const Array< T > & | data | ) | [protected, virtual] |
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.
Reimplemented in casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::BitFlagsEngine< StoredType >, casa::ScaledComplexData< VirtualType, StoredType >, casa::ScaledArrayEngine< VirtualType, StoredType >, casa::CompressComplex, and casa::CompressFloat.
virtual void casa::VirtualArrayColumn< T >::putArrayColumnCells | ( | const RefRows & | rownrs, |
const Array< T > & | data | ||
) | [protected, virtual] |
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.
Reimplemented in casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::BitFlagsEngine< StoredType >, and casa::ScaledComplexData< VirtualType, StoredType >.
void casa::VirtualArrayColumn< T >::putArrayColumnCellsV | ( | const RefRows & | rownrs, |
const void * | dataPtr | ||
) | [private, virtual] |
Implement the virtual functions defined in DataManagerColumn.
Put some array values in the column.
Reimplemented from casa::DataManagerColumn.
void casa::VirtualArrayColumn< T >::putArrayColumnV | ( | const void * | dataPtr | ) | [private, virtual] |
Implement the virtual functions defined in DataManagerColumn.
Put an entire column.
Reimplemented from casa::DataManagerColumn.
void casa::VirtualArrayColumn< T >::putArrayV | ( | uInt | rownr, |
const void * | dataPtr | ||
) | [private, virtual] |
Implement the virtual functions defined in DataManagerColumn.
Put the array value into the given row.
Reimplemented from casa::DataManagerColumn.
virtual void casa::VirtualArrayColumn< T >::putColumnSlice | ( | const Slicer & | slicer, |
const Array< T > & | data | ||
) | [protected, virtual] |
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.
Reimplemented in casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::ScaledComplexData< VirtualType, StoredType >, casa::BitFlagsEngine< StoredType >, casa::ScaledArrayEngine< VirtualType, StoredType >, casa::CompressComplex, and casa::CompressFloat.
virtual void casa::VirtualArrayColumn< T >::putColumnSliceCells | ( | const RefRows & | rownrs, |
const Slicer & | slicer, | ||
const Array< T > & | data | ||
) | [protected, virtual] |
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.
Reimplemented in casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::ScaledComplexData< VirtualType, StoredType >, and casa::BitFlagsEngine< StoredType >.
virtual void casa::VirtualArrayColumn< T >::putColumnSliceCellsV | ( | const RefRows & | rownrs, |
const Slicer & | slicer, | ||
const void * | dataPtr | ||
) | [private, virtual] |
Implement the virtual functions defined in DataManagerColumn.
Put into a section of some arrays in the column.
Reimplemented from casa::DataManagerColumn.
void casa::VirtualArrayColumn< T >::putColumnSliceV | ( | const Slicer & | slicer, |
const void * | dataPtr | ||
) | [private, virtual] |
Implement the virtual functions defined in DataManagerColumn.
Put into section of all arrays in the column.
Reimplemented from casa::DataManagerColumn.
virtual void casa::VirtualArrayColumn< T >::putSlice | ( | uInt | rownr, |
const Slicer & | slicer, | ||
const Array< T > & | data | ||
) | [protected, virtual] |
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.
Reimplemented in casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, casa::BitFlagsEngine< StoredType >, casa::ScaledComplexData< VirtualType, StoredType >, casa::ScaledArrayEngine< VirtualType, StoredType >, casa::CompressComplex, and casa::CompressFloat.
void casa::VirtualArrayColumn< T >::putSliceV | ( | uInt | rownr, |
const Slicer & | slicer, | ||
const void * | dataPtr | ||
) | [private, virtual] |
Implement the virtual functions defined in DataManagerColumn.
Put into a section of the array in the given row.
Reimplemented from casa::DataManagerColumn.
virtual void casa::VirtualArrayColumn< T >::setShape | ( | uInt | rownr, |
const IPosition & | shape | ||
) | [protected, virtual] |
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.
Reimplemented from casa::DataManagerColumn.
Reimplemented in casa::RetypedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, and casa::ScaledComplexData< VirtualType, StoredType >.
virtual void casa::VirtualArrayColumn< T >::setShapeColumn | ( | const IPosition & | shape | ) | [protected, virtual] |
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.
Reimplemented from casa::DataManagerColumn.
Reimplemented in casa::RetypedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, and casa::ScaledComplexData< VirtualType, StoredType >.
virtual IPosition casa::VirtualArrayColumn< T >::shape | ( | uInt | rownr | ) | [protected, virtual] |
Get the shape of the item in the given row.
By default it throws a "not possible" exception.
Reimplemented from casa::DataManagerColumn.
Reimplemented in casa::RetypedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< VirtualType, StoredType >, casa::BaseMappedArrayEngine< Complex, Int >, casa::BaseMappedArrayEngine< Float, Short >, casa::BaseMappedArrayEngine< Bool, StoredType >, and casa::ScaledComplexData< VirtualType, StoredType >.