casa
$Rev:20696$
|
A column of Standard storage manager for indirect arrays. More...
#include <SSMIndColumn.h>
Public Member Functions | |
SSMIndColumn (SSMBase *aParent, int aDataType, uInt aColNr) | |
Create a column of the given data type. | |
~SSMIndColumn () | |
Frees up the storage. | |
virtual void | setMaxLength (uInt maxLength) |
An array of 'fixed length' strings is not handled specially, thus this function is ignored. | |
virtual Bool | canAccessSlice (Bool &reask) const |
It can handle access to a slice in a cell. | |
virtual void | addRow (uInt aNewNrRows, uInt anOldNrRows, Bool doInit) |
Add (newNrrow-oldNrrow) rows to the column. | |
virtual void | setShapeColumn (const IPosition &aShape) |
Set the (fixed) shape of the arrays in the entire column. | |
virtual uInt | ndim (uInt aRowNr) |
Get the dimensionality of the item in the given row. | |
void | setShape (uInt aRowNr, const IPosition &aShape) |
Set the shape of the array in the given row and allocate the array in the file. | |
virtual Bool | isShapeDefined (uInt aRowNr) |
Is the shape defined (i.e. | |
virtual IPosition | shape (uInt aRowNr) |
Get the shape of the array in the given row. | |
Bool | canChangeShape () const |
This storage manager can handle changing array shapes. | |
virtual void | getArrayBoolV (uInt aRowNr, Array< Bool > *aDataPtr) |
Get an array value in the given row. | |
virtual void | getArrayuCharV (uInt aRowNr, Array< uChar > *aDataPtr) |
virtual void | getArrayShortV (uInt aRowNr, Array< Short > *aDataPtr) |
virtual void | getArrayuShortV (uInt aRowNr, Array< uShort > *aDataPtr) |
virtual void | getArrayIntV (uInt aRowNr, Array< Int > *aDataPtr) |
virtual void | getArrayuIntV (uInt aRowNr, Array< uInt > *aDataPtr) |
virtual void | getArrayfloatV (uInt aRowNr, Array< float > *aDataPtr) |
virtual void | getArraydoubleV (uInt aRowNr, Array< double > *aDataPtr) |
virtual void | getArrayComplexV (uInt aRowNr, Array< Complex > *aDataPtr) |
virtual void | getArrayDComplexV (uInt aRowNr, Array< DComplex > *aDataPtr) |
virtual void | getArrayStringV (uInt aRowNr, Array< String > *aDataPtr) |
virtual void | putArrayBoolV (uInt aRowNr, const Array< Bool > *aDataPtr) |
Put an array value into the given row. | |
virtual void | putArrayuCharV (uInt aRowNr, const Array< uChar > *aDataPtr) |
virtual void | putArrayShortV (uInt aRowNr, const Array< Short > *aDataPtr) |
virtual void | putArrayuShortV (uInt aRowNr, const Array< uShort > *aDataPtr) |
virtual void | putArrayIntV (uInt aRowNr, const Array< Int > *aDataPtr) |
virtual void | putArrayuIntV (uInt aRowNr, const Array< uInt > *aDataPtr) |
virtual void | putArrayfloatV (uInt aRowNr, const Array< float > *aDataPtr) |
virtual void | putArraydoubleV (uInt aRowNr, const Array< double > *aDataPtr) |
virtual void | putArrayComplexV (uInt aRowNr, const Array< Complex > *aDataPtr) |
virtual void | putArrayDComplexV (uInt aRowNr, const Array< DComplex > *aDataPtr) |
virtual void | putArrayStringV (uInt aRowNr, const Array< String > *aDataPtr) |
virtual void | getSliceBoolV (uInt aRowNr, const Slicer &, Array< Bool > *aDataPtr) |
Get a section of the array in the given row. | |
virtual void | getSliceuCharV (uInt aRowNr, const Slicer &, Array< uChar > *aDataPtr) |
virtual void | getSliceShortV (uInt aRowNr, const Slicer &, Array< Short > *aDataPtr) |
virtual void | getSliceuShortV (uInt aRowNr, const Slicer &, Array< uShort > *aDataPtr) |
virtual void | getSliceIntV (uInt aRowNr, const Slicer &, Array< Int > *aDataPtr) |
virtual void | getSliceuIntV (uInt aRowNr, const Slicer &, Array< uInt > *aDataPtr) |
virtual void | getSlicefloatV (uInt aRowNr, const Slicer &, Array< float > *aDataPtr) |
virtual void | getSlicedoubleV (uInt aRowNr, const Slicer &, Array< double > *aDataPtr) |
virtual void | getSliceComplexV (uInt aRowNr, const Slicer &, Array< Complex > *aDataPtr) |
virtual void | getSliceDComplexV (uInt aRowNr, const Slicer &, Array< DComplex > *aDataPtr) |
virtual void | getSliceStringV (uInt aRowNr, const Slicer &, Array< String > *aDataPtr) |
virtual void | putSliceBoolV (uInt aRowNr, const Slicer &, const Array< Bool > *aDataPtr) |
Put into a section of the array in the given row. | |
virtual void | putSliceuCharV (uInt aRowNr, const Slicer &, const Array< uChar > *aDataPtr) |
virtual void | putSliceShortV (uInt aRowNr, const Slicer &, const Array< Short > *aDataPtr) |
virtual void | putSliceuShortV (uInt aRowNr, const Slicer &, const Array< uShort > *aDataPtr) |
virtual void | putSliceIntV (uInt aRowNr, const Slicer &, const Array< Int > *aDataPtr) |
virtual void | putSliceuIntV (uInt aRowNr, const Slicer &, const Array< uInt > *aDataPtr) |
virtual void | putSlicefloatV (uInt aRowNr, const Slicer &, const Array< float > *aDataPtr) |
virtual void | putSlicedoubleV (uInt aRowNr, const Slicer &, const Array< double > *aDataPtr) |
virtual void | putSliceComplexV (uInt aRowNr, const Slicer &, const Array< Complex > *aDataPtr) |
virtual void | putSliceDComplexV (uInt aRowNr, const Slicer &, const Array< DComplex > *aDataPtr) |
virtual void | putSliceStringV (uInt aRowNr, const Slicer &, const Array< String > *aDataPtr) |
virtual void | doCreate (uInt aNrRows) |
Let the column object create its array file. | |
virtual void | getFile (uInt aNrRows) |
Open an existing file. | |
virtual void | deleteRow (uInt aRowNr) |
Remove the given row from the data bucket and possibly string bucket. | |
Private Member Functions | |
SSMIndColumn (const SSMIndColumn &) | |
Forbid copy constructor. | |
SSMIndColumn & | operator= (const SSMIndColumn &) |
Forbid assignment. | |
void | init () |
Initialize part of the object and open/create the file. | |
StIndArray * | getShape (uInt aRowNr) |
Read the shape at the given row. | |
StIndArray * | getArrayPtr (uInt aRowNr) |
Return a pointer to the array in the given row (for a get). | |
Private Attributes | |
IPosition | itsFixedShape |
Bool | isShapeFixed |
StManArrayFile * | itsIosFile |
StIndArray | itsIndArray |
A column of Standard storage manager for indirect arrays.
Internal
SSMIndColumn represents a Column in the Standard Storage Manager containing Indirect arrays.
SSMIndColumn is the implementation of an SSMColumn class to handle indirect arrays. The arrays (shape and data) are stored in a separate file using class StIndArray . The file offset of the beginning of the array in stored in the appropriate data bucket using the standard SSMColumn functions.
Note that an indirect array can have a fixed shape. In that case adding a row results in reserving space for the array in the StIndArray file, so for each row an array is present. On the other hand adding a row does nothing for variable shaped arrays. So when no data is put or shape is set, a row may contain no array at all. In that case the function isShapeDefined
returns False for that row.
Indirect arrays containing strings are not handled by this class, but by SSMIndStringColumn . That class stores those string arrays in the special string buckets instead of using StIndArray. The reason is that the string buckets are more disk space efficient when string arrays are frequently updated.
Definition at line 93 of file SSMIndColumn.h.
casa::SSMIndColumn::SSMIndColumn | ( | SSMBase * | aParent, |
int | aDataType, | ||
uInt | aColNr | ||
) |
Create a column of the given data type.
It keeps the pointer to its parent (but does not own it).
Frees up the storage.
casa::SSMIndColumn::SSMIndColumn | ( | const SSMIndColumn & | ) | [private] |
Forbid copy constructor.
virtual void casa::SSMIndColumn::addRow | ( | uInt | aNewNrRows, |
uInt | anOldNrRows, | ||
Bool | doInit | ||
) | [virtual] |
Add (newNrrow-oldNrrow) rows to the column.
Reimplemented from casa::SSMColumn.
virtual Bool casa::SSMIndColumn::canAccessSlice | ( | Bool & | reask | ) | const [virtual] |
It can handle access to a slice in a cell.
Reimplemented from casa::DataManagerColumn.
Bool casa::SSMIndColumn::canChangeShape | ( | ) | const [virtual] |
This storage manager can handle changing array shapes.
Reimplemented from casa::DataManagerColumn.
virtual void casa::SSMIndColumn::deleteRow | ( | uInt | aRowNr | ) | [virtual] |
Remove the given row from the data bucket and possibly string bucket.
Reimplemented from casa::SSMColumn.
virtual void casa::SSMIndColumn::doCreate | ( | uInt | aNrRows | ) | [virtual] |
Let the column object create its array file.
Reimplemented from casa::SSMColumn.
virtual void casa::SSMIndColumn::getArrayBoolV | ( | uInt | aRowNr, |
Array< Bool > * | aDataPtr | ||
) | [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.
virtual void casa::SSMIndColumn::getArrayComplexV | ( | uInt | aRowNr, |
Array< Complex > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getArrayDComplexV | ( | uInt | aRowNr, |
Array< DComplex > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getArraydoubleV | ( | uInt | aRowNr, |
Array< double > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getArrayfloatV | ( | uInt | aRowNr, |
Array< float > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getArrayIntV | ( | uInt | aRowNr, |
Array< Int > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
StIndArray* casa::SSMIndColumn::getArrayPtr | ( | uInt | aRowNr | ) | [private] |
Return a pointer to the array in the given row (for a get).
virtual void casa::SSMIndColumn::getArrayShortV | ( | uInt | aRowNr, |
Array< Short > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getArrayStringV | ( | uInt | aRowNr, |
Array< String > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getArrayuCharV | ( | uInt | aRowNr, |
Array< uChar > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getArrayuIntV | ( | uInt | aRowNr, |
Array< uInt > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getArrayuShortV | ( | uInt | aRowNr, |
Array< uShort > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getFile | ( | uInt | aNrRows | ) | [virtual] |
Open an existing file.
Reimplemented from casa::SSMColumn.
StIndArray* casa::SSMIndColumn::getShape | ( | uInt | aRowNr | ) | [private] |
Read the shape at the given row.
This will cache the information in the StIndArray object for that row.
virtual void casa::SSMIndColumn::getSliceBoolV | ( | uInt | aRowNr, |
const Slicer & | , | ||
Array< Bool > * | aDataPtr | ||
) | [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.
virtual void casa::SSMIndColumn::getSliceComplexV | ( | uInt | aRowNr, |
const Slicer & | , | ||
Array< Complex > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getSliceDComplexV | ( | uInt | aRowNr, |
const Slicer & | , | ||
Array< DComplex > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getSlicedoubleV | ( | uInt | aRowNr, |
const Slicer & | , | ||
Array< double > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getSlicefloatV | ( | uInt | aRowNr, |
const Slicer & | , | ||
Array< float > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getSliceIntV | ( | uInt | aRowNr, |
const Slicer & | , | ||
Array< Int > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getSliceShortV | ( | uInt | aRowNr, |
const Slicer & | , | ||
Array< Short > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getSliceStringV | ( | uInt | aRowNr, |
const Slicer & | , | ||
Array< String > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getSliceuCharV | ( | uInt | aRowNr, |
const Slicer & | , | ||
Array< uChar > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getSliceuIntV | ( | uInt | aRowNr, |
const Slicer & | , | ||
Array< uInt > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::getSliceuShortV | ( | uInt | aRowNr, |
const Slicer & | , | ||
Array< uShort > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
void casa::SSMIndColumn::init | ( | ) | [private] |
Initialize part of the object and open/create the file.
It is used by doCreate and getFile.
Reimplemented from casa::SSMColumn.
virtual Bool casa::SSMIndColumn::isShapeDefined | ( | uInt | aRowNr | ) | [virtual] |
Is the shape defined (i.e.
is there an array) in this row?
Reimplemented from casa::DataManagerColumn.
virtual uInt casa::SSMIndColumn::ndim | ( | uInt | aRowNr | ) | [virtual] |
Get the dimensionality of the item in the given row.
Reimplemented from casa::SSMColumn.
SSMIndColumn& casa::SSMIndColumn::operator= | ( | const SSMIndColumn & | ) | [private] |
Forbid assignment.
virtual void casa::SSMIndColumn::putArrayBoolV | ( | uInt | aRowNr, |
const Array< Bool > * | aDataPtr | ||
) | [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.
virtual void casa::SSMIndColumn::putArrayComplexV | ( | uInt | aRowNr, |
const Array< Complex > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putArrayDComplexV | ( | uInt | aRowNr, |
const Array< DComplex > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putArraydoubleV | ( | uInt | aRowNr, |
const Array< double > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putArrayfloatV | ( | uInt | aRowNr, |
const Array< float > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putArrayIntV | ( | uInt | aRowNr, |
const Array< Int > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putArrayShortV | ( | uInt | aRowNr, |
const Array< Short > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putArrayStringV | ( | uInt | aRowNr, |
const Array< String > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putArrayuCharV | ( | uInt | aRowNr, |
const Array< uChar > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putArrayuIntV | ( | uInt | aRowNr, |
const Array< uInt > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putArrayuShortV | ( | uInt | aRowNr, |
const Array< uShort > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putSliceBoolV | ( | uInt | aRowNr, |
const Slicer & | , | ||
const Array< Bool > * | aDataPtr | ||
) | [virtual] |
Put into a section of the array in the given row.
The buffer pointed to by aDataPtr has to have the correct length (which is guaranteed by the ArrayColumn putSlice function).
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putSliceComplexV | ( | uInt | aRowNr, |
const Slicer & | , | ||
const Array< Complex > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putSliceDComplexV | ( | uInt | aRowNr, |
const Slicer & | , | ||
const Array< DComplex > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putSlicedoubleV | ( | uInt | aRowNr, |
const Slicer & | , | ||
const Array< double > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putSlicefloatV | ( | uInt | aRowNr, |
const Slicer & | , | ||
const Array< float > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putSliceIntV | ( | uInt | aRowNr, |
const Slicer & | , | ||
const Array< Int > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putSliceShortV | ( | uInt | aRowNr, |
const Slicer & | , | ||
const Array< Short > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putSliceStringV | ( | uInt | aRowNr, |
const Slicer & | , | ||
const Array< String > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putSliceuCharV | ( | uInt | aRowNr, |
const Slicer & | , | ||
const Array< uChar > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putSliceuIntV | ( | uInt | aRowNr, |
const Slicer & | , | ||
const Array< uInt > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::putSliceuShortV | ( | uInt | aRowNr, |
const Slicer & | , | ||
const Array< uShort > * | aDataPtr | ||
) | [virtual] |
Reimplemented from casa::StManColumn.
virtual void casa::SSMIndColumn::setMaxLength | ( | uInt | maxLength | ) | [virtual] |
An array of 'fixed length' strings is not handled specially, thus this function is ignored.
It is needed to override the bahviour of the base class.
Reimplemented from casa::SSMColumn.
void casa::SSMIndColumn::setShape | ( | uInt | aRowNr, |
const IPosition & | aShape | ||
) | [virtual] |
Set the shape of the array in the given row and allocate the array in the file.
Reimplemented from casa::DataManagerColumn.
virtual void casa::SSMIndColumn::setShapeColumn | ( | const IPosition & | aShape | ) | [virtual] |
Set the (fixed) shape of the arrays in the entire column.
Reimplemented from casa::SSMColumn.
virtual IPosition casa::SSMIndColumn::shape | ( | uInt | aRowNr | ) | [virtual] |
Get the shape of the array in the given row.
Reimplemented from casa::SSMColumn.
Bool casa::SSMIndColumn::isShapeFixed [private] |
Definition at line 267 of file SSMIndColumn.h.
IPosition casa::SSMIndColumn::itsFixedShape [private] |
Definition at line 265 of file SSMIndColumn.h.
StIndArray casa::SSMIndColumn::itsIndArray [private] |
Definition at line 271 of file SSMIndColumn.h.
StManArrayFile* casa::SSMIndColumn::itsIosFile [private] |
Definition at line 269 of file SSMIndColumn.h.