28 #ifndef TABLES_TABLECOLUMN_H
29 #define TABLES_TABLECOLUMN_H
47 #if defined(AIPS_DEBUG)
48 # define TABLECOLUMNCHECKROW(ROWNR) \
49 (checkRowNumber (ROWNR))
51 # define TABLECOLUMNCHECKROW(ROWNR)
315 const String& dataTypeId)
const
329 {
put (rownr, that, rownr, preserveTileShape); }
A Vector of integers, for indexing into Array<T> objects.
TableColumn ROTableColumn
Define ROTableColumn for backward compatibility.
void throwIfNull() const
Throw an exception if the object is null, i.e.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
virtual uInt ndimColumn() const
Get the global #dimensions of an array (ie.
#define TABLECOLUMNCHECKROW(ROWNR)
void attach(const Table &table, const String &columnName)
Attach a column to the object.
void putScalar(rownr_t rownr, const float &value)
virtual TableColumn * clone() const
Clone the object.
std::complex< Float > Complex
virtual TableRecord & keywordSet()=0
Main interface class to a read/write table.
Bool isDefined(rownr_t rownr) const
Test if the given cell contains a defined value.
IPosition tileShape(rownr_t rownr) const
Get the tile shape of an array in a particular cell.
BaseColumn * baseColPtr(const TableColumn &that) const
Get the baseColPtr_p of another TableColumn object.
void putScalar(rownr_t rownr, const Int &value)
Envelope class for the description of a table column.
void getScalar(rownr_t rownr, DComplex &value) const
void checkRowNumber(rownr_t rownr) const
Check if the row number is valid.
void getScalarValue(rownr_t rownr, float *value, const String &) const
virtual uInt ndim(rownr_t rownr) const
Get the #dimensions of an array in a particular cell.
Int asInt(rownr_t rownr) const
void getScalarValue(rownr_t rownr, Bool *value, const String &) const
Get the value of a scalar in the given row.
void putScalar(rownr_t rownr, const Int64 &value)
void getScalar(rownr_t rownr, uInt &value) const
uInt asuInt(rownr_t rownr) const
Bool isNull() const
Test if the object is null, i.e.
TableColumn()
The default constructor creates a null object, i.e.
void throwNotWritable() const
Throw the exception that the column is not writable.
void getScalar(rownr_t rownr, Bool &value) const
Get the value of a scalar in the given row.
const ColumnDesc & columnDesc() const
Get const access to the column description.
BaseColumn * baseColPtr_p
double asdouble(rownr_t rownr) const
uChar asuChar(rownr_t rownr) const
void checkWritable() const
Check if the column is writable and throw an exception if not.
const TableRecord & keywordSet() const
Get readonly access to the column keyword set.
Table table() const
Get the Table object this column belongs to.
void putScalar(rownr_t rownr, const double &value)
void getScalar(rownr_t rownr, double &value) const
IPosition shape(rownr_t rownr) const
Get the shape of an array in a particular cell.
void getScalarValue(rownr_t rownr, Complex *value, const String &) const
void getScalar(rownr_t rownr, Bool &value) const
Get the value from the row and convert it to the required type.
void putScalar(rownr_t rownr, const Short &value)
void getScalar(rownr_t rownr, uChar &value) const
Bool canChangeShape() const
Can the shape of an already existing non-FixedShape array be changed? This depends on the storage man...
void getScalarValue(rownr_t rownr, DComplex *value, const String &) const
void putScalar(rownr_t rownr, const uInt &value)
void getScalarValue(rownr_t rownr, Int64 *value, const String &) const
rownr_t nrow() const
Get the number of rows in the column.
uInt ndim(rownr_t rownr) const
Get the #dimensions of an array in a particular cell.
Abstract base class for tables.
void putScalar(rownr_t rownr, const uShort &value)
void putColumn(const TableColumn &that)
Copy the values of that column to this column.
std::complex< Double > DComplex
Bool isWritableAtAll() const
Test if the column is writable at all (virtual columns might not be).
virtual IPosition tileShape(rownr_t rownr) const
Get the tile shape of an array in a particular cell.
void getScalar(rownr_t rownr, uShort &value) const
void getScalarValue(rownr_t rownr, Int *value, const String &) const
const ColumnCache * colCachePtr_p
Virtual column forwarding to another column.
void getScalar(rownr_t rownr, Short &value) const
virtual rownr_t nrow() const =0
Get nr of rows in the column.
virtual void setMaximumCacheSize(uInt nbytes)=0
Set the maximum cache size (in bytes) to be used by a storage manager.
bool Bool
Define the standard types used by Casacore.
virtual Bool isWritable() const =0
Test if this table is writable.
A caching object for a table column.
float asfloat(rownr_t rownr) const
Read/write access to a table column.
DComplex asDComplex(rownr_t rownr) const
Complex asComplex(rownr_t rownr) const
Int64 asInt64(rownr_t rownr) const
A hierarchical collection of named fields of various types.
void putScalar(rownr_t rownr, const Bool &value)
Put the value of a scalar in the given row.
Short asShort(rownr_t rownr) const
TableRecord & rwKeywordSet()
Get read/write access to the column keyword set.
uShort asuShort(rownr_t rownr) const
void putScalar(rownr_t rownr, const DComplex &value)
virtual IPosition shape(rownr_t rownr) const
Get the shape of an array in a particular cell.
void getScalar(rownr_t rownr, String &value) const
uInt64 rownr_t
Define the type of a row number in a table.
IPosition shapeColumn() const
Get the global shape of an array (ie.
void putScalar(rownr_t rownr, const Bool &value)
Put the value into the row and convert it from the given type.
uInt ndimColumn() const
Get the global #dimensions of an array (ie.
void getScalar(rownr_t rownr, Complex &value) const
void put(rownr_t rownr, const TableColumn &that, Bool preserveTileShape=False)
Copy the value of a cell of that column to a cell of this column.
void getScalarValue(rownr_t rownr, String *value, const String &) const
void getScalar(rownr_t rownr, float &value) const
void getScalarValue(rownr_t rownr, void *value, const String &dataTypeId) const
String: the storage and methods of handling collections of characters.
void putScalar(rownr_t rownr, const uChar &value)
void attach(const Table &table, uInt columnIndex)
void getScalar(rownr_t rownr, Int64 &value) const
void getScalar(rownr_t rownr, Int &value) const
void getScalarValue(rownr_t rownr, uShort *value, const String &) const
void getScalarValue(rownr_t rownr, Short *value, const String &) const
void putScalar(rownr_t rownr, const String &value)
void getScalarValue(rownr_t rownr, uChar *value, const String &) const
void checkRowNumber(rownr_t rownr) const
Check if the row number is valid.
void getScalarValue(rownr_t rownr, double *value, const String &) const
TableColumn & operator=(const TableColumn &)
Assignment has reference semantics.
void setMaximumCacheSize(uInt nbytes) const
Set the maximum cache size (in bytes) to be used by a storage manager.
Bool isWritable() const
Test if the column can be written to, thus if the column and the underlying table can be written to...
Bool asBool(rownr_t rownr) const
Get the value from the row and convert it to the required type.
void putScalar(rownr_t rownr, const Char *value)
BaseColumn * baseColPtr() const
Get the baseColPtr_p of this TableColumn object.
String asString(rownr_t rownr) const
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
void reference(const TableColumn &)
Change the reference to another column.
void putScalar(rownr_t rownr, const Complex &value)
virtual IPosition shapeColumn() const
Get the global shape of an array (ie.
void getScalarValue(rownr_t rownr, uInt *value, const String &) const
Bool hasContent(rownr_t rownr=0) const
Does the column has content in the given row (default is the first row)? It has if it is defined and ...
virtual Bool isDefined(rownr_t rownr) const =0
Test if the given cell contains a defined value.
Abstract base class for a table column.