casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | List of all members
casacore::ISMColumn Class Reference

A Column in the Incremental Storage Manager. More...

#include <ISMColumn.h>

Inheritance diagram for casacore::ISMColumn:
casacore::StManColumnBase casacore::DataManagerColumn casacore::ISMIndColumn

Public Member Functions

 ISMColumn (ISMBase *parent, int dataType, uInt colnr)
 Create a ISMColumn object with the given parent. More...
 
 ~ISMColumn ()
 
virtual void setShapeColumn (const IPosition &shape)
 Set the shape of an array in the column. More...
 
virtual uInt ndim (rownr_t rownr)
 Get the dimensionality of the item in the given row. More...
 
virtual IPosition shape (rownr_t rownr)
 Get the shape of the array in the given row. More...
 
virtual void doCreate (ISMBucket *)
 Let the column object initialize itself for a newly created table. More...
 
virtual void getFile (rownr_t nrrow)
 Let the column object initialize itself for an existing table. More...
 
virtual Bool flush (rownr_t nrrow, Bool fsync)
 Flush and optionally fsync the data. More...
 
void resync (rownr_t nrrow)
 Resync the storage manager with the new file contents. More...
 
virtual void reopenRW ()
 Let the column reopen its data files for read/write access. More...
 
virtual void getBool (rownr_t rownr, Bool *dataPtr)
 Get a scalar value in the given row. More...
 
virtual void getuChar (rownr_t rownr, uChar *dataPtr)
 
virtual void getShort (rownr_t rownr, Short *dataPtr)
 
virtual void getuShort (rownr_t rownr, uShort *dataPtr)
 
virtual void getInt (rownr_t rownr, Int *dataPtr)
 
virtual void getuInt (rownr_t rownr, uInt *dataPtr)
 
virtual void getInt64 (rownr_t rownr, Int64 *dataPtr)
 
virtual void getfloat (rownr_t rownr, float *dataPtr)
 
virtual void getdouble (rownr_t rownr, double *dataPtr)
 
virtual void getComplex (rownr_t rownr, Complex *dataPtr)
 
virtual void getDComplex (rownr_t rownr, DComplex *dataPtr)
 
virtual void getString (rownr_t rownr, String *dataPtr)
 
virtual void putBool (rownr_t rownr, const Bool *dataPtr)
 Put a scalar value in the given row. More...
 
virtual void putuChar (rownr_t rownr, const uChar *dataPtr)
 
virtual void putShort (rownr_t rownr, const Short *dataPtr)
 
virtual void putuShort (rownr_t rownr, const uShort *dataPtr)
 
virtual void putInt (rownr_t rownr, const Int *dataPtr)
 
virtual void putuInt (rownr_t rownr, const uInt *dataPtr)
 
virtual void putInt64 (rownr_t rownr, const Int64 *dataPtr)
 
virtual void putfloat (rownr_t rownr, const float *dataPtr)
 
virtual void putdouble (rownr_t rownr, const double *dataPtr)
 
virtual void putComplex (rownr_t rownr, const Complex *dataPtr)
 
virtual void putDComplex (rownr_t rownr, const DComplex *dataPtr)
 
virtual void putString (rownr_t rownr, const String *dataPtr)
 
virtual void getScalarColumnV (ArrayBase &dataPtr)
 Get the scalar values in the entire column. More...
 
virtual void putScalarColumnV (const ArrayBase &dataPtr)
 Put the scalar values into the entire column. More...
 
virtual void getScalarColumnCellsV (const RefRows &rownrs, ArrayBase &dataPtr)
 Get the scalar values in some cells of the column. More...
 
virtual void getArrayV (rownr_t rownr, ArrayBase &dataPtr)
 Get an array value in the given row. More...
 
virtual void putArrayV (rownr_t rownr, const ArrayBase &dataPtr)
 Put an array value in the given row. More...
 
virtual void addRow (rownr_t newNrrow, rownr_t oldNrrow)
 Add (newNrrow-oldNrrow) rows to the column and initialize the new rows when needed. More...
 
void remove (rownr_t bucketRownr, ISMBucket *bucket, rownr_t bucketNrrow, rownr_t newNrrow)
 Remove the given row in the bucket from the column. More...
 
virtual void handleCopy (rownr_t rownr, const char *value)
 Give a derived class the opportunity to react on the duplication of a value. More...
 
virtual void handleRemove (rownr_t rownr, const char *value)
 Give a derived class the opportunity to react on the removal of a value. More...
 
