casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::StManColumnArrayAipsIO Class Reference

AipsIO storage manager for direct table arrays. More...

#include <StArrAipsIO.h>

Inheritance diagram for casa::StManColumnArrayAipsIO:
casa::StManColumnAipsIO casa::StManColumn casa::DataManagerColumn

List of all members.

Public Member Functions

 StManColumnArrayAipsIO (StManAipsIO *, int dataType)
 Create a column of the given data type.
 ~StManColumnArrayAipsIO ()
 Frees up the storage.
Bool canAccessSlice (Bool &reask) const
 It can handle access to a slice in a cell.
Bool canAccessArrayColumn (Bool &reask) const
 It can handle access to an entire column.
void setShapeColumn (const IPosition &shape)
 Set the shape of the arrays in the entire column.
void addRow (uInt newNrrow, uInt oldNrrow)
 Add (newNrrow-oldNrrow) rows to the column.
uInt ndim (uInt rownr)
 Get the dimensionality of the item in the given row.
IPosition shape (uInt rownr)
 Get the shape of the array in the given row.
void getArrayBoolV (uInt rownr, Array< Bool > *dataPtr)
 Get an array value in the given row.
void getArrayuCharV (uInt rownr, Array< uChar > *dataPtr)
void getArrayShortV (uInt rownr, Array< Short > *dataPtr)
void getArrayuShortV (uInt rownr, Array< uShort > *dataPtr)
void getArrayIntV (uInt rownr, Array< Int > *dataPtr)
void getArrayuIntV (uInt rownr, Array< uInt > *dataPtr)
void getArrayfloatV (uInt rownr, Array< float > *dataPtr)
void getArraydoubleV (uInt rownr, Array< double > *dataPtr)
void getArrayComplexV (uInt rownr, Array< Complex > *dataPtr)
void getArrayDComplexV (uInt rownr, Array< DComplex > *dataPtr)
void getArrayStringV (uInt rownr, Array< String > *dataPtr)
void putArrayBoolV (uInt rownr, const Array< Bool > *dataPtr)
 Put an array value into the given row.
void putArrayuCharV (uInt rownr, const Array< uChar > *dataPtr)
void putArrayShortV (uInt rownr, const Array< Short > *dataPtr)
void putArrayuShortV (uInt rownr, const Array< uShort > *dataPtr)
void putArrayIntV (uInt rownr, const Array< Int > *dataPtr)
void putArrayuIntV (uInt rownr, const Array< uInt > *dataPtr)
void putArrayfloatV (uInt rownr, const Array< float > *dataPtr)
void putArraydoubleV (uInt rownr, const Array< double > *dataPtr)
void putArrayComplexV (uInt rownr, const Array< Complex > *dataPtr)
void putArrayDComplexV (uInt rownr, const Array< DComplex > *dataPtr)
void putArrayStringV (uInt rownr, const Array< String > *dataPtr)
void getSliceBoolV (uInt rownr, const Slicer &, Array< Bool > *dataPtr)
 Get a section of the array in the given row.
void getSliceuCharV (uInt rownr, const Slicer &, Array< uChar > *dataPtr)
void getSliceShortV (uInt rownr, const Slicer &, Array< Short > *dataPtr)
void getSliceuShortV (uInt rownr, const Slicer &, Array< uShort > *dataPtr)
void getSliceIntV (uInt rownr, const Slicer &, Array< Int > *dataPtr)
void getSliceuIntV (uInt rownr, const Slicer &, Array< uInt > *dataPtr)
void getSlicefloatV (uInt rownr, const Slicer &, Array< float > *dataPtr)
void getSlicedoubleV (uInt rownr, const Slicer &, Array< double > *dataPtr)
void getSliceComplexV (uInt rownr, const Slicer &, Array< Complex > *dataPtr)
void getSliceDComplexV (uInt rownr, const Slicer &, Array< DComplex > *dataPtr)
void getSliceStringV (uInt rownr, const Slicer &, Array< String > *dataPtr)
void putSliceBoolV (uInt rownr, const Slicer &, const Array< Bool > *dataPtr)
 Put into a section of the array in the given row.
