casa
$Rev:20696$
|
Give access to some TiledDataStMan functions. More...
#include <TiledDataStManAccessor.h>
Public Member Functions | |
TiledDataStManAccessor (const Table &table, const String &dataManagerName) | |
Construct the object for the data manager in the table. | |
TiledDataStManAccessor () | |
~TiledDataStManAccessor () | |
TiledDataStManAccessor (const TiledDataStManAccessor &that) | |
Copy constructor (reference semantics). | |
TiledDataStManAccessor & | operator= (const TiledDataStManAccessor &that) |
Assignment (reference semantics). | |
void | addHypercube (const IPosition &cubeShape, const IPosition &tileShape, const Record &values) |
Add a hypercube. | |
void | extendHypercube (uInt incrInLastDim, const Record &values) |
Extend the hypercube with the given number of elements in the last dimension. | |
Private Attributes | |
TiledDataStMan * | tiledDataManPtr_p |
Give access to some TiledDataStMan functions.
Public interface
The Table system has one or more storage managers underneath. These storage managers are invisible and there is no way to get access to them. However, the TiledDataStMan storage manager is quite specific. It has a few functions which need to be called by the user, in particular the functions defining and extending a hypercube.
The class TiledDataStManAccessor gives the user the means to access a TiledDataStMan object and to call the functions mentioned above. It can only be constructed for a table opened for read/write (because the functions in it need write access).
In principle a pointer to TiledDataStMan could be used. However, that would give access to all public functions. Furthermore it could not distinguish between read/write and readonly tables.
// Open a table for write. Table table ("someName", Table::Update); // Get access to the tiled data storage manager with name UVdata. TiledDataStManAccessor accessor (Table, "UVdata"); // Add a hypercube to it (requires addition of rows). // Define the values of the ID and coordinate columns. // (The coordinate vectors have to be filled in one way or another). Vector<double> timeVector(70); Vector<double> baselineVector(60); Vector<double> freqVector(50); Vector<double> polVector(4); Record values; values.define ("ID", 4); // ID=4 values.define ("time", timeVector); values.define ("baseline", baselineVector); values.define ("freq", freqVector); values.define ("pol", polVector); table.addRow (4200); accessor.addHypercube (IPosition(4,4,50,60,70), // cube shape IPosition(4,4,5,6,7), // tile shape values); // id/coord values
Definition at line 116 of file TiledDataStManAccessor.h.
casa::TiledDataStManAccessor::TiledDataStManAccessor | ( | const Table & | table, |
const String & | dataManagerName | ||
) |
Construct the object for the data manager in the table.
An exception is thrown if the data manager type does not match the type of this TiledDataStManAccessor object. Also an exception is thrown if the table is not open for read/write.
Copy constructor (reference semantics).
void casa::TiledDataStManAccessor::addHypercube | ( | const IPosition & | cubeShape, |
const IPosition & | tileShape, | ||
const Record & | values | ||
) |
Add a hypercube.
The possible coordinate- and id-values have to be given in the record (where the field names should be equal to the coordinate and id column names).
void casa::TiledDataStManAccessor::extendHypercube | ( | uInt | incrInLastDim, |
const Record & | values | ||
) |
Extend the hypercube with the given number of elements in the last dimension.
The record should contain the id values (to get the correct hypercube) and coordinate values for the elements added.
TiledDataStManAccessor& casa::TiledDataStManAccessor::operator= | ( | const TiledDataStManAccessor & | that | ) |
Assignment (reference semantics).
Definition at line 152 of file TiledDataStManAccessor.h.