casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
casacore::VirtualArrayColumn< T > Class Template Referenceabstract

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

#include <VirtArrCol.h>

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

Public Member Functions

 VirtualArrayColumn ()
 Create a column. More...
 
virtual ~VirtualArrayColumn ()
 Frees up the storage. More...
 
virtual int dataType () const
 Return the data type of the column. More...
 
virtual String dataTypeId () const
 Return the data type Id of the column. More...
 
virtual Bool isWritable () const
 By default no data can be put in a virtual column. More...
 
virtual Bool canAccessSlice (Bool &reask) const
 The class can handle a get/putSlice. More...
 
virtual Bool canAccessArrayColumn (Bool &reask) const
 The class can handle a get/putArrayColumn. More...
 
virtual Bool canAccessColumnSlice (Bool &reask) const
 The class can handle a get/putColumnSlice. More...
 
- Public Member Functions inherited from casacore::DataManagerColumn
 DataManagerColumn ()
 Create a column. More...
 
virtual ~DataManagerColumn ()
 Frees up the storage. More...
 
void setIsFixedShape (Bool isFixedShape)
 Set the isFixedShape flag. More...
 
Bool isFixedShape () const
 Is this a fixed shape column? More...
 
virtual void setMaxLength (uInt maxLength)
 Set the maximum length of the value (can be used for strings). More...
 
void setFixedShapeColumn (const IPosition &shape)
 Set the shape of all (fixed-shaped) arrays in the column. More...
 
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. More...
 
virtual IPosition tileShape (uInt rownr)
 Get the tile shape of the item in the given row. More...
 
virtual Bool canChangeShape () const
 Can the data manager handle chaging the shape of an existing array? Default is no. More...
 
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. More...
 
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. More...
 
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. More...
 
ColumnCachecolumnCache ()
 Get access to the ColumnCache object. More...
 
const ColumnCachecolumnCachePtr () const
 
void get (uInt rownr, Bool *dataPtr)
 Get the scalar value in the given row. More...
 
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, Int64 *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)
 This function is the get for all non-standard data types. More...
 
void put (uInt rownr, const Bool *dataPtr)
 Put the scalar value into the given row. More...
 
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 Int64 *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)
 This function is the put for all non-standard data types. More...
 
virtual void getScalarColumnV (void *dataPtr)
 Get all scalar values in the column. More...
 
virtual void putScalarColumnV (const void *dataPtr)
 Put all scalar values in the column. More...
 
virtual void getScalarColumnCellsV (const RefRows &rownrs, void *dataPtr)
 Get some scalar values in the column. More...
 
virtual void putScalarColumnCellsV (const RefRows &rownrs, const void *dataPtr)
 Put some scalar values in the column. More...
 
virtual uInt getBlockV (uInt rownr, uInt nrmax, void *dataPtr)
 Get scalars from the given row on with a maximum of nrmax values. More...
 
virtual void putBlockV (uInt rownr, uInt nrmax, const void *dataPtr)
 Put nrmax scalars from the given row on. More...
 
void throwGet () const
 Throw an "invalid operation" exception for the default implementation of get. More...
 
void throwPut () const
 Throw an "invalid operation" exception for the default implementation of put. More...
 
void setColumnName (const String &colName)
 Set the column name. More...
 
const StringcolumnName () const
 Get rhe column name. More...
 

Protected Member Functions

virtual void setShapeColumn (const IPosition &shape)
 Set the shape of all arrays in the column. More...
 
virtual void setShape (uInt rownr, const IPosition &shape)
 Set the shape of an array in the given row. More...
 
virtual Bool isShapeDefined (uInt rownr)
 Is the value shape defined in the given row? By default it throws a "not possible" exception. More...
 
virtual uInt ndim (uInt rownr)
 Get the dimensionality of the item in the given row. More...
 
virtual IPosition shape (uInt rownr)
 Get the shape of the item in the given row. More...
 
virtual void getArray (uInt rownr, Array< T > &data)=0
 Get the array value in the given row. More...
 