void putSliceuCharV (uInt rownr, const Slicer &, const Array< uChar > *dataPtr)
void putSliceShortV (uInt rownr, const Slicer &, const Array< Short > *dataPtr)
void putSliceuShortV (uInt rownr, const Slicer &, const Array< uShort > *dataPtr)
void putSliceIntV (uInt rownr, const Slicer &, const Array< Int > *dataPtr)
void putSliceuIntV (uInt rownr, const Slicer &, const Array< uInt > *dataPtr)
void putSlicefloatV (uInt rownr, const Slicer &, const Array< float > *dataPtr)
void putSlicedoubleV (uInt rownr, const Slicer &, const Array< double > *dataPtr)
void putSliceComplexV (uInt rownr, const Slicer &, const Array< Complex > *dataPtr)
void putSliceDComplexV (uInt rownr, const Slicer &, const Array< DComplex > *dataPtr)
void putSliceStringV (uInt rownr, const Slicer &, const Array< String > *dataPtr)
void getArrayColumnBoolV (Array< Bool > *dataPtr)
 Get all array values in the column.
void getArrayColumnuCharV (Array< uChar > *dataPtr)
void getArrayColumnShortV (Array< Short > *dataPtr)
void getArrayColumnuShortV (Array< uShort > *dataPtr)
void getArrayColumnIntV (Array< Int > *dataPtr)
void getArrayColumnuIntV (Array< uInt > *dataPtr)
void getArrayColumnfloatV (Array< float > *dataPtr)
void getArrayColumndoubleV (Array< double > *dataPtr)
void getArrayColumnComplexV (Array< Complex > *dataPtr)
void getArrayColumnDComplexV (Array< DComplex > *dataPtr)
void getArrayColumnStringV (Array< String > *dataPtr)
void putArrayColumnBoolV (const Array< Bool > *dataPtr)
 Put all arrays in the column.
void putArrayColumnuCharV (const Array< uChar > *dataPtr)
void putArrayColumnShortV (const Array< Short > *dataPtr)
void putArrayColumnuShortV (const Array< uShort > *dataPtr)
void putArrayColumnIntV (const Array< Int > *dataPtr)
void putArrayColumnuIntV (const Array< uInt > *dataPtr)
void putArrayColumnfloatV (const Array< float > *dataPtr)
void putArrayColumndoubleV (const Array< double > *dataPtr)
void putArrayColumnComplexV (const Array< Complex > *dataPtr)
void putArrayColumnDComplexV (const Array< DComplex > *dataPtr)
void putArrayColumnStringV (const Array< String > *dataPtr)
void remove (uInt index)
 Remove the value at the given index.
void putFile (uInt nrval, AipsIO &)
 Write the data into AipsIO.
void getFile (uInt nrval, AipsIO &)
 Read the data from AipsIO.
Bool ok () const
 Check if the class invariants still hold.

Private Member Functions

void deleteArray (uInt index)
 Delete the array at the given index.
void putData (void *datap, uInt nrval, AipsIO &)
 Put the data of a data block.
void getData (void *datap, uInt index, uInt nrval, AipsIO &, uInt version)
 Get data arrays into a data block at the given index.
 StManColumnArrayAipsIO (const StManColumnArrayAipsIO &)
 Forbid copy constructor.
StManColumnArrayAipsIOoperator= (const StManColumnArrayAipsIO &)
 Forbid assignment.

Private Attributes

int dtypeArr_p
 The data type of the array (as defined in DataType.h).
IPosition shape_p
 The shape of the array.
uInt nrelem_p
 The nr of elements in the array.

Detailed Description

AipsIO storage manager for direct table arrays.

Intended use:

Internal

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Prerequisite

Etymology

StManColumnArrayAipsIO handles the access to a direct array in a table column using the AipsIO storage manager.

Synopsis

StManColumnArrayAipsIO holds the direct arrays in memory and writes them into the AipsIO file when the table gets closed. It fully supports addition and removal of rows. When a row is added to the table, the direct array gets allocated. This is possible, because the shape of direct arrays is known.

The class is derived from StManColumnAipsIO which is used to hold a pointer to the array.

Motivation

StManColumnArrayAipsIO handles the standard data types. The class is not templated, but a switch statement is used instead. Templates would cause too many instantiations.

To Do

Definition at line 88 of file StArrAipsIO.h.


Constructor & Destructor Documentation

Create a column of the given data type.

Frees up the storage.

Forbid copy constructor.


Member Function Documentation

