StManColumnAipsIO serves 2 purposes:
StManColumnAipsIO does not hold a column as a consecutive array, because extending the column (i.e. adding rows) proofed be too expensive due to the repeated copying involved when creating a table (this method was used by the old table system). Instead it has a number of data blocks (extensions) indexed to by a super block. Accessing a row means finding the appropriate extension via a binary search. Because there is only 1 extension when a table is read back, the overhead in finding a row is small.
Frees up the storage.
Get a scalar value in the given row. The buffer pointed to by dataPtr has to have the correct length (which is guaranteed by the Scalar/ArrayColumn get function).
Put a scalar value into the given row. The buffer pointed to by dataPtr has to have the correct length (which is guaranteed by the Scalar/ArrayColumn put function).
Get scalars from the given row on with a maximum of nrmax values. This can be used to get an entire column of scalars or to get a part of a column (for a cache for example). The buffer pointed to by dataPtr has to have the correct length (which is guaranteed by the ScalarColumn get function).
Put nrmax scalars from the given row on. This can be used to put an entire column of scalars or to put a part of a column (for a cache for example). The buffer pointed to by dataPtr has to have the correct length (which is guaranteed by the ScalarColumn put function).
Get the scalar values in some cells of the column. The buffer pointed to by dataPtr has to have the correct length. (which is guaranteed by the ScalarColumn getColumnCells function). The default implementation loops through all rows.
Add (newNrrow-oldNrrow) rows to the column.
Resize the data blocks. This adds an extension when needed.
Remove the given row. If no rows remain in the extension, the extension is also removed.
Create the number of rows in a new table. This is used when a table gets created.
Write the column data into AipsIO. It will successively write all extensions using putData.
Read the column data from AipsIO. One extension gets allocated to hold all rows in the column.
Reopen the storage manager files for read/write.
Check if the class invariants still hold.
Find the extension in which the row number is. If the flag is true, it also sets the columnCache object.
Get the next extension. For the first iteration extnr should be zero. It returns the number of values in it until the maximum is reached. Zero means no more extensions.
Allocate an extension with the data type of the column.
Delete all extensions. Possible underlying data (as used by StManArrayColumnAipsIO) will not be deleted and should have been deleted beforehand.
Delete an extension.
Remove an entry (i.e. a row) from an extension at the given index. It will do this by shifting the rest (nrvalAfter elements) one position to the left.
Put the data (nrval elements) in an extension (starting at datap) into AipsIO.
Get data (nrval elements) into an extension (starting at datap plus the given index).
Get the pointer for the given row. This is for the derived classes like StManArrayColumnAipsIO.
Put the pointer for the given row. This is for the derived classes like StManArrayColumnAipsIO.
Forbid assignment.
The AipsIO storage manager does fully support addition and removal of rows and columns.
All data, except indirect columns, for this storage manager are kept in one file. The file name is the table name appended with .N_AipsIO, where N is the (unique) storage manager sequence number. Each column containing indirect arrays is stored in a separate file using class StManIndArrayColumnAipsIO. The name of such a file is the storage manager file name appended with _cM, where M is a unique column sequence number acquired using function uniqueNr().
Create an AipsIO storage manager with the given name.
Its name can be used later in e.g. Table::addColumn to
add a column to this storage manager.
Note that the 2nd constructor is needed for table creation
from a record specification.
Clone this object. It does not clone StManAipsIOColumn objects possibly used.
Get the type name of the data manager (i.e. StManAipsIO).
Get the name given to this storage manager.
Get a unique column number for the column (it is only unique for this storage manager). This is used by StManIndArrayColumnAipsIO to create a unique file name.
Get the nr of rows in this storage manager.
Set the hasPut_p flag. In this way the StManAipsIOColumn objects can indicate that data have been put.
Does the storage manager allow to add rows? (yes)
Does the storage manager allow to delete rows? (yes)
Does the storage manager allow to add columns? (yes)
Does the storage manager allow to delete columns? (yes)
Make the object from the string. This function gets registered in the DataManager "constructor" map.
Open (if needed) the file for indirect arrays with the given mode. Return a pointer to the object.
Forbid assignment.
Flush and optionally fsync the data. It returns a True status if it had to flush (i.e. if data have changed).
Let the storage manager create files as needed for a new table. This allows a column with an indirect array to create its file.
Open the storage manager file for an existing table and read in the data and let the StManColumnAipsIO objects read their data.
Resync the storage manager with the new file contents. This is done by clearing the cache.
Reopen the storage manager files for read/write.
The data manager will be deleted (because all its columns are requested to be deleted). So clean up the things needed (e.g. delete files).
Add rows to all columns.
Delete a row from all columns.
Create a column in the storage manager on behalf of a table column.
Create a scalar column.
Create a column in the storage manager on behalf of a table column.
Create a direct array column.
Create a column in the storage manager on behalf of a table column.
Create an indirect array column.
Add a column.
Delete a column.