SSMIndColumn.h
Classes
- SSMIndColumn -- A column of Standard storage manager for indirect arrays. (full description)
Interface
- Public Members
- SSMIndColumn (SSMBase* aParent, int aDataType, uInt aColNr)
- ~SSMIndColumn()
- virtual void setMaxLength (uInt maxLength)
- virtual Bool canAccessSlice (Bool& reask) const
- virtual void addRow (uInt aNewNrRows, uInt anOldNrRows, Bool doInit)
- virtual void setShapeColumn (const IPosition& aShape)
- virtual uInt ndim (uInt aRowNr)
- void setShape (uInt aRowNr, const IPosition& aShape)
- virtual Bool isShapeDefined (uInt aRowNr)
- virtual IPosition shape (uInt aRowNr)
- Bool canChangeShape() const
- virtual void getArrayBoolV (uInt aRowNr, Array<Bool>* aDataPtr)
- 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)
- 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)
- 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)
- 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)
- virtual void getFile (uInt aNrRows)
- virtual void deleteRow(uInt aRowNr)
- Private Members
- SSMIndColumn (const SSMIndColumn&)
- SSMIndColumn& operator= (const SSMIndColumn&)
- void init()
- StIndArray* getShape (uInt aRowNr)
- StIndArray* getArrayPtr (uInt aRowNr)
Review Status
- Programs:
- Tests:
Prerequisite
Etymology
SSMIndColumn represents a Column in the Standard Storage Manager
containing Indirect arrays.
Synopsis
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.
Member Description
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.
virtual void setMaxLength (uInt maxLength)
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.
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.
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.
Is the shape defined (i.e. is there an array) in this row?
Get the shape of the array in the given row.
This storage manager can handle changing array shapes.
virtual void getArrayBoolV (uInt aRowNr, Array<Bool>* aDataPtr)
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)
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).
virtual void putArrayBoolV (uInt aRowNr, const Array<Bool>* aDataPtr)
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)
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).
virtual void getSliceBoolV (uInt aRowNr, const Slicer&, Array<Bool>* aDataPtr)
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)
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).
virtual void putSliceBoolV (uInt aRowNr, const Slicer&, const Array<Bool>* aDataPtr)
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)
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).
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.
Forbid copy constructor.
SSMIndColumn& operator= (const SSMIndColumn&)
Forbid assignment.
Initialize part of the object and open/create the file.
It is used by doCreate and getFile.
Read the shape at the given row.
This will cache the information in the StIndArray
object for that row.
Return a pointer to the array in the given row (for a get).