void casa::StManColumnArrayAipsIO::addRow ( uInt  newNrrow,
uInt  oldNrrow 
) [virtual]

Add (newNrrow-oldNrrow) rows to the column.

Allocate the data arrays in these rows.

Reimplemented from casa::StManColumnAipsIO.

It can handle access to an entire column.

Reimplemented from casa::DataManagerColumn.

It can handle access to a slice in a cell.

Reimplemented from casa::DataManagerColumn.

Delete the array at the given index.

void casa::StManColumnArrayAipsIO::getArrayBoolV ( uInt  rownr,
Array< Bool > *  dataPtr 
) [virtual]

Get an array value in the given row.

The buffer pointed to by dataPtr has to have the correct length (which is guaranteed by the ArrayColumn get function).

Reimplemented from casa::StManColumn.

Get all array values in the column.

The buffer pointed to by dataPtr has to have the correct length (which is guaranteed by the ArrayColumn getColumn function).

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getArrayColumnComplexV ( Array< Complex > *  dataPtr) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getArrayColumnDComplexV ( Array< DComplex > *  dataPtr) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getArrayColumndoubleV ( Array< double > *  dataPtr) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getArrayColumnfloatV ( Array< float > *  dataPtr) [virtual]

Reimplemented from casa::StManColumn.

Reimplemented from casa::StManColumn.

Reimplemented from casa::StManColumn.

Reimplemented from casa::StManColumn.

Reimplemented from casa::StManColumn.

