Go to the documentation of this file.
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>
49 template<
class T>
class Array;
50 template<
class T>
class Vector;
184 virtual void get (
uInt rownr,
void* dataPtr)
const = 0;
204 void* dataPtr)
const;
210 void* dataPtr)
const;
216 const Slicer&,
void* dataPtr)
const;
220 virtual void put (
uInt rownr,
const void* dataPtr) = 0;
240 const void* dataPtr);
246 const void* dataPtr);
252 const Slicer&,
const void* dataPtr);
310 Int order,
const void*& dataSave);
314 const void*& dataSave);
324 virtual void allocIterBuf (
void*& lastVal,
void*& curVal,
328 virtual void freeIterBuf (
void*& lastVal,
void*& curVal);
void throwGetType(const String &type) const
Specify which elements to extract from an n-dimensional array.
virtual uInt nrow() const =0
Get nr of rows in the column.
A Vector of integers, for indexing into Array<T> objects.
virtual void allocIterBuf(void *&lastVal, void *&curVal, CountedPtr< BaseCompare > &cmpObj)
Allocate value buffers for the table iterator.
virtual void makeSortKey(Sort &, CountedPtr< BaseCompare > &cmpObj, Int order, const void *&dataSave)
Add this column and its data to the Sort object.
virtual Bool isWritable() const =0
Test if the column is writable.
virtual void put(uInt rownr, const void *dataPtr)=0
Put the value in a particular cell.
virtual void getScalarColumnCells(const RefRows &rownrs, void *dataPtr) const
Get the vector of some scalar values in a column.
virtual uInt ndim(uInt rownr) const
Get the #dimensions of an array in a particular cell.
std::complex< Double > DComplex
A hierarchical collection of named fields of various types.
Referenced counted pointer for constant data.
virtual Bool canAccessScalarColumnCells(Bool &reask) const
Ask if the data manager can handle a collection of cells in a scalar column.
virtual ColumnCache & columnCache()=0
Get a pointer to the underlying column cache.
virtual void putScalarColumn(const void *dataPtr)
Put the vector of all scalar values in the column.
virtual IPosition shapeColumn() const
Get the global shape of an array (ie.
virtual void freeSortKey(const void *&dataSave)
Free storage on the heap allocated by makeSortkey().
virtual void setMaximumCacheSize(uInt nbytes)=0
Set the maximum cache size (in bytes) to be used by a storage manager.
BaseColumn(const BaseColumnDesc *)
Construct it using the given column description.
virtual void getArrayColumnCells(const RefRows &rownrs, void *dataPtr) const
Get the array of some array values in a column.
virtual void initialize(uInt startRownr, uInt endRownr)=0
Initialize the rows from startRow till endRow (inclusive) with the default value defined in the colum...
virtual void putColumnSliceCells(const RefRows &rownrs, const Slicer &, const void *dataPtr)
Put subsections of some arrays in the column.
virtual IPosition tileShape(uInt rownr) const
Get the tile shape of an array in a particular cell.
void getScalar(uInt rownr, Bool &value) const
Get the value from the row and convert it to the required type.
virtual void putSlice(uInt rownr, const Slicer &, const void *dataPtr)
Put a slice of an N-dimensional array in a particular cell.
virtual Bool canAccessArrayColumn(Bool &reask) const
Ask if the data manager can handle an array column.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
Class holding the row numbers in a RefTable.
Abstract base class for a table column.
virtual Bool canAccessColumnSlice(Bool &reask) const
Ask if the data manager can handle a column slice.
virtual void getScalarColumn(void *dataPtr) const
Get the vector of all scalar values in a column.
virtual void getColumnSlice(const Slicer &, void *dataPtr) const
Get subsections from all arrays in the column.
const BaseColumnDesc * colDescPtr_p
virtual Bool canChangeShape() const
Ask the data manager if the shape of an existing array can be changed.
void throwPutScalar() const
virtual void getSlice(uInt rownr, const Slicer &, void *dataPtr) const
Get a slice of an N-dimensional array in a particular cell.
void putScalar(uInt rownr, const Bool &value)
Put the value into the row and convert it from the given type.
virtual Bool canAccessSlice(Bool &reask) const
Ask if the data manager can handle a cell slice.
An abstract base class for table column descriptions.
virtual void makeRefSortKey(Sort &, CountedPtr< BaseCompare > &cmpObj, Int order, const Vector< uInt > &rownrs, const void *&dataSave)
Do it only for the given row numbers.
this file contains all the compiler specific defines
virtual void freeIterBuf(void *&lastVal, void *&curVal)
Free the value buffers allocated by allocIterBuf.
virtual void getArrayColumn(void *dataPtr) const
Get the array of all array values in a column.
virtual void putColumnSlice(const Slicer &, const void *dataPtr)
Put into subsections of all table arrays in the column.
Sort on one or more keys, ascending and/or descending.
virtual IPosition shape(uInt rownr) const
Get the shape of an array in a particular cell.
virtual Bool canAccessArrayColumnCells(Bool &reask) const
Ask if the data manager can handle a collection of cells in an array column.
void throwGetScalar() const
Throw exceptions for invalid scalar get or put.
A caching object for a table column.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
virtual TableRecord & rwKeywordSet()=0
Get access to the column keyword set.
virtual Bool canAccessScalarColumn(Bool &reask) const
Ask if the data manager can handle a scalar column.
virtual void getColumnSliceCells(const RefRows &rownrs, const Slicer &, void *dataPtr) const
Get subsections from some arrays in the column.
virtual void get(uInt rownr, void *dataPtr) const =0
Get the value from a particular cell.
String: the storage and methods of handling collections of characters.
virtual void setShape(uInt rownr, const IPosition &shape)
Set the shape of the array in the given row.
bool Bool
Define the standard types used by Casacore.
std::complex< Float > Complex
virtual void putArrayColumnCells(const RefRows &rownrs, const void *dataPtr)
Get the array of some array values in a column.
virtual void putScalarColumnCells(const RefRows &rownrs, const void *dataPtr)
Get the vector of some scalar values in a column.
virtual Bool isDefined(uInt rownr) const =0
Test if the given cell contains a defined value.
void putScalar(uInt rownr, const Char *value)
void throwPutType(const String &type) const
virtual TableRecord & keywordSet()=0
virtual void putArrayColumn(const void *dataPtr)
Put the array of all array values in the column.
virtual uInt ndimColumn() const
Get the global #dimensions of an array (ie.
Envelope class for the description of a table column.
const ColumnDesc & columnDesc() const
Get const access to the column description.
virtual Bool isStored() const =0
Test if the column is stored (otherwise it is virtual).