28 #ifndef TABLES_ISMCOLUMN_H
29 #define TABLES_ISMCOLUMN_H
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);
421 return rownr < startRow_p || rownr >
endRow_p;
A Vector of integers, for indexing into Array<T> objects.
void getValue(uInt rownr, void *value, Bool setCache)
Get the value for this row.
virtual void putScalarColumnuShortV(const Vector< uShort > *dataPtr)
virtual void putArrayuCharV(uInt rownr, const Array< uChar > *dataPtr)
virtual void getScalarColumnCellsuIntV(const RefRows &rownrs, Vector< uInt > *dataPtr)
virtual void putComplexV(uInt rownr, const Complex *dataPtr)
virtual void getScalarColumnCellsStringV(const RefRows &rownrs, Vector< String > *dataPtr)
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
virtual void getScalarColumnDComplexV(Vector< DComplex > *dataPtr)
virtual void putArrayShortV(uInt rownr, const Array< Short > *dataPtr)
virtual void getfloatV(uInt rownr, float *dataPtr)
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 void putuIntV(uInt rownr, const uInt *dataPtr)
virtual void putScalarColumnDComplexV(const Vector< DComplex > *dataPtr)
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.
Conversion::ValueFunction * readFunc_p
Pointer to a convert function for reading.
virtual void getScalarColumnIntV(Vector< Int > *dataPtr)
virtual void putArrayuShortV(uInt rownr, const Array< uShort > *dataPtr)
virtual void putArrayInt64V(uInt rownr, const Array< Int64 > *dataPtr)
virtual void putShortV(uInt rownr, const Short *dataPtr)
std::complex< Float > Complex
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 size_t writeStringLE(void *out, const void *in, size_t n)
virtual void putDComplexV(uInt rownr, const DComplex *dataPtr)
virtual void getScalarColumnuShortV(Vector< uShort > *dataPtr)
virtual void putdoubleV(uInt rownr, const double *dataPtr)
virtual void putScalarColumnComplexV(const Vector< Complex > *dataPtr)
virtual void getScalarColumnCellsShortV(const RefRows &rownrs, Vector< Short > *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.
virtual void getScalarColumnuIntV(Vector< uInt > *dataPtr)
virtual void handleCopy(uInt rownr, const char *value)
Give a derived class the opportunity to react on the duplication of a value.
void resync(uInt nrrow)
Resync the storage manager with the new file contents.
virtual void getArrayInt64V(uInt rownr, Array< Int64 > *dataPtr)
virtual void getArrayuIntV(uInt rownr, Array< uInt > *dataPtr)
virtual void getScalarColumnuCharV(Vector< uChar > *dataPtr)
uInt typeSize_p
The size of the data type in local format.
virtual void getuCharV(uInt rownr, uChar *dataPtr)
virtual void putArrayfloatV(uInt rownr, const Array< float > *dataPtr)
virtual void getuIntV(uInt rownr, uInt *dataPtr)
virtual void putStringV(uInt rownr, const String *dataPtr)
static size_t toString(void *out, const void *in, size_t n, Conversion::ValueFunction *readLeng)
virtual void getArrayStringV(uInt rownr, Array< String > *dataPtr)
virtual void putScalarColumnShortV(const Vector< Short > *dataPtr)
void init()
Initialize part of the object.
virtual void getScalarColumnCellsdoubleV(const RefRows &rownrs, Vector< double > *dataPtr)
virtual void getScalarColumnCellsfloatV(const RefRows &rownrs, Vector< float > *dataPtr)
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.
uInt nelements() const
Get the nr of elements in this data value.
virtual IPosition shape(uInt rownr)
Get the shape of the array in the given row.
virtual void getScalarColumnCellsuCharV(const RefRows &rownrs, Vector< uChar > *dataPtr)
void putFromRow(uInt rownr, const char *data, uInt lenData)
Put the value in all buckets from the given row on.
virtual void getArrayuShortV(uInt rownr, Array< uShort > *dataPtr)
static size_t readStringLE(void *out, const void *in, size_t n)
virtual void getFile(uInt nrrow)
Let the column object initialize itself for an existing table.
virtual void getComplexV(uInt rownr, Complex *dataPtr)
virtual void putArrayStringV(uInt rownr, const Array< String > *dataPtr)
virtual void getArrayDComplexV(uInt rownr, Array< DComplex > *dataPtr)
IPosition shape_p
The shape of the column.
int dataType() const
Return the data type of the column.
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
static Conversion::ValueFunction * getReaduInt(Bool asCanonical)
Get the function needed to read/write a uInt from/to external format.
Int startRow_p
Cache for interval for which last value read is valid.
Base class of the Incremental Storage Manager.
virtual void addRow(uInt newNrrow, uInt oldNrrow)
Add (newNrrow-oldNrrow) rows to the column and initialize the new rows when needed.
virtual void getScalarColumnInt64V(Vector< Int64 > *dataPtr)
Conversion::ValueFunction * writeFunc_p
Pointer to a convert function for writing.
virtual void putScalarColumnInt64V(const Vector< Int64 > *dataPtr)
virtual void getStringV(uInt rownr, String *dataPtr)
virtual void getdoubleV(uInt rownr, double *dataPtr)
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 getScalarColumnBoolV(Vector< Bool > *dataPtr)
Get the scalar values in the entire column.
virtual void getScalarColumnCellsuShortV(const RefRows &rownrs, Vector< uShort > *dataPtr)
virtual void putArrayIntV(uInt rownr, const Array< Int > *dataPtr)
virtual void getArraydoubleV(uInt rownr, Array< double > *dataPtr)
virtual void putScalarColumndoubleV(const Vector< double > *dataPtr)
std::complex< Double > DComplex
virtual void reopenRW()
Let the column reopen its data files for read/write access.
Class holding the row numbers in a RefTable.
virtual void getScalarColumnCellsInt64V(const RefRows &rownrs, Vector< Int64 > *dataPtr)
virtual void getArrayIntV(uInt rownr, Array< Int > *dataPtr)
void putValue(uInt rownr, const void *value)
Put the value for this row.
virtual void getIntV(uInt rownr, Int *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 getScalarColumnfloatV(Vector< float > *dataPtr)
virtual void putuShortV(uInt rownr, const uShort *dataPtr)
virtual void putScalarColumnfloatV(const Vector< float > *dataPtr)
virtual void getScalarColumnCellsIntV(const RefRows &rownrs, Vector< Int > *dataPtr)
virtual void getArrayfloatV(uInt rownr, Array< float > *dataPtr)
uInt fixedLength_p
Length of column cell value in storage format (0 = variable length).
bool Bool
Define the standard types used by Casacore.
virtual void getArrayBoolV(uInt rownr, Array< Bool > *dataPtr)
Get an array value in the given row.
virtual void getuShortV(uInt rownr, uShort *dataPtr)
virtual void getScalarColumnCellsDComplexV(const RefRows &rownrs, Vector< DComplex > *dataPtr)
virtual void putArrayComplexV(uInt rownr, const Array< Complex > *dataPtr)
virtual void putArrayBoolV(uInt rownr, const Array< Bool > *dataPtr)
Put an array value in the given row.
static Conversion::ValueFunction * getWriteuInt(Bool asCanonical)
virtual void getArrayuCharV(uInt rownr, Array< uChar > *dataPtr)
ISMColumn & operator=(const ISMColumn &)
Forbid assignment.
uInt lastRowPut_p
The last row for which a value has been put.
A Column in the Incremental Storage Manager.
virtual void putfloatV(uInt rownr, const float *dataPtr)
static size_t writeStringBE(void *out, const void *in, size_t n)
virtual Bool compareValue(const void *val1, const void *val2) const
Compare the values.
virtual void putIntV(uInt rownr, const Int *dataPtr)
uInt getFixedLength() const
Get the fixed length of the data value in a cell of this column (0 = variable length).
A bucket in the Incremental Storage Manager.
virtual void putScalarColumnuIntV(const Vector< uInt > *dataPtr)
virtual Bool flush(uInt nrrow, Bool fsync)
Flush and optionally fsync the data.
virtual void getBoolV(uInt rownr, Bool *dataPtr)
Get a scalar value in the given row.
virtual void putScalarColumnStringV(const Vector< String > *dataPtr)
virtual void getScalarColumnCellsBoolV(const RefRows &rownrs, Vector< Bool > *dataPtr)
Get the scalar values in some cells of the column.
uInt nrelem_p
Number of elements in a value for this column.
virtual void getArrayComplexV(uInt rownr, Array< Complex > *dataPtr)
virtual void putBoolV(uInt rownr, const Bool *dataPtr)
Put a scalar value in the given row.
String: the storage and methods of handling collections of characters.
virtual uInt ndim(uInt rownr)
Get the dimensionality of the item in the given row.
virtual void getScalarColumndoubleV(Vector< double > *dataPtr)
void clear()
Clear the object (used by destructor and init).
void handleSplit(ISMBucket &bucket, const Block< Bool > &duplicated)
Handle the duplicated values after a bucket split.
virtual void getScalarColumnCellsComplexV(const RefRows &rownrs, Vector< Complex > *dataPtr)
static size_t readStringBE(void *out, const void *in, size_t n)
int isLastValueInvalid(Int rownr) const
Test if the last value is invalid for this row.
virtual void getScalarColumnStringV(Vector< String > *dataPtr)
virtual void putInt64V(uInt rownr, const Int64 *dataPtr)
uInt nrcopy_p
Number of values to be copied.
virtual void getScalarColumnShortV(Vector< Short > *dataPtr)
Base table column storage manager class.
virtual void putArraydoubleV(uInt rownr, const Array< double > *dataPtr)
virtual void putScalarColumnIntV(const Vector< Int > *dataPtr)
virtual void getShortV(uInt rownr, Short *dataPtr)
virtual void putScalarColumnuCharV(const Vector< uChar > *dataPtr)
ISMBase * stmanPtr_p
Pointer to the parent storage manager.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
virtual void getArrayShortV(uInt rownr, Array< Short > *dataPtr)
virtual void putArrayDComplexV(uInt rownr, const Array< DComplex > *dataPtr)
ISMColumn(ISMBase *parent, int dataType, uInt colnr)
Create a ISMColumn object with the given parent.
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 getDComplexV(uInt rownr, DComplex *dataPtr)
virtual void putuCharV(uInt rownr, const uChar *dataPtr)
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
virtual void putScalarColumnBoolV(const Vector< Bool > *dataPtr)
Put the scalar values into the entire column.