casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Private Member Functions
casa::VirtualArrayColumn< T > Class Template Reference

Templated base class for virtual array column. More...

#include <VirtArrCol.h>

Inheritance diagram for casa::VirtualArrayColumn< T >:
casa::DataManagerColumn

List of all members.

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.

Detailed Description

template<class T>
class casa::VirtualArrayColumn< T >

Templated base class for virtual array column.

Intended use:

Internal

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)

Definition at line 140 of file VirtArrCol.h.


Constructor & Destructor Documentation

template<class T>
casa::VirtualArrayColumn< T >::VirtualArrayColumn ( ) [inline]

Create a column.

Definition at line 145 of file VirtArrCol.h.

template<class T>
virtual casa::VirtualArrayColumn< T >::~VirtualArrayColumn ( ) [virtual]

Frees up the storage.

template<class T>
casa::VirtualArrayColumn< T >::VirtualArrayColumn ( const VirtualArrayColumn< T > &  ) [private]

The object cannot be copied.


Member Function Documentation

template<class T>
virtual Bool casa::VirtualArrayColumn< T >::canAccessArrayColumn ( Bool reask) const [virtual]

The class can handle a get/putArrayColumn.

Reimplemented from casa::DataManagerColumn.

template<class T>
virtual Bool casa::VirtualArrayColumn< T >::canAccessColumnSlice ( Bool reask) const [virtual]

The class can handle a get/putColumnSlice.

Reimplemented from casa::DataManagerColumn.

template<class T>
virtual Bool casa::VirtualArrayColumn< T >::canAccessSlice ( Bool reask) const [virtual]

The class can handle a get/putSlice.

Reimplemented from casa::DataManagerColumn.

template<class T>
virtual int casa::VirtualArrayColumn< T >::dataType ( ) const [virtual]

Return the data type of the column.

Implements casa::DataManagerColumn.

template<class T>
virtual String casa::VirtualArrayColumn< T >::dataTypeId ( ) const [virtual]

Return the data type Id of the column.

Reimplemented from casa::DataManagerColumn.

template<class T>
virtual void casa::VirtualArrayColumn< T >::getArray ( uInt  rownr,
Array< T > &  data 
) [protected, pure virtual]
template<class T>
virtual void casa::VirtualArrayColumn< T >::getArrayColumn ( Array< T > &  data) [protected, virtual]
template<class T>
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 >.

template<class T>
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.

template<class T>
void casa::VirtualArrayColumn< T >::getArrayColumnV ( void *  dataPtr) [private, virtual]

Implement the virtual functions defined in DataManagerColumn.

Get an entire column.

Reimplemented from casa::DataManagerColumn.

template<class T>
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.

template<class T>
virtual void casa::VirtualArrayColumn< T >::getColumnSlice ( const Slicer slicer,
Array< T > &  data 
) [protected, virtual]
template<class T>
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 >.

template<class T>
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.

template<class T>
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.

template<class T>
virtual void casa::VirtualArrayColumn< T >::getSlice ( uInt  rownr,
const Slicer slicer,
Array< T > &  data 
) [protected, virtual]
template<class T>
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.

template<class T>
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 >.

template<class T>
virtual Bool casa::VirtualArrayColumn< T >::isWritable ( ) const [virtual]
template<class T>
virtual uInt casa::VirtualArrayColumn< T >::ndim ( uInt  rownr) [protected, virtual]
template<class T>
VirtualArrayColumn<T>& casa::VirtualArrayColumn< T >::operator= ( const VirtualArrayColumn< T > &  ) [private]

The object cannot be assigned to.

template<class T>
virtual void casa::VirtualArrayColumn< T >::putArray ( uInt  rownr,
const Array< T > &  data 
) [protected, virtual]
template<class T>
virtual void casa::VirtualArrayColumn< T >::putArrayColumn ( const Array< T > &  data) [protected, virtual]
template<class T>
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 >.

template<class T>
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.

template<class T>
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.

template<class T>
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.

template<class T>
virtual void casa::VirtualArrayColumn< T >::putColumnSlice ( const Slicer slicer,
const Array< T > &  data 
) [protected, virtual]
template<class T>
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 >.

template<class T>
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.

template<class T>
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.

template<class T>
virtual void casa::VirtualArrayColumn< T >::putSlice ( uInt  rownr,
const Slicer slicer,
const Array< T > &  data 
) [protected, virtual]
template<class T>
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.

template<class T>
virtual void casa::VirtualArrayColumn< T >::setShape ( uInt  rownr,
const IPosition shape 
) [protected, virtual]
template<class T>
virtual void casa::VirtualArrayColumn< T >::setShapeColumn ( const IPosition shape) [protected, virtual]
template<class T>
virtual IPosition casa::VirtualArrayColumn< T >::shape ( uInt  rownr) [protected, virtual]

The documentation for this class was generated from the following file: