StArrAipsIO.h

Classes

StManColumnArrayAipsIO -- AipsIO storage manager for direct table arrays (full description)

class StManColumnArrayAipsIO : public StManColumnAipsIO

Interface

Public Members
StManColumnArrayAipsIO (StManAipsIO*, int dataType)
~StManColumnArrayAipsIO()
Bool canAccessSlice (Bool& reask) const
Bool canAccessArrayColumn (Bool& reask) const
void setShapeColumn (const IPosition& shape)
void addRow (uInt newNrrow, uInt oldNrrow)
uInt ndim (uInt rownr)
IPosition shape (uInt rownr)
void getArrayBoolV (uInt rownr, Array<Bool>* dataPtr)
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)
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)
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)
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)
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)
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)
void putFile (uInt nrval, AipsIO&)
void getFile (uInt nrval, AipsIO&)
Bool ok() const
Private Members
void deleteArray (uInt index)
void putData (void* datap, uInt nrval, AipsIO&)
void getData (void* datap, uInt index, uInt nrval, AipsIO&, uInt version)
StManColumnArrayAipsIO (const StManColumnArrayAipsIO&)
StManColumnArrayAipsIO& operator= (const StManColumnArrayAipsIO&)

Description

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

Member Description

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. Allocate the data arrays in these rows.

uInt ndim (uInt rownr)

Get the dimensionality of the item in the given row. This is the same for all rows.

IPosition shape (uInt rownr)

Get the shape of the array in the given row. This is the same for all rows.

void getArrayBoolV (uInt rownr, Array<Bool>* dataPtr)
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)

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).

void putArrayBoolV (uInt rownr, const Array<Bool>* dataPtr)
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)

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).

void getSliceBoolV (uInt rownr, const Slicer&, Array<Bool>* dataPtr)
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)

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).

void putSliceBoolV (uInt rownr, const Slicer&, const Array<Bool>* dataPtr)
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)

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).

void getArrayColumnBoolV (Array<Bool>* dataPtr)
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)

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).

void putArrayColumnBoolV (const Array<Bool>* dataPtr)
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)

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).

void remove (uInt index)

Remove the value at the given index.

void putFile (uInt nrval, AipsIO&)

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.

void getFile (uInt nrval, AipsIO&)

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.

Bool ok() const

Check if the class invariants still hold.

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. datap is an array of nrval pointers to arrays.

void getData (void* datap, uInt index, uInt nrval, AipsIO&, uInt version)

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].

StManColumnArrayAipsIO (const StManColumnArrayAipsIO&)

Forbid copy constructor.

StManColumnArrayAipsIO& operator= (const StManColumnArrayAipsIO&)

Forbid assignment.