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