Reimplemented from casa::StManColumn.

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getArrayComplexV ( uInt  rownr,
Array< Complex > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getArrayDComplexV ( uInt  rownr,
Array< DComplex > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getArraydoubleV ( uInt  rownr,
Array< double > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getArrayfloatV ( uInt  rownr,
Array< float > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getArrayIntV ( uInt  rownr,
Array< Int > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getArrayShortV ( uInt  rownr,
Array< Short > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getArrayStringV ( uInt  rownr,
Array< String > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getArrayuCharV ( uInt  rownr,
Array< uChar > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getArrayuIntV ( uInt  rownr,
Array< uInt > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getArrayuShortV ( uInt  rownr,
Array< uShort > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getData ( void *  datap,
uInt  index,
uInt  nrval,
AipsIO ,
uInt  version 
) [private, virtual]

Get data arrays into a data block at the given index.

datap is an array of pointers to arrays. nrval arrays will be allocated and read starting at datap[index].

Reimplemented from casa::StManColumnAipsIO.

void casa::StManColumnArrayAipsIO::getFile ( uInt  nrval,
AipsIO  
) [virtual]

Read the data from AipsIO.

This will call StManColumnAipsIO::getFile which will in its turn call getData in this class for each of its chunks of data.

Reimplemented from casa::StManColumnAipsIO.

void casa::StManColumnArrayAipsIO::getSliceBoolV ( uInt  rownr,
const Slicer ,
Array< Bool > *  dataPtr 
) [virtual]

Get a section of the array in the given row.

The buffer pointed to by dataPtr has to have the correct length (which is guaranteed by the ArrayColumn getSlice function).

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getSliceComplexV ( uInt  rownr,
const Slicer ,
Array< Complex > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getSliceDComplexV ( uInt  rownr,
const Slicer ,
Array< DComplex > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getSlicedoubleV ( uInt  rownr,
const Slicer ,
Array< double > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getSlicefloatV ( uInt  rownr,
const Slicer ,
Array< float > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getSliceIntV ( uInt  rownr,
const Slicer ,
Array< Int > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getSliceShortV ( uInt  rownr,
const Slicer ,
Array< Short > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getSliceStringV ( uInt  rownr,
const Slicer ,
Array< String > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getSliceuCharV ( uInt  rownr,
const Slicer ,
Array< uChar > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getSliceuIntV ( uInt  rownr,
const Slicer ,
Array< uInt > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::getSliceuShortV ( uInt  rownr,
const Slicer ,
Array< uShort > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

Get the dimensionality of the item in the given row.

This is the same for all rows.

Reimplemented from casa::DataManagerColumn.

Check if the class invariants still hold.

Reimplemented from casa::StManColumnAipsIO.

StManColumnArrayAipsIO& casa::StManColumnArrayAipsIO::operator= ( const StManColumnArrayAipsIO ) [private]

Forbid assignment.

void casa::StManColumnArrayAipsIO::putArrayBoolV ( uInt  rownr,
const Array< Bool > *  dataPtr 
) [virtual]

Put an array value into the given row.

The buffer pointed to by dataPtr has to have the correct length (which is guaranteed by the ArrayColumn put function).

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayColumnBoolV ( const Array< Bool > *  dataPtr) [virtual]

Put all arrays in the column.

The buffer pointed to by dataPtr has to have the correct length (which is guaranteed by the ArrayColumn putColumn function).

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayColumnComplexV ( const Array< Complex > *  dataPtr) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayColumnDComplexV ( const Array< DComplex > *  dataPtr) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayColumndoubleV ( const Array< double > *  dataPtr) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayColumnfloatV ( const Array< float > *  dataPtr) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayColumnIntV ( const Array< Int > *  dataPtr) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayColumnShortV ( const Array< Short > *  dataPtr) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayColumnStringV ( const Array< String > *  dataPtr) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayColumnuCharV ( const Array< uChar > *  dataPtr) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayColumnuIntV ( const Array< uInt > *  dataPtr) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayColumnuShortV ( const Array< uShort > *  dataPtr) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayComplexV ( uInt  rownr,
const Array< Complex > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayDComplexV ( uInt  rownr,
const Array< DComplex > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArraydoubleV ( uInt  rownr,
const Array< double > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayfloatV ( uInt  rownr,
const Array< float > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayIntV ( uInt  rownr,
const Array< Int > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayShortV ( uInt  rownr,
const Array< Short > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayStringV ( uInt  rownr,
const Array< String > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayuCharV ( uInt  rownr,
const Array< uChar > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayuIntV ( uInt  rownr,
const Array< uInt > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putArrayuShortV ( uInt  rownr,
const Array< uShort > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putData ( void *  datap,
uInt  nrval,
AipsIO  
) [private, virtual]

Put the data of a data block.

datap is an array of nrval pointers to arrays.

Reimplemented from casa::StManColumnAipsIO.

void casa::StManColumnArrayAipsIO::putFile ( uInt  nrval,
AipsIO  
) [virtual]

Write the data into AipsIO.

This will call StManColumnAipsIO::putFile which will in its turn call putData in this class for each of its chunks of data.

Reimplemented from casa::StManColumnAipsIO.

void casa::StManColumnArrayAipsIO::putSliceBoolV ( uInt  rownr,
const Slicer ,
const Array< Bool > *  dataPtr 
) [virtual]

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

The buffer pointed to by dataPtr has to have the correct length (which is guaranteed by the ArrayColumn putSlice function).

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putSliceComplexV ( uInt  rownr,
const Slicer ,
const Array< Complex > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putSliceDComplexV ( uInt  rownr,
const Slicer ,
const Array< DComplex > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putSlicedoubleV ( uInt  rownr,
const Slicer ,
const Array< double > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putSlicefloatV ( uInt  rownr,
const Slicer ,
const Array< float > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putSliceIntV ( uInt  rownr,
const Slicer ,
const Array< Int > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putSliceShortV ( uInt  rownr,
const Slicer ,
const Array< Short > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putSliceStringV ( uInt  rownr,
const Slicer ,
const Array< String > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putSliceuCharV ( uInt  rownr,
const Slicer ,
const Array< uChar > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putSliceuIntV ( uInt  rownr,
const Slicer ,
const Array< uInt > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::putSliceuShortV ( uInt  rownr,
const Slicer ,
const Array< uShort > *  dataPtr 
) [virtual]

Reimplemented from casa::StManColumn.

void casa::StManColumnArrayAipsIO::remove ( uInt  index) [virtual]

Remove the value at the given index.

Reimplemented from casa::StManColumnAipsIO.

void casa::StManColumnArrayAipsIO::setShapeColumn ( const IPosition shape) [virtual]

Set the shape of the arrays in the entire column.

Reimplemented from casa::DataManagerColumn.

Get the shape of the array in the given row.

This is the same for all rows.

Reimplemented from casa::DataManagerColumn.


Member Data Documentation

The data type of the array (as defined in DataType.h).

Definition at line 250 of file StArrAipsIO.h.

The nr of elements in the array.

Definition at line 254 of file StArrAipsIO.h.

The shape of the array.

Definition at line 252 of file StArrAipsIO.h.


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