Go to the documentation of this file.
28 #ifndef TABLES_ISMCOLUMN_H
29 #define TABLES_ISMCOLUMN_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/DataMan/StManColumn.h>
35 #include <casacore/tables/DataMan/ISMBase.h>
36 #include <casacore/casa/Arrays/IPosition.h>
37 #include <casacore/casa/Containers/Block.h>
38 #include <casacore/casa/Utilities/Compare.h>
39 #include <casacore/casa/OS/Conversion.h>
383 const char* data,
uInt lenData,
396 const char* data,
uInt lenData,
407 static size_t fromString (
void* out,
const void* in,
size_t n,
409 static size_t toString (
void* out,
const void* in,
size_t n,
411 static size_t writeStringBE (
void* out,
const void* in,
size_t n);
412 static size_t readStringBE (
void* out,
const void* in,
size_t n);
413 static size_t writeStringLE (
void* out,
const void* in,
size_t n);
414 static size_t readStringLE (
void* out,
const void* in,
size_t n);
423 return rownr < startRow_p || rownr >
endRow_p;
virtual void getArrayfloatV(uInt rownr, Array< float > *dataPtr)
virtual void getStringV(uInt rownr, String *dataPtr)
uInt nrcopy_p
Number of values to be copied.
static size_t toString(void *out, const void *in, size_t n, Conversion::ValueFunction *readLeng)
A Vector of integers, for indexing into Array<T> objects.
virtual void getScalarColumnCellsDComplexV(const RefRows &rownrs, Vector< DComplex > *dataPtr)
virtual void putArrayBoolV(uInt rownr, const Array< Bool > *dataPtr)
Put an array value in the given row.
virtual void putScalarColumnIntV(const Vector< Int > *dataPtr)
virtual void putArrayShortV(uInt rownr, const Array< Short > *dataPtr)
uInt lastRowPut_p
The last row for which a value has been put.
virtual void putIntV(uInt rownr, const Int *dataPtr)
virtual void putScalarColumnDComplexV(const Vector< DComplex > *dataPtr)
virtual void getScalarColumnuIntV(Vector< uInt > *dataPtr)
Conversion::ValueFunction * readFunc_p
Pointer to a convert function for reading.
virtual void getScalarColumnCellsInt64V(const RefRows &rownrs, Vector< Int64 > *dataPtr)
virtual void getScalarColumnCellsfloatV(const RefRows &rownrs, Vector< float > *dataPtr)
virtual void getIntV(uInt rownr, Int *dataPtr)
virtual void getDComplexV(uInt rownr, DComplex *dataPtr)
virtual void putuCharV(uInt rownr, const uChar *dataPtr)
std::complex< Double > DComplex
uInt typeSize_p
The size of the data type in local format.
virtual void getuCharV(uInt rownr, uChar *dataPtr)
virtual void getuIntV(uInt rownr, uInt *dataPtr)
virtual void putDComplexV(uInt rownr, const DComplex *dataPtr)
virtual void putScalarColumnComplexV(const Vector< Complex > *dataPtr)
void resync(uInt nrrow)
Resync the storage manager with the new file contents.
virtual void getArrayComplexV(uInt rownr, Array< Complex > *dataPtr)
virtual void getBoolV(uInt rownr, Bool *dataPtr)
Get a scalar value in the given row.
virtual void doCreate(ISMBucket *)
Let the column object initialize itself for a newly created table.
uInt colnr_p
Column sequence number of this column.
virtual void putArrayuIntV(uInt rownr, const Array< uInt > *dataPtr)
virtual uInt ndim(uInt rownr)
Get the dimensionality of the item in the given row.
virtual void getScalarColumndoubleV(Vector< double > *dataPtr)
virtual void putArrayfloatV(uInt rownr, const Array< float > *dataPtr)
void remove(uInt bucketRownr, ISMBucket *bucket, uInt bucketNrrow, uInt newNrrow)
Remove the given row in the bucket from the column.
ISMColumn & operator=(const ISMColumn &)
Forbid assignment.
virtual void putArrayComplexV(uInt rownr, const Array< Complex > *dataPtr)
void putData(ISMBucket *bucket, uInt bucketStartRow, uInt bucketNrrow, uInt bucketRownr, const char *data, uInt lenData, Bool afterLastRow, Bool canSplit)
Put a data value into the bucket.
virtual void getInt64V(uInt rownr, Int64 *dataPtr)
static Conversion::ValueFunction * getWriteuInt(Bool asCanonical)
virtual void putfloatV(uInt rownr, const float *dataPtr)
virtual void putdoubleV(uInt rownr, const double *dataPtr)
virtual void handleCopy(uInt rownr, const char *value)
Give a derived class the opportunity to react on the duplication of a value.
ObjCompareFunc * compareFunc_p
Pointer to a compare function.
virtual void setShapeColumn(const IPosition &shape)
Set the shape of an array in the column.
virtual void getScalarColumnComplexV(Vector< Complex > *dataPtr)
static size_t fromString(void *out, const void *in, size_t n, Conversion::ValueFunction *writeLeng)
Handle a String in copying to/from external format.
void putFromRow(uInt rownr, const char *data, uInt lenData)
Put the value in all buckets from the given row on.
virtual void getArrayShortV(uInt rownr, Array< Short > *dataPtr)
virtual void putArrayDComplexV(uInt rownr, const Array< DComplex > *dataPtr)
static size_t readStringLE(void *out, const void *in, size_t n)
ISMColumn(ISMBase *parent, int dataType, uInt colnr)
Create a ISMColumn object with the given parent.
virtual Bool flush(uInt nrrow, Bool fsync)
Flush and optionally fsync the data.
virtual void getArrayStringV(uInt rownr, Array< String > *dataPtr)
Conversion::ValueFunction * writeFunc_p
Pointer to a convert function for writing.
virtual void getComplexV(uInt rownr, Complex *dataPtr)
int dataType() const
Return the data type of the column.
void putValue(uInt rownr, const void *value)
Put the value for this row.
uInt getFixedLength() const
Get the fixed length of the data value in a cell of this column (0 = variable length).
Base table column storage manager class.
virtual void getScalarColumnCellsdoubleV(const RefRows &rownrs, Vector< double > *dataPtr)
static Conversion::ValueFunction * getReaduInt(Bool asCanonical)
Get the function needed to read/write a uInt from/to external format.
virtual void getScalarColumnCellsStringV(const RefRows &rownrs, Vector< String > *dataPtr)
uInt fixedLength_p
Length of column cell value in storage format (0 = variable length).
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
void handleSplit(ISMBucket &bucket, const Block< Bool > &duplicated)
Handle the duplicated values after a bucket split.
virtual void getScalarColumnDComplexV(Vector< DComplex > *dataPtr)
virtual void getArrayBoolV(uInt rownr, Array< Bool > *dataPtr)
Get an array value in the given row.
Class holding the row numbers in a RefTable.
void replaceData(ISMBucket *bucket, uInt bucketStartRow, uInt bucketNrrow, uInt bucketRownr, uInt &offset, const char *data, uInt lenData, Bool canSplit=True)
Replace a value at the given offset in the bucket.
virtual void putuIntV(uInt rownr, const uInt *dataPtr)
static size_t readStringBE(void *out, const void *in, size_t n)
virtual void putInt64V(uInt rownr, const Int64 *dataPtr)
virtual void getdoubleV(uInt rownr, double *dataPtr)
virtual void getScalarColumnIntV(Vector< Int > *dataPtr)
virtual void putArraydoubleV(uInt rownr, const Array< double > *dataPtr)
virtual void putArrayuShortV(uInt rownr, const Array< uShort > *dataPtr)
virtual void getScalarColumnBoolV(Vector< Bool > *dataPtr)
Get the scalar values in the entire column.
static size_t writeStringBE(void *out, const void *in, size_t n)
virtual void getArraydoubleV(uInt rownr, Array< double > *dataPtr)
virtual void getScalarColumnInt64V(Vector< Int64 > *dataPtr)
virtual void getArrayInt64V(uInt rownr, Array< Int64 > *dataPtr)
virtual void putScalarColumnBoolV(const Vector< Bool > *dataPtr)
Put the scalar values into the entire column.
virtual void putScalarColumnuIntV(const Vector< uInt > *dataPtr)
virtual void getuShortV(uInt rownr, uShort *dataPtr)
uInt nelements() const
Get the nr of elements in this data value.
void getValue(uInt rownr, void *value, Bool setCache)
Get the value for this row.
virtual void getScalarColumnCellsuIntV(const RefRows &rownrs, Vector< uInt > *dataPtr)
this file contains all the compiler specific defines
virtual void putScalarColumnShortV(const Vector< Short > *dataPtr)
uInt startRow_p
Cache for interval for which last value read is valid.
virtual void putComplexV(uInt rownr, const Complex *dataPtr)
virtual void getScalarColumnCellsuShortV(const RefRows &rownrs, Vector< uShort > *dataPtr)
uInt nrelem_p
Number of elements in a value for this column.
virtual void getfloatV(uInt rownr, float *dataPtr)
virtual void putBoolV(uInt rownr, const Bool *dataPtr)
Put a scalar value in the given row.
void init()
Initialize part of the object.
virtual void putScalarColumndoubleV(const Vector< double > *dataPtr)
A bucket in the Incremental Storage Manager.
virtual void reopenRW()
Let the column reopen its data files for read/write access.
virtual void putArrayInt64V(uInt rownr, const Array< Int64 > *dataPtr)
virtual void putShortV(uInt rownr, const Short *dataPtr)
virtual void getArrayIntV(uInt rownr, Array< Int > *dataPtr)
Base class of the Incremental Storage Manager.
virtual IPosition shape(uInt rownr)
Get the shape of the array in the given row.
virtual void getScalarColumnCellsShortV(const RefRows &rownrs, Vector< Short > *dataPtr)
static size_t writeStringLE(void *out, const void *in, size_t n)
virtual void getArrayuShortV(uInt rownr, Array< uShort > *dataPtr)
virtual void getArrayDComplexV(uInt rownr, Array< DComplex > *dataPtr)
virtual void getScalarColumnCellsIntV(const RefRows &rownrs, Vector< Int > *dataPtr)
A Column in the Incremental Storage Manager.
virtual void getArrayuIntV(uInt rownr, Array< uInt > *dataPtr)
Bool addData(ISMBucket *bucket, uInt bucketStartRow, uInt bucketNrrow, uInt bucketRownr, uInt inx, const char *data, uInt lenData, Bool afterLastRow=False, Bool canSplit=True)
Add a value at the given index in the bucket.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
virtual void getShortV(uInt rownr, Short *dataPtr)
virtual void getScalarColumnuCharV(Vector< uChar > *dataPtr)
virtual void putScalarColumnuCharV(const Vector< uChar > *dataPtr)
virtual void addRow(uInt newNrrow, uInt oldNrrow)
Add (newNrrow-oldNrrow) rows to the column and initialize the new rows when needed.
virtual void putScalarColumnInt64V(const Vector< Int64 > *dataPtr)
virtual void putStringV(uInt rownr, const String *dataPtr)
String: the storage and methods of handling collections of characters.
virtual void getScalarColumnCellsComplexV(const RefRows &rownrs, Vector< Complex > *dataPtr)
size_t ValueFunction(void *to, const void *from, size_t nvalues)
Define the signature of a function converting nvalues values from internal to external format or vice...
virtual void getArrayuCharV(uInt rownr, Array< uChar > *dataPtr)
bool Bool
Define the standard types used by Casacore.
std::complex< Float > Complex
virtual void putScalarColumnStringV(const Vector< String > *dataPtr)
Bool isLastValueInvalid(uInt rownr)
Test if the last value is invalid for this row.
virtual void getScalarColumnCellsBoolV(const RefRows &rownrs, Vector< Bool > *dataPtr)
Get the scalar values in some cells of the column.
virtual void putArrayuCharV(uInt rownr, const Array< uChar > *dataPtr)
virtual void getScalarColumnShortV(Vector< Short > *dataPtr)
virtual void getScalarColumnCellsuCharV(const RefRows &rownrs, Vector< uChar > *dataPtr)
virtual void getScalarColumnStringV(Vector< String > *dataPtr)
virtual void putArrayIntV(uInt rownr, const Array< Int > *dataPtr)
virtual void putArrayStringV(uInt rownr, const Array< String > *dataPtr)
virtual Bool compareValue(const void *val1, const void *val2) const
Compare the values.
virtual void getFile(uInt nrrow)
Let the column object initialize itself for an existing table.
IPosition shape_p
The shape of the column.
virtual void getScalarColumnfloatV(Vector< float > *dataPtr)
virtual void putuShortV(uInt rownr, const uShort *dataPtr)
virtual void getScalarColumnuShortV(Vector< uShort > *dataPtr)
virtual void putScalarColumnuShortV(const Vector< uShort > *dataPtr)
virtual void handleRemove(uInt rownr, const char *value)
Give a derived class the opportunity to react on the removal of a value.
virtual void putScalarColumnfloatV(const Vector< float > *dataPtr)
void clear()
Clear the object (used by destructor and init).
ISMBase * stmanPtr_p
Pointer to the parent storage manager.