28 #ifndef TABLES_TABLECOLUMN_H
29 #define TABLES_TABLECOLUMN_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/Tables/BaseColumn.h>
35 #include <casacore/tables/Tables/BaseTable.h>
36 #include <casacore/casa/BasicSL/String.h>
37 #include <casacore/casa/Arrays/IPosition.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); }
#define TABLECOLUMNCHECKROW(ROWNR)
virtual IPosition tileShape(rownr_t rownr) const
Get the tile shape of an array in a particular cell.
virtual rownr_t nrow() const =0
Get nr of rows in the column.
virtual TableRecord & keywordSet()=0
virtual void setMaximumCacheSize(uInt nbytes)=0
Set the maximum cache size (in bytes) to be used by a storage manager.
void getScalar(rownr_t rownr, Bool &value) const
Get the value from the row and convert it to the required type.
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.
virtual uInt ndimColumn() const
Get the global #dimensions 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.
virtual Bool isWritable() const =0
Test if this table is writable.
void checkRowNumber(rownr_t rownr) const
Check if the row number is valid.
String: the storage and methods of handling collections of characters.
void getScalar(rownr_t rownr, uShort &value) const
void putScalar(rownr_t rownr, const Complex &value)
void getScalar(rownr_t rownr, Int &value) const
void getScalarValue(rownr_t rownr, void *value, const String &dataTypeId) const
void putColumn(const TableColumn &that)
Copy the values of that column to this column.
void putScalar(rownr_t rownr, const Int &value)
uShort asuShort(rownr_t rownr) const
void getScalarValue(rownr_t rownr, Int64 *value, const String &) const
Int64 asInt64(rownr_t rownr) const
virtual void put(rownr_t thisRownr, const TableColumn &that, rownr_t thatRownr, Bool preserveTileShape=False)
Use possibly different row numbers for that (i.e.
Bool canChangeShape() const
Can the shape of an already existing non-FixedShape array be changed? This depends on the storage man...
void getScalar(rownr_t rownr, uInt &value) const
TableColumn(const Table &, uInt columnIndex)
Construct the object for a column in the table using its index.
Bool isWritable() const
Test if the column can be written to, thus if the column and the underlying table can be written to.
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 ...
void checkRowNumber(rownr_t rownr) const
Check if the row number is valid.
const ColumnCache * colCachePtr_p
void attach(const Table &table, const String &columnName)
Attach a column to the object.
Complex asComplex(rownr_t rownr) const
void getScalar(rownr_t rownr, DComplex &value) const
void putScalar(rownr_t rownr, const Char *value)
void setMaximumCacheSize(uInt nbytes) const
Set the maximum cache size (in bytes) to be used by a storage manager.
TableColumn()
The default constructor creates a null object, i.e.
void getScalarValue(rownr_t rownr, Bool *value, const String &) const
Get the value of a scalar in the given row.
String asString(rownr_t rownr) const
void reference(const TableColumn &)
Change the reference to another column.
Bool isNull() const
Test if the object is null, i.e.
void putScalar(rownr_t rownr, const Int64 &value)
void putScalar(rownr_t rownr, const Bool &value)
Put the value of a scalar in the given row.
BaseColumn * baseColPtr() const
Get the baseColPtr_p of this TableColumn object.
void getScalarValue(rownr_t rownr, Short *value, const String &) const
void putScalar(rownr_t rownr, const float &value)
void putScalar(rownr_t rownr, const uChar &value)
uInt ndim(rownr_t rownr) const
Get the #dimensions of an array in a particular cell.
Bool isWritableAtAll() const
Test if the column is writable at all (virtual columns might not be).
void getScalarValue(rownr_t rownr, uInt *value, const String &) const
void getScalar(rownr_t rownr, Bool &value) const
Get the value of a scalar in the given row.
Bool isDefined(rownr_t rownr) const
Test if the given cell contains a defined value.
IPosition shapeColumn() const
Get the global shape of an array (ie.
TableRecord & rwKeywordSet()
Get read/write access to the column keyword set.
void putScalar(rownr_t rownr, const double &value)
void getScalar(rownr_t rownr, Int64 &value) const
void getScalarValue(rownr_t rownr, DComplex *value, const String &) const
const TableRecord & keywordSet() const
Get readonly access to the column keyword set.
void getScalar(rownr_t rownr, float &value) const
void getScalar(rownr_t rownr, uChar &value) const
void attach(const Table &table, uInt columnIndex)
BaseColumn * baseColPtr(const TableColumn &that) const
Get the baseColPtr_p of another TableColumn object.
double asdouble(rownr_t rownr) const
void putScalar(rownr_t rownr, const DComplex &value)
DComplex asDComplex(rownr_t rownr) const
const ColumnDesc & columnDesc() const
Get const access to the column description.
void putScalar(rownr_t rownr, const uInt &value)
void checkWritable() const
Check if the column is writable and throw an exception if not.
void getScalarValue(rownr_t rownr, Complex *value, const String &) const
void getScalarValue(rownr_t rownr, uShort *value, const String &) const
IPosition tileShape(rownr_t rownr) const
Get the tile shape of an array in a particular cell.
virtual TableColumn * clone() const
Clone the object.
void putScalar(rownr_t rownr, const Short &value)
BaseColumn * baseColPtr_p
void getScalarValue(rownr_t rownr, double *value, const String &) const
float asfloat(rownr_t rownr) const
void getScalar(rownr_t rownr, String &value) const
Short asShort(rownr_t rownr) const
void getScalarValue(rownr_t rownr, Int *value, const String &) const
TableColumn & operator=(const TableColumn &)
Assignment has reference semantics.
uChar asuChar(rownr_t rownr) const
void getScalar(rownr_t rownr, double &value) const
void throwIfNull() const
Throw an exception if the object is null, i.e.
void getScalar(rownr_t rownr, Complex &value) const
Table table() const
Get the Table object this column belongs to.
void getScalarValue(rownr_t rownr, uChar *value, const String &) const
uInt ndimColumn() const
Get the global #dimensions of an array (ie.
void throwNotWritable() const
Throw the exception that the column is not writable.
void getScalar(rownr_t rownr, Short &value) const
uInt asuInt(rownr_t rownr) const
TableColumn(const TableColumn &)
Copy constructor (reference semantics).
IPosition shape(rownr_t rownr) const
Get the shape of an array in a particular cell.
rownr_t nrow() const
Get the number of rows in the column.
Int asInt(rownr_t rownr) const
Bool asBool(rownr_t rownr) const
Get the value from the row and convert it to the required type.
TableColumn(const Table &, const String &columnName)
Construct the object for a column in the table using its name.
void getScalarValue(rownr_t rownr, float *value, const String &) const
void getScalarValue(rownr_t rownr, String *value, const String &) const
void putScalar(rownr_t rownr, const String &value)
void putScalar(rownr_t rownr, const uShort &value)
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.
std::complex< Float > Complex
std::complex< Double > DComplex
this file contains all the compiler specific defines
TableColumn ROTableColumn
Define ROTableColumn for backward compatibility.
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.