virtual void putArray (uInt rownr, const Array< T > &data)
 Put the array value into the given row. More...
 
virtual void getSlice (uInt rownr, const Slicer &slicer, Array< T > &data)
 Get a section of the array in the given row. More...
 
virtual void putSlice (uInt rownr, const Slicer &slicer, const Array< T > &data)
 Put into a section of the array in the given row. More...
 
virtual void getArrayColumn (Array< T > &data)
 Get an entire column. More...
 
virtual void putArrayColumn (const Array< T > &data)
 Put an entire column. More...
 
virtual void getArrayColumnCells (const RefRows &rownrs, Array< T > &data)
 Get some array values in the column. More...
 
virtual void putArrayColumnCells (const RefRows &rownrs, const Array< T > &data)
 Put some array values in the column. More...
 
virtual void getColumnSlice (const Slicer &slicer, Array< T > &data)
 Get a section of all arrays in the column. More...
 
virtual void putColumnSlice (const Slicer &slicer, const Array< T > &data)
 Put a section of all arrays in the column. More...
 
virtual void getColumnSliceCells (const RefRows &rownrs, const Slicer &slicer, Array< T > &data)
 Get a section of some arrays in the column. More...
 
virtual void putColumnSliceCells (const RefRows &rownrs, const Slicer &slicer, const Array< T > &data)
 Put into a section of some arrays in the column. More...
 
- Protected Member Functions inherited from casacore::DataManagerColumn
virtual void getBoolV (uInt rownr, Bool *dataPtr)
 Get the scalar value in the given row. More...
 
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 getInt64V (uInt rownr, Int64 *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)
 This function is the get for all non-standard data types. More...
 
virtual void putBoolV (uInt rownr, const Bool *dataPtr)
 Put the scalar value into the given row. More...
 
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 putInt64V (uInt rownr, const Int64 *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)
 This function is the put for all non-standard data types. More...
 

Private Member Functions

void getArrayV (uInt rownr, void *dataPtr)
 Implement the virtual functions defined in DataManagerColumn. More...
 
void putArrayV (uInt rownr, const void *dataPtr)
 Implement the virtual functions defined in DataManagerColumn. More...
 
void getArrayColumnCellsV (const RefRows &rownrs, void *dataPtr)
 Implement the virtual functions defined in DataManagerColumn. More...
 
void putArrayColumnCellsV (const RefRows &rownrs, const void *dataPtr)
 Implement the virtual functions defined in DataManagerColumn. More...
 
void getSliceV (uInt rownr, const Slicer &slicer, void *dataPtr)
 Implement the virtual functions defined in DataManagerColumn. More...
 
void putSliceV (uInt rownr, const Slicer &slicer, const void *dataPtr)
 Implement the virtual functions defined in DataManagerColumn. More...
 
void getArrayColumnV (void *dataPtr)
 Implement the virtual functions defined in DataManagerColumn. More...
 
void putArrayColumnV (const void *dataPtr)
 Implement the virtual functions defined in DataManagerColumn. More...
 
void getColumnSliceV (const Slicer &slicer, void *dataPtr)
 Implement the virtual functions defined in DataManagerColumn. More...
 
void putColumnSliceV (const Slicer &slicer, const void *dataPtr)
 Implement the virtual functions defined in DataManagerColumn. More...
 
virtual void getColumnSliceCellsV (const RefRows &rownrs, const Slicer &slicer, void *dataPtr)
 Implement the virtual functions defined in DataManagerColumn. More...
 
virtual void putColumnSliceCellsV (const RefRows &rownrs, const Slicer &slicer, const void *dataPtr)
 Implement the virtual functions defined in DataManagerColumn. More...
 
 VirtualArrayColumn (const VirtualArrayColumn< T > &)
 The object cannot be copied. More...
 
VirtualArrayColumn< T > & operator= (const VirtualArrayColumn< T > &)
 The object cannot be assigned to. More...
 

Detailed Description

template<class T>
class casacore::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>
casacore::VirtualArrayColumn< T >::VirtualArrayColumn ( )
inline

Create a column.

Definition at line 145 of file VirtArrCol.h.

template<class T>
virtual casacore::VirtualArrayColumn< T >::~VirtualArrayColumn ( )
virtual

Frees up the storage.

template<class T>
casacore::VirtualArrayColumn< T >::VirtualArrayColumn ( const VirtualArrayColumn< T > &  )
private

The object cannot be copied.

Member Function Documentation

template<class T>
virtual Bool casacore::VirtualArrayColumn< T >::canAccessArrayColumn ( Bool reask) const
virtual

The class can handle a get/putArrayColumn.

Reimplemented from casacore::DataManagerColumn.

template<class T>
virtual Bool casacore::VirtualArrayColumn< T >::canAccessColumnSlice ( Bool reask) const
virtual

The class can handle a get/putColumnSlice.

Reimplemented from casacore::DataManagerColumn.

template<class T>
virtual Bool casacore::VirtualArrayColumn< T >::canAccessSlice ( Bool reask) const
virtual

The class can handle a get/putSlice.

Reimplemented from casacore::DataManagerColumn.

template<class T>
virtual int casacore::VirtualArrayColumn< T >::dataType ( ) const
virtual

Return the data type of the column.

Implements casacore::DataManagerColumn.

template<class T>
virtual String casacore::VirtualArrayColumn< T >::dataTypeId ( ) const
virtual

Return the data type Id of the column.

Reimplemented from casacore::DataManagerColumn.

template<class T>
virtual void casacore::VirtualArrayColumn< T >::getArray ( uInt  rownr,
Array< T > &  data 
)
protectedpure virtual
template<class T>
virtual void casacore::VirtualArrayColumn< T >::getArrayColumn ( Array< T > &  data)
protectedvirtual
template<class T>
virtual void casacore::VirtualArrayColumn< T >::getArrayColumnCells ( const RefRows rownrs,
Array< T > &  data 
)
protectedvirtual
template<class T>
void casacore::VirtualArrayColumn< T >::getArrayColumnCellsV ( const RefRows rownrs,
void *  dataPtr 
)
privatevirtual

Implement the virtual functions defined in DataManagerColumn.

Get some array values in the column.

Reimplemented from casacore::DataManagerColumn.

template<class T>
void casacore::VirtualArrayColumn< T >::getArrayColumnV ( void *  dataPtr)
privatevirtual

Implement the virtual functions defined in DataManagerColumn.

Get an entire column.

Reimplemented from casacore::DataManagerColumn.

template<class T>
void casacore::VirtualArrayColumn< T >::getArrayV ( uInt  rownr,
void *  dataPtr 
)
privatevirtual

Implement the virtual functions defined in DataManagerColumn.

Get the array value in the given row.

Reimplemented from casacore::DataManagerColumn.

template<class T>
virtual void casacore::VirtualArrayColumn< T >::getColumnSlice ( const Slicer slicer,
Array< T > &  data 
)
protectedvirtual
template<class T>
virtual void casacore::VirtualArrayColumn< T >::getColumnSliceCells ( const RefRows rownrs,
const Slicer slicer,
Array< T > &  data 
)
protectedvirtual
template<class T>
virtual void casacore::VirtualArrayColumn< T >::getColumnSliceCellsV ( const RefRows rownrs,
const Slicer slicer,
void *  dataPtr 
)
privatevirtual

Implement the virtual functions defined in DataManagerColumn.

Get a section of some arrays in the column.

Reimplemented from casacore::DataManagerColumn.

template<class T>
void casacore::VirtualArrayColumn< T >::getColumnSliceV ( const Slicer slicer,
void *  dataPtr 
)
privatevirtual

Implement the virtual functions defined in DataManagerColumn.

Get a section of all arrays in the column.

Reimplemented from casacore::DataManagerColumn.

template<class T>
virtual void casacore::VirtualArrayColumn< T >::getSlice ( uInt  rownr,
const Slicer slicer,
Array< T > &  data 
)
protectedvirtual
template<class T>
void casacore::VirtualArrayColumn< T >::getSliceV ( uInt  rownr,
const Slicer slicer,
void *  dataPtr 
)
privatevirtual

Implement the virtual functions defined in DataManagerColumn.

Get a section of the array in the given row.

Reimplemented from casacore::DataManagerColumn.

template<class T>
virtual Bool casacore::VirtualArrayColumn< T >::isShapeDefined ( uInt  rownr)
protectedvirtual
template<class T>
virtual Bool casacore::VirtualArrayColumn< T >::isWritable ( ) const
virtual
template<class T>
virtual uInt casacore::VirtualArrayColumn< T >::ndim ( uInt  rownr)
protectedvirtual
template<class T>
VirtualArrayColumn<T>& casacore::VirtualArrayColumn< T >::operator= ( const VirtualArrayColumn< T > &  )
private

The object cannot be assigned to.

template<class T>
virtual void casacore::VirtualArrayColumn< T >::putArray ( uInt  rownr,
const Array< T > &  data 
)
protectedvirtual
template<class T>
virtual void casacore::VirtualArrayColumn< T >::putArrayColumn ( const Array< T > &  data)
protectedvirtual
template<class T>
virtual void casacore::VirtualArrayColumn< T >::putArrayColumnCells ( const RefRows rownrs,
const Array< T > &  data 
)
protectedvirtual
template<class T>
void casacore::VirtualArrayColumn< T >::putArrayColumnCellsV ( const RefRows rownrs,
const void *  dataPtr 
)
privatevirtual

Implement the virtual functions defined in DataManagerColumn.

Put some array values in the column.

Reimplemented from casacore::DataManagerColumn.

template<class T>
void casacore::VirtualArrayColumn< T >::putArrayColumnV ( const void *  dataPtr)
privatevirtual

Implement the virtual functions defined in DataManagerColumn.

Put an entire column.

Reimplemented from casacore::DataManagerColumn.

template<class T>
void casacore::VirtualArrayColumn< T >::putArrayV ( uInt  rownr,
const void *  dataPtr 
)
privatevirtual

Implement the virtual functions defined in DataManagerColumn.

Put the array value into the given row.

Reimplemented from casacore::DataManagerColumn.

template<class T>
virtual void casacore::VirtualArrayColumn< T >::putColumnSlice ( const Slicer slicer,
const Array< T > &  data 
)
protectedvirtual
template<class T>
virtual void casacore::VirtualArrayColumn< T >::putColumnSliceCells ( const RefRows rownrs,
const Slicer slicer,
const Array< T > &  data 
)
protectedvirtual
template<class T>
virtual void casacore::VirtualArrayColumn< T >::putColumnSliceCellsV ( const RefRows rownrs,
const Slicer slicer,
const void *  dataPtr 
)
privatevirtual

Implement the virtual functions defined in DataManagerColumn.

Put into a section of some arrays in the column.

Reimplemented from casacore::DataManagerColumn.

template<class T>
void casacore::VirtualArrayColumn< T >::putColumnSliceV ( const Slicer slicer,
const void *  dataPtr 
)
privatevirtual

Implement the virtual functions defined in DataManagerColumn.

Put into section of all arrays in the column.

Reimplemented from casacore::DataManagerColumn.

template<class T>
virtual void casacore::VirtualArrayColumn< T >::putSlice ( uInt  rownr,
const Slicer slicer,
const Array< T > &  data 
)
protectedvirtual
template<class T>
void casacore::VirtualArrayColumn< T >::putSliceV ( uInt  rownr,
const Slicer slicer,
const void *  dataPtr 
)
privatevirtual

Implement the virtual functions defined in DataManagerColumn.

Put into a section of the array in the given row.

Reimplemented from casacore::DataManagerColumn.

template<class T>
virtual void casacore::VirtualArrayColumn< T >::setShape ( uInt  rownr,
const IPosition shape 
)
protectedvirtual
template<class T>
virtual void casacore::VirtualArrayColumn< T >::setShapeColumn ( const IPosition shape)
protectedvirtual
template<class T>
virtual IPosition casacore::VirtualArrayColumn< T >::shape ( uInt  rownr)
protectedvirtual

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