uInt getFixedLength () const
 Get the fixed length of the data value in a cell of this column (0 = variable length). More...
 
uInt nelements () const
 Get the nr of elements in this data value. More...
 
- Public Member Functions inherited from casacore::StManColumnBase
 StManColumnBase (int dataType)
 Default constructor. More...
 
 ~StManColumnBase ()
 
virtual int dataType () const
 Return the data type of the column. More...
 
DataType dtype () const
 
Int elemSize () const
 Return the size of an element of the column's data type. More...
 
- Public Member Functions inherited from casacore::DataManagerColumn
 DataManagerColumn ()
 Create a column. More...
 
virtual ~DataManagerColumn ()
 Frees up the storage. More...
 
void setIsFixedShape (Bool isFixedShape)
 Set the isFixedShape flag. More...
 
Bool isFixedShape () const
 Is this a fixed shape column? More...
 
virtual String dataTypeId () const
 Get the data type id of the column for dataType==TpOther. More...
 
virtual Bool isWritable () const
 Test if data can be put into this column. More...
 
virtual void setMaxLength (uInt maxLength)
 Set the maximum length of the value (can be used for strings). More...
 
void setFixedShapeColumn (const IPosition &shape)
 Set the shape of all (fixed-shaped) arrays in the column. More...
 
virtual void setShape (rownr_t rownr, const IPosition &shape)
 Set the shape of an (variable-shaped) array in the given row. More...
 
virtual void setShapeTiled (rownr_t rownr, const IPosition &shape, const IPosition &tileShape)
 Set the shape and tile shape of an (variable-shaped) array in the given row. More...
 
virtual Bool isShapeDefined (rownr_t rownr)
 Is the value shape defined in the given row? By default it returns True. More...
 
virtual IPosition tileShape (rownr_t rownr)
 Get the tile shape of the item in the given row. More...
 
virtual Bool canChangeShape () const
 Can the data manager handle chaging the shape of an existing array? Default is no. More...
 
ColumnCachecolumnCache ()
 Get access to the ColumnCache object. More...
 
const ColumnCachecolumnCachePtr () const
 
void get (rownr_t rownr, Bool *dataPtr)
 Get the scalar value in the given row. More...
 
void get (rownr_t rownr, uChar *dataPtr)
 
void get (rownr_t rownr, Short *dataPtr)
 
void get (rownr_t rownr, uShort *dataPtr)
 
void get (rownr_t rownr, Int *dataPtr)
 
void get (rownr_t rownr, uInt *dataPtr)
 
void get (rownr_t rownr, Int64 *dataPtr)
 
void get (rownr_t rownr, float *dataPtr)
 
void get (rownr_t rownr, double *dataPtr)
 
void get (rownr_t rownr, Complex *dataPtr)
 
void get (rownr_t rownr, DComplex *dataPtr)
 
void get (rownr_t rownr, String *dataPtr)
 
void get (rownr_t rownr, void *dataPtr)
 This function is the get for all non-standard data types. More...
 
void put (rownr_t rownr, const Bool *dataPtr)
 Put the scalar value into the given row. More...
 
void put (rownr_t rownr, const uChar *dataPtr)
 
void put (rownr_t rownr, const Short *dataPtr)
 
void put (rownr_t rownr, const uShort *dataPtr)
 
void put (rownr_t rownr, const Int *dataPtr)
 
void put (rownr_t rownr, const uInt *dataPtr)
 
void put (rownr_t rownr, const Int64 *dataPtr)
 
void put (rownr_t rownr, const float *dataPtr)
 
void put (rownr_t rownr, const double *dataPtr)
 
void put (rownr_t rownr, const Complex *dataPtr)
 
void put (rownr_t rownr, const DComplex *dataPtr)
 
void put (rownr_t rownr, const String *dataPtr)
 
void put (rownr_t rownr, const void *dataPtr)
 This function is the put for all non-standard data types. More...
 
virtual void putScalarColumnCellsV (const RefRows &rownrs, const ArrayBase &dataPtr)
 Put some scalar values in the column. More...
 
virtual void getArrayColumnV (ArrayBase &data)
 Get all array values in the column. More...
 
virtual void putArrayColumnV (const ArrayBase &data)
 Put all array values in the column. More...
 
virtual void getArrayColumnCellsV (const RefRows &rownrs, ArrayBase &data)
 Get some array values in the column. More...
 
virtual void putArrayColumnCellsV (const RefRows &rownrs, const ArrayBase &data)
 Put some array values in the column. More...
 
virtual void getSliceV (rownr_t rownr, const Slicer &slicer, ArrayBase &data)
 Get a section of the array in the given row. More...
 
virtual void putSliceV (rownr_t rownr, const Slicer &slicer, const ArrayBase &data)
 Put into a section of the array in the given row. More...
 
virtual void getColumnSliceV (const Slicer &slicer, ArrayBase &data)
 Get a section of all arrays in the column. More...
 
virtual void putColumnSliceV (const Slicer &slicer, const ArrayBase &data)
 Put into a section of all arrays in the column. More...
 
virtual void getColumnSliceCellsV (const RefRows &rownrs, const Slicer &slicer, ArrayBase &data)
 Get a section of some arrays in the column. More...
 
virtual void putColumnSliceCellsV (const RefRows &rownrs, const Slicer &slicer, const ArrayBase &data)
 Put into a section of some arrays in the column. More...
 
void throwGet () const
 Throw an "invalid operation" exception for the default implementation of get. More...
 
void throwPut () const
 Throw an "invalid operation" exception for the default implementation of put. More...
 
void setColumnName (const String &colName)
 Set the column name. More...
 
const StringcolumnName () const
 Get rhe column name. More...
 

Static Public Member Functions

static Conversion::ValueFunctiongetReaduInt (Bool asCanonical)
 Get the function needed to read/write a uInt and rownr from/to external format. More...
 
static Conversion::ValueFunctiongetReadRownr (Bool asCanonical)
 
static Conversion::ValueFunctiongetWriteuInt (Bool asCanonical)
 
static Conversion::ValueFunctiongetWriteRownr (Bool asCanonical)
 
- Static Public Member Functions inherited from casacore::StManColumnBase
static Bool isNativeDataType (int dtype)
 Test if the given data type is supported by storage managers. More...
 

Protected Member Functions

Bool isLastValueInvalid (rownr_t rownr)
 Test if the last value is invalid for this row. More...
 
void getValue (rownr_t rownr, void *value, Bool setCache)
 Get the value for this row. More...
 
void putValue (rownr_t rownr, const void *value)
 Put the value for this row. More...
 
- Protected Member Functions inherited from casacore::DataManagerColumn
virtual void getOther (rownr_t rownr, void *dataPtr)
 This function is the get for all non-standard data types. More...
 
virtual void putOther (rownr_t rownr, const void *dataPtr)
 This function is the put for all non-standard data types. More...
 
void getScalarColumnBase (ArrayBase &dataPtr)
 The default implementations of get and put functions. More...
 
void putScalarColumnBase (const ArrayBase &dataPtr)
 
void getScalarColumnCellsBase (const RefRows &rownrs, ArrayBase &dataPtr)
 
void putScalarColumnCellsBase (const RefRows &rownrs, const ArrayBase &dataPtr)
 
void getArrayColumnBase (ArrayBase &data)
 
void putArrayColumnBase (const ArrayBase &data)
 
void getArrayColumnCellsBase (const RefRows &rownrs, ArrayBase &data)
 
void putArrayColumnCellsBase (const RefRows &rownrs, const ArrayBase &data)
 
void getSliceBase (rownr_t rownr, const Slicer &slicer, ArrayBase &data)
 
void putSliceBase (rownr_t rownr, const Slicer &slicer, const ArrayBase &data)
 
void getColumnSliceBase (const Slicer &slicer, ArrayBase &data)
 
void putColumnSliceBase (const Slicer &slicer, const ArrayBase &data)
 
void getColumnSliceCellsBase (const RefRows &rownrs, const Slicer &slicer, ArrayBase &data)
 
void putColumnSliceCellsBase (const RefRows &rownrs, const Slicer &slicer, const ArrayBase &data)
 

Protected Attributes

ISMBasestmanPtr_p
 Pointer to the parent storage manager. More...
 
uInt fixedLength_p
 Length of column cell value in storage format (0 = variable length). More...
 
uInt colnr_p
 Column sequence number of this column. More...
 
IPosition shape_p
 The shape of the column. More...
 
uInt nrelem_p
 Number of elements in a value for this column. More...
 
uInt nrcopy_p
 Number of values to be copied. More...
 
rownr_t startRow_p
 Cache for interval for which last value read is valid. More...
 
rownr_t endRow_p
 
void * lastValue_p
 
rownr_t lastRowPut_p
 The last row for which a value has been put. More...
 
uInt typeSize_p
 The size of the data type in local format. More...
 
Conversion::ValueFunctionwriteFunc_p
 Pointer to a convert function for writing. More...
 
Conversion::ValueFunctionreadFunc_p
 Pointer to a convert function for reading. More...
 
ObjCompareFunc * compareFunc_p
 Pointer to a compare function. More...
 

Private Member Functions

 ISMColumn (const ISMColumn &)
 Forbid copy constructor. More...
 
ISMColumnoperator= (const ISMColumn &)
 Forbid assignment. More...
 
void init ()
 Initialize part of the object. More...
 
void clear ()
 Clear the object (used by destructor and init). More...
 
void putFromRow (rownr_t rownr, const char *data, uInt lenData)
 Put the value in all buckets from the given row on. More...
 
void putData (ISMBucket *bucket, rownr_t bucketStartRow, rownr_t bucketNrrow, rownr_t bucketRownr, const char *data, uInt lenData, Bool afterLastRow, Bool canSplit)
 Put a data value into the bucket. More...
 
void replaceData (ISMBucket *bucket, rownr_t bucketStartRow, rownr_t bucketNrrow, rownr_t bucketRownr, uInt &offset, const char *data, uInt lenData, Bool canSplit=True)
 Replace a value at the given offset in the bucket. More...
 
Bool addData (ISMBucket *bucket, rownr_t bucketStartRow, rownr_t bucketNrrow, rownr_t bucketRownr, uInt inx, const char *data, uInt lenData, Bool afterLastRow=False, Bool canSplit=True)
 Add a value at the given index in the bucket. More...
 
void handleSplit (ISMBucket &bucket, const Block< Bool > &duplicated)
 Handle the duplicated values after a bucket split. More...
 
virtual Bool compareValue (const void *val1, const void *val2) const
 Compare the values. More...
 
void getScaCol (Vector< Bool > &)
 
void getScaCol (Vector< uChar > &)
 
void getScaCol (Vector< Short > &)
 
void getScaCol (Vector< uShort > &)
 
void getScaCol (Vector< Int > &)
 
void getScaCol (Vector< uInt > &)
 
void getScaCol (Vector< Int64 > &)
 
void getScaCol (Vector< float > &)
 
void getScaCol (Vector< double > &)
 
void getScaCol (Vector< Complex > &)
 
void getScaCol (Vector< DComplex > &)
 
void getScaCol (Vector< String > &)
 
void getScaColCells (const RefRows &, Vector< Bool > &)
 
void getScaColCells (const RefRows &, Vector< uChar > &)
 
void getScaColCells (const RefRows &, Vector< Short > &)
 
void getScaColCells (const RefRows &, Vector< uShort > &)
 
void getScaColCells (const RefRows &, Vector< Int > &)
 
void getScaColCells (const RefRows &, Vector< uInt > &)
 
void getScaColCells (const RefRows &, Vector< Int64 > &)
 
void getScaColCells (const RefRows &, Vector< float > &)
 
void getScaColCells (const RefRows &, Vector< double > &)
 
void getScaColCells (const RefRows &, Vector< Complex > &)
 
void getScaColCells (const RefRows &, Vector< DComplex > &)
 
void getScaColCells (const RefRows &, Vector< String > &)
 
void putScaCol (const Vector< Bool > &)
 
void putScaCol (const Vector< uChar > &)
 
void putScaCol (const Vector< Short > &)
 
void putScaCol (const Vector< uShort > &)
 
void putScaCol (const Vector< Int > &)
 
void putScaCol (const Vector< uInt > &)
 
void putScaCol (const Vector< Int64 > &)
 
void putScaCol (const Vector< float > &)
 
void putScaCol (const Vector< double > &)
 
void putScaCol (const Vector< Complex > &)
 
void putScaCol (const Vector< DComplex > &)
 
void putScaCol (const Vector< String > &)
 

Static Private Member Functions

static size_t fromString (void *out, const void *in, size_t n, Conversion::ValueFunction *writeLeng)
 Handle a String in copying to/from external format. More...
 
static size_t toString (void *out, const void *in, size_t n, Conversion::ValueFunction *readLeng)
 
static size_t writeStringBE (void *out, const void *in, size_t n)
 
static size_t readStringBE (void *out, const void *in, size_t n)
 
static size_t writeStringLE (void *out, const void *in, size_t n)
 
static size_t readStringLE (void *out, const void *in, size_t n)
 

Detailed Description

A Column in the Incremental Storage Manager.

Intended use:

Internal

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Prerequisite

Etymology

ISMColumn represents a Column in the Incremental Storage Manager.

Synopsis

ISMColumn handles the access to a column containing scalars or direct arrays of the various data types. It uses class ISMBucket to get and put the data into the correct bucket. When the value does not fit in the bucket, the bucket is split and the new bucket is added to the storage manager.

The object maintains a variable indicating the last row ever put. This is used to decide if a put of a value is valid until the end of the table or for that one row only. In this way it does not make any difference if rows are added before or after a value is put
A value put before or at the last row ever put will only affect that one row. The rows before and after it keep their original value. If needed that value is copied.

To optimize (especially sequential) access to the column, ISMColumn maintains the last value gotten and the rows for which it is valid. In this way a get does not need to access the data in the bucket.

ISMColumn use the static conversion functions in the Conversion framework to get/put the data in external format (be it canonical or local). Most data types are fixed length, but some are variable length (e.g. String). In external format variable length data is preceeded by its total length (which includes the length itself). This makes it possible to get the length of a data value without having to interpret it, which is easy when (re)moving a value. For this reason ISMColumn contains its own conversion functions for Strings.

ISMColumn also acts as the base class for more specialized ISM column classes (i.e. ISMIndColumn for indirect columns). In this way ISMBase can hold a block of ISMColumn* for any column. Furthermore ISMColumn contains the hooks to allow a derived class to use other ISMColumn functions (e.g. there are "action" functions for a derived class to react on the duplication or removal of a data value (e.g. due to a bucket split).

Motivation

ISMColumn encapsulates all operations on an ISM Column.

Definition at line 115 of file ISMColumn.h.

Constructor & Destructor Documentation

casacore::ISMColumn::ISMColumn ( ISMBase parent,
int  dataType,
uInt  colnr 
)

Create a ISMColumn object with the given parent.

It initializes the various variables. It keeps the pointer to its parent (but does not own it).

casacore::ISMColumn::~ISMColumn ( )
casacore::ISMColumn::ISMColumn ( const ISMColumn )
private

Forbid copy constructor.

Member Function Documentation

Bool casacore::ISMColumn::addData ( ISMBucket bucket,
rownr_t  bucketStartRow,
rownr_t  bucketNrrow,
rownr_t  bucketRownr,
uInt  inx,
const char *  data,
uInt  lenData,
Bool  afterLastRow = False,
Bool  canSplit = True 
)
private

Add a value at the given index in the bucket.

If the bucket is too small, it will be split (if allowed).

virtual void casacore::ISMColumn::addRow ( rownr_t  newNrrow,
rownr_t  oldNrrow 
)
virtual

Add (newNrrow-oldNrrow) rows to the column and initialize the new rows when needed.

Reimplemented in casacore::ISMIndColumn.

void casacore::ISMColumn::clear ( )
private

Clear the object (used by destructor and init).

virtual Bool casacore::ISMColumn::compareValue ( const void *  val1,
const void *  val2 
) const
privatevirtual

Compare the values.

Reimplemented in casacore::ISMIndColumn.

virtual void casacore::ISMColumn::doCreate ( ISMBucket )
virtual

Let the column object initialize itself for a newly created table.

This is meant for a derived class.

Reimplemented in casacore::ISMIndColumn.

virtual Bool casacore::ISMColumn::flush ( rownr_t  nrrow,
Bool  fsync 
)
virtual

Flush and optionally fsync the data.

This is meant for a derived class.

Reimplemented in casacore::ISMIndColumn.

static size_t casacore::ISMColumn::fromString ( void *  out,
const void *  in,
size_t  n,
Conversion::ValueFunction writeLeng 
)
staticprivate

Handle a String in copying to/from external format.

virtual void casacore::ISMColumn::getArrayV ( rownr_t  rownr,
ArrayBase dataPtr 
)
virtual

Get an array value in the given row.

Reimplemented from casacore::DataManagerColumn.

Reimplemented in casacore::ISMIndColumn.

virtual void casacore::ISMColumn::getBool ( rownr_t  rownr,
Bool dataPtr 
)
virtual

Get a scalar value in the given row.

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::getComplex ( rownr_t  rownr,
Complex *  dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::getDComplex ( rownr_t  rownr,
DComplex *  dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::getdouble ( rownr_t  rownr,
double *  dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::getFile ( rownr_t  nrrow)
virtual

Let the column object initialize itself for an existing table.

Reimplemented in casacore::ISMIndColumn.

uInt casacore::ISMColumn::getFixedLength ( ) const
inline

Get the fixed length of the data value in a cell of this column (0 = variable length).

Definition at line 388 of file ISMColumn.h.

References fixedLength_p.

virtual void casacore::ISMColumn::getfloat ( rownr_t  rownr,
float *  dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::getInt ( rownr_t  rownr,
Int dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::getInt64 ( rownr_t  rownr,
Int64 dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

static Conversion::ValueFunction* casacore::ISMColumn::getReadRownr ( Bool  asCanonical)
static
static Conversion::ValueFunction* casacore::ISMColumn::getReaduInt ( Bool  asCanonical)
static

Get the function needed to read/write a uInt and rownr from/to external format.

This is used by other classes to read the length of a variable data value.

void casacore::ISMColumn::getScaCol ( Vector< Bool > &  )
private
void casacore::ISMColumn::getScaCol ( Vector< uChar > &  )
private
void casacore::ISMColumn::getScaCol ( Vector< Short > &  )
private
void casacore::ISMColumn::getScaCol ( Vector< uShort > &  )
private
void casacore::ISMColumn::getScaCol ( Vector< Int > &  )
private
void casacore::ISMColumn::getScaCol ( Vector< uInt > &  )
private
void casacore::ISMColumn::getScaCol ( Vector< Int64 > &  )
private
void casacore::ISMColumn::getScaCol ( Vector< float > &  )
private
void casacore::ISMColumn::getScaCol ( Vector< double > &  )
private
void casacore::ISMColumn::getScaCol ( Vector< Complex > &  )
private
void casacore::ISMColumn::getScaCol ( Vector< DComplex > &  )
private
void casacore::ISMColumn::getScaCol ( Vector< String > &  )
private
void casacore::ISMColumn::getScaColCells ( const RefRows ,
Vector< Bool > &   
)
private
void casacore::ISMColumn::getScaColCells ( const RefRows ,
Vector< uChar > &   
)
private
void casacore::ISMColumn::getScaColCells ( const RefRows ,
Vector< Short > &   
)
private
void casacore::ISMColumn::getScaColCells ( const RefRows ,
Vector< uShort > &   
)
private
void casacore::ISMColumn::getScaColCells ( const RefRows ,
Vector< Int > &   
)
private
void casacore::ISMColumn::getScaColCells ( const RefRows ,
Vector< uInt > &   
)
private
void casacore::ISMColumn::getScaColCells ( const RefRows ,
Vector< Int64 > &   
)
private
void casacore::ISMColumn::getScaColCells ( const RefRows ,
Vector< float > &   
)
private
void casacore::ISMColumn::getScaColCells ( const RefRows ,
Vector< double > &   
)
private
void casacore::ISMColumn::getScaColCells ( const RefRows ,
Vector< Complex > &   
)
private
void casacore::ISMColumn::getScaColCells ( const RefRows ,
Vector< DComplex > &   
)
private
void casacore::ISMColumn::getScaColCells ( const RefRows ,
Vector< String > &   
)
private
virtual void casacore::ISMColumn::getScalarColumnCellsV ( const RefRows rownrs,
ArrayBase dataPtr 
)
virtual

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

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::getScalarColumnV ( ArrayBase dataPtr)
virtual

Get the scalar values in the entire column.

The buffer pointed to by dataPtr has to have the correct length. (which is guaranteed by the ScalarColumn getColumn function).

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::getShort ( rownr_t  rownr,
Short dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::getString ( rownr_t  rownr,
String dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::getuChar ( rownr_t  rownr,
uChar dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::getuInt ( rownr_t  rownr,
uInt dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::getuShort ( rownr_t  rownr,
uShort dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

void casacore::ISMColumn::getValue ( rownr_t  rownr,
void *  value,
Bool  setCache 
)
protected

Get the value for this row.

Set the cache if the flag is set.

static Conversion::ValueFunction* casacore::ISMColumn::getWriteRownr ( Bool  asCanonical)
static
static Conversion::ValueFunction* casacore::ISMColumn::getWriteuInt ( Bool  asCanonical)
static
virtual void casacore::ISMColumn::handleCopy ( rownr_t  rownr,
const char *  value 
)
virtual

Give a derived class the opportunity to react on the duplication of a value.

It is used by ISMIndColumn.

Reimplemented in casacore::ISMIndColumn.

virtual void casacore::ISMColumn::handleRemove ( rownr_t  rownr,
const char *  value 
)
virtual

Give a derived class the opportunity to react on the removal of a value.

It is used by ISMIndColumn.

Reimplemented in casacore::ISMIndColumn.

void casacore::ISMColumn::handleSplit ( ISMBucket bucket,
const Block< Bool > &  duplicated 
)
private

Handle the duplicated values after a bucket split.

void casacore::ISMColumn::init ( )
private

Initialize part of the object.

It is used by doCreate and getFile.

Bool casacore::ISMColumn::isLastValueInvalid ( rownr_t  rownr)
inlineprotected

Test if the last value is invalid for this row.

Definition at line 383 of file ISMColumn.h.

References endRow_p.

virtual uInt casacore::ISMColumn::ndim ( rownr_t  rownr)
virtual

Get the dimensionality of the item in the given row.

This is the same for all rows.

Reimplemented from casacore::DataManagerColumn.

Reimplemented in casacore::ISMIndColumn.

uInt casacore::ISMColumn::nelements ( ) const
inline

Get the nr of elements in this data value.

Definition at line 393 of file ISMColumn.h.

References nrelem_p.

ISMColumn& casacore::ISMColumn::operator= ( const ISMColumn )
private

Forbid assignment.

virtual void casacore::ISMColumn::putArrayV ( rownr_t  rownr,
const ArrayBase dataPtr 
)
virtual

Put an array value in the given row.

Reimplemented from casacore::DataManagerColumn.

Reimplemented in casacore::ISMIndColumn.

virtual void casacore::ISMColumn::putBool ( rownr_t  rownr,
const Bool dataPtr 
)
virtual

Put a scalar value in the given row.

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::putComplex ( rownr_t  rownr,
const Complex *  dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

void casacore::ISMColumn::putData ( ISMBucket bucket,
rownr_t  bucketStartRow,
rownr_t  bucketNrrow,
rownr_t  bucketRownr,
const char *  data,
uInt  lenData,
Bool  afterLastRow,
Bool  canSplit 
)
private

Put a data value into the bucket.

When it is at the first row of the bucket, it replaces the value. Otherwise it is added.

virtual void casacore::ISMColumn::putDComplex ( rownr_t  rownr,
const DComplex *  dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::putdouble ( rownr_t  rownr,
const double *  dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::putfloat ( rownr_t  rownr,
const float *  dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

void casacore::ISMColumn::putFromRow ( rownr_t  rownr,
const char *  data,
uInt  lenData 
)
private

Put the value in all buckets from the given row on.

virtual void casacore::ISMColumn::putInt ( rownr_t  rownr,
const Int dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::putInt64 ( rownr_t  rownr,
const Int64 dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

void casacore::ISMColumn::putScaCol ( const Vector< Bool > &  )
private
void casacore::ISMColumn::putScaCol ( const Vector< uChar > &  )
private
void casacore::ISMColumn::putScaCol ( const Vector< Short > &  )
private
void casacore::ISMColumn::putScaCol ( const Vector< uShort > &  )
private
void casacore::ISMColumn::putScaCol ( const Vector< Int > &  )
private
void casacore::ISMColumn::putScaCol ( const Vector< uInt > &  )
private
void casacore::ISMColumn::putScaCol ( const Vector< Int64 > &  )
private
void casacore::ISMColumn::putScaCol ( const Vector< float > &  )
private
void casacore::ISMColumn::putScaCol ( const Vector< double > &  )
private
void casacore::ISMColumn::putScaCol ( const Vector< Complex > &  )
private
void casacore::ISMColumn::putScaCol ( const Vector< DComplex > &  )
private
void casacore::ISMColumn::putScaCol ( const Vector< String > &  )
private
virtual void casacore::ISMColumn::putScalarColumnV ( const ArrayBase dataPtr)
virtual

Put the scalar values into the entire column.

The buffer pointed to by dataPtr has to have the correct length. (which is guaranteed by the ScalarColumn putColumn function).

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::putShort ( rownr_t  rownr,
const Short dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::putString ( rownr_t  rownr,
const String dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::putuChar ( rownr_t  rownr,
const uChar dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::putuInt ( rownr_t  rownr,
const uInt dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

virtual void casacore::ISMColumn::putuShort ( rownr_t  rownr,
const uShort dataPtr 
)
virtual

Reimplemented from casacore::DataManagerColumn.

void casacore::ISMColumn::putValue ( rownr_t  rownr,
const void *  value 
)
protected

Put the value for this row.

static size_t casacore::ISMColumn::readStringBE ( void *  out,
const void *  in,
size_t  n 
)
staticprivate
static size_t casacore::ISMColumn::readStringLE ( void *  out,
const void *  in,
size_t  n 
)
staticprivate
void casacore::ISMColumn::remove ( rownr_t  bucketRownr,
ISMBucket bucket,
rownr_t  bucketNrrow,
rownr_t  newNrrow 
)

Remove the given row in the bucket from the column.

virtual void casacore::ISMColumn::reopenRW ( )
virtual

Let the column reopen its data files for read/write access.

Reimplemented in casacore::ISMIndColumn.

void casacore::ISMColumn::replaceData ( ISMBucket bucket,
rownr_t  bucketStartRow,
rownr_t  bucketNrrow,
rownr_t  bucketRownr,
uInt offset,
const char *  data,
uInt  lenData,
Bool  canSplit = True 
)
private

Replace a value at the given offset in the bucket.

If the bucket is too small, it will be split (if allowed).

void casacore::ISMColumn::resync ( rownr_t  nrrow)

Resync the storage manager with the new file contents.

It resets the last rownr put.

virtual void casacore::ISMColumn::setShapeColumn ( const IPosition shape)
virtual

Set the shape of an array in the column.

Reimplemented from casacore::DataManagerColumn.

Reimplemented in casacore::ISMIndColumn.

virtual IPosition casacore::ISMColumn::shape ( rownr_t  rownr)
virtual

Get the shape of the array in the given row.

This is the same for all rows.

Reimplemented from casacore::DataManagerColumn.

Reimplemented in casacore::ISMIndColumn.

static size_t casacore::ISMColumn::toString ( void *  out,
const void *  in,
size_t  n,
Conversion::ValueFunction readLeng 
)
staticprivate
static size_t casacore::ISMColumn::writeStringBE ( void *  out,
const void *  in,
size_t  n 
)
staticprivate
static size_t casacore::ISMColumn::writeStringLE ( void *  out,
const void *  in,
size_t  n 
)
staticprivate

Member Data Documentation

uInt casacore::ISMColumn::colnr_p
protected

Column sequence number of this column.

Definition at line 260 of file ISMColumn.h.

ObjCompareFunc* casacore::ISMColumn::compareFunc_p
protected

Pointer to a compare function.

Definition at line 283 of file ISMColumn.h.

rownr_t casacore::ISMColumn::endRow_p
protected

Definition at line 272 of file ISMColumn.h.

Referenced by isLastValueInvalid().

uInt casacore::ISMColumn::fixedLength_p
protected

Length of column cell value in storage format (0 = variable length).

If 0, the value is always preceeded by a uInt giving the length.

Definition at line 258 of file ISMColumn.h.

Referenced by getFixedLength().

rownr_t casacore::ISMColumn::lastRowPut_p
protected

The last row for which a value has been put.

Definition at line 275 of file ISMColumn.h.

void* casacore::ISMColumn::lastValue_p
protected

Definition at line 273 of file ISMColumn.h.

uInt casacore::ISMColumn::nrcopy_p
protected

Number of values to be copied.

Normally this is nrelem_p, but for complex types it is 2*nrelem_p. When local format is used, it is the number of bytes.

Definition at line 268 of file ISMColumn.h.

uInt casacore::ISMColumn::nrelem_p
protected

Number of elements in a value for this column.

Definition at line 264 of file ISMColumn.h.

Referenced by nelements().

Conversion::ValueFunction* casacore::ISMColumn::readFunc_p
protected

Pointer to a convert function for reading.

Definition at line 281 of file ISMColumn.h.

IPosition casacore::ISMColumn::shape_p
protected

The shape of the column.

Definition at line 262 of file ISMColumn.h.

rownr_t casacore::ISMColumn::startRow_p
protected

Cache for interval for which last value read is valid.

The last value is valid for startRow_p till endRow_p (inclusive).

Definition at line 271 of file ISMColumn.h.

ISMBase* casacore::ISMColumn::stmanPtr_p
protected

Pointer to the parent storage manager.

Definition at line 255 of file ISMColumn.h.

uInt casacore::ISMColumn::typeSize_p
protected

The size of the data type in local format.

Definition at line 277 of file ISMColumn.h.

Conversion::ValueFunction* casacore::ISMColumn::writeFunc_p
protected

Pointer to a convert function for writing.

Definition at line 279 of file ISMColumn.h.


The documentation for this class was generated from the following file: