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