28 #ifndef TABLES_BASECOLUMN_H
29 #define TABLES_BASECOLUMN_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/Tables/ColumnDesc.h>
35 #include <casacore/casa/Utilities/Compare.h>
36 #include <casacore/casa/Utilities/CountedPtr.h>
37 #include <casacore/casa/BasicSL/Complex.h>
38 #include <casacore/casa/Arrays/ArrayFwd.h>
Non-templated base class for templated Array class.
virtual IPosition tileShape(rownr_t rownr) const
Get the tile shape of an array in a particular cell.
void putScalar(rownr_t rownr, const Char *value)
virtual rownr_t nrow() const =0
Get nr of rows in the column.
virtual void putScalarColumn(const ArrayBase &dataPtr)
Put the vector of all scalar values in the column.
virtual void setShape(rownr_t rownr, const IPosition &shape, const IPosition &tileShape)
Set the shape and tile shape of the array in the given row.
void putScalar(rownr_t rownr, const Short &value)
virtual void makeSortKey(Sort &, CountedPtr< BaseCompare > &cmpObj, Int order, CountedPtr< ArrayBase > &dataSave)
Add this column and its data to the Sort object.
virtual TableRecord & keywordSet()=0
void getScalar(rownr_t rownr, Int &value) const
void putScalar(rownr_t rownr, const double &value)
virtual void getArray(rownr_t rownr, ArrayBase &dataPtr) const
Get an array from a particular cell.
const ColumnDesc & columnDesc() const
Get const access to the column description.
void getScalar(rownr_t rownr, void *value, const String &dataTypeId) const
Get a scalar for the other data types.
virtual void getScalarColumn(ArrayBase &dataPtr) const
Get the vector of all scalar values in a column.
void getScalar(rownr_t rownr, Short &value) const
virtual void getArrayColumnCells(const RefRows &rownrs, ArrayBase &dataPtr) const
Get the array of some array values in a column.
void getScalar(rownr_t rownr, DComplex &value) const
virtual void putColumnSlice(const Slicer &, const ArrayBase &dataPtr)
Put into subsections of all table arrays in the column.
void getScalar(rownr_t rownr, String &value) const
virtual void setMaximumCacheSize(uInt nbytes)=0
Set the maximum cache size (in bytes) to be used by a storage manager.
virtual void getArrayColumn(ArrayBase &dataPtr) const
Get the array of all array values in a column.
virtual void get(rownr_t rownr, void *dataPtr) const
Get a scalar value from a particular cell.
void putScalar(rownr_t rownr, const uChar &value)
virtual void getSlice(rownr_t rownr, const Slicer &, ArrayBase &dataPtr) const
Get a slice of an N-dimensional array in a particular cell.
void putScalar(rownr_t rownr, const Int64 &value)
virtual void makeRefSortKey(Sort &, CountedPtr< BaseCompare > &cmpObj, Int order, const Vector< rownr_t > &rownrs, CountedPtr< ArrayBase > &dataSave)
Do it only for the given row numbers.
void getScalar(rownr_t rownr, Bool &value) const
Get the value from the row and convert it to the required type.
void getScalar(rownr_t rownr, uInt &value) const
virtual void getScalarColumnCells(const RefRows &rownrs, ArrayBase &dataPtr) const
Get the vector of some scalar values in a column.
void getScalar(rownr_t rownr, double &value) const
virtual void putColumnSliceCells(const RefRows &rownrs, const Slicer &, const ArrayBase &dataPtr)
Put subsections of some arrays in the column.
virtual Bool isDefined(rownr_t rownr) const =0
Test if the given cell contains a defined value.
virtual uInt ndim(rownr_t rownr) const
Get the #dimensions of an array in a particular cell.
virtual IPosition shapeColumn() const
Get the global shape of an array (ie.
virtual IPosition shape(rownr_t rownr) const
Get the shape of an array in a particular cell.
void getScalar(rownr_t rownr, Int64 &value) const
const BaseColumnDesc * colDescPtr_p
virtual TableRecord & rwKeywordSet()=0
Get access to the column keyword set.
void getScalar(rownr_t rownr, float &value) const
virtual void allocIterBuf(void *&lastVal, void *&curVal, CountedPtr< BaseCompare > &cmpObj)
Allocate value buffers for the table iterator.
void putScalar(rownr_t rownr, const Int &value)
virtual uInt ndimColumn() const
Get the global #dimensions of an array (ie.
virtual ColumnCache & columnCache()=0
Get a pointer to the underlying column cache.
BaseColumn(const BaseColumnDesc *)
Construct it using the given column description.
virtual void putArray(rownr_t rownr, const ArrayBase &dataPtr)
Put the array value in a particular cell.
void putScalar(rownr_t rownr, const float &value)
virtual Bool isStored() const =0
Test if the column is stored (otherwise it is virtual).
virtual void setShape(rownr_t rownr, const IPosition &shape)
Set the shape of the array in the given row.
virtual void getColumnSlice(const Slicer &, ArrayBase &dataPtr) const
Get subsections from all arrays in the column.
virtual void putArrayColumn(const ArrayBase &dataPtr)
Put the array of all array values in the column.
void putScalar(rownr_t rownr, const uShort &value)
virtual void initialize(rownr_t startRownr, rownr_t endRownr)=0
Initialize the rows from startRow till endRow (inclusive) with the default value defined in the colum...
void getScalar(rownr_t rownr, Complex &value) const
void getScalar(rownr_t rownr, uChar &value) const
void throwPutScalar() const
void getScalar(rownr_t rownr, uShort &value) const
virtual Bool isWritable() const =0
Test if the column is writable.
void throwGetScalar() const
Throw exceptions for invalid scalar get or put.
void putScalar(rownr_t rownr, const Complex &value)
virtual Bool canChangeShape() const
Ask the data manager if the shape of an existing array can be changed.
virtual void putArrayColumnCells(const RefRows &rownrs, const ArrayBase &dataPtr)
Get the array of some array values in a column.
void putScalar(rownr_t rownr, const uInt &value)
virtual void put(rownr_t rownr, const void *dataPtr)
Put the scalar value in a particular cell.
void throwPutType(const String &type) const
void putScalar(rownr_t rownr, const Bool &value)
Put the value into the row and convert it from the given type.
void putScalar(rownr_t rownr, const TableRecord &value)
void putScalar(rownr_t rownr, const DComplex &value)
void getScalar(rownr_t rownr, TableRecord &value) const
virtual void putScalarColumnCells(const RefRows &rownrs, const ArrayBase &dataPtr)
Get the vector of some scalar values in a column.
void throwGetType(const String &type) const
virtual void freeIterBuf(void *&lastVal, void *&curVal)
Free the value buffers allocated by allocIterBuf.
virtual void putSlice(rownr_t rownr, const Slicer &, const ArrayBase &dataPtr)
Put a slice of an N-dimensional array in a particular cell.
void putScalar(rownr_t rownr, const String &value)
virtual void getColumnSliceCells(const RefRows &rownrs, const Slicer &, ArrayBase &dataPtr) const
Get subsections from some arrays in the column.
Referenced counted pointer for constant data.
Sort on one or more keys, ascending and/or descending.
String: the storage and methods of handling collections of characters.
std::complex< Float > Complex
std::complex< Double > DComplex
this file contains all the compiler specific defines
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
bool Bool
Define the standard types used by Casacore.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
uInt64 rownr_t
Define the type of a row number in a table.