Go to the documentation of this file.
28 #ifndef TABLES_SCALARCOLUMN_H
29 #define TABLES_SCALARCOLUMN_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/Tables/TableColumn.h>
35 #include <casacore/tables/Tables/ColumnCache.h>
42 template<
class T>
class Vector;
84 class ScalarColumn :
public TableColumn
140 Int off = colCachePtr_p->offset(rownr);
142 value = ((T*)(colCachePtr_p->dataPtr()))[off];
144 baseColPtr_p->get (rownr, &
value);
200 baseColPtr_p->put (rownr, &
value); }
207 {
put (rownr, that, rownr); }
220 {
put (rownr, that, rownr); }
286 #define ROScalarColumn ScalarColumn
289 #ifndef CASACORE_NO_AUTO_TEMPLATES
290 #include <casacore/tables/Tables/ScalarColumn.tcc>
291 #endif //# CASACORE_NO_AUTO_TEMPLATES
Specify which elements to extract from an n-dimensional array.
void put(uInt thisRownr, const TableColumn &that, uInt thatRownr, Bool=False)
Use possibly different row numbers for that (i.e.
Read/write access to a table column.
void put(uInt rownr, const TableColumn &that, Bool=False)
Copy the value of a cell of that column to a cell of this column.
void put(uInt rownr, const ScalarColumn< T > &that)
Copy the value of a cell of that column to a cell of this column.
ScalarColumn(const TableColumn &)
Construct from the given table column.
Access to a scalar table column with arbitrary data type.
Vector< T > getColumn() const
Get the vector of all values in the column.
void putColumnRange(const Slicer &rowRange, const Vector< T > &vec)
Put the vector of a range of values in the column.
ScalarColumn()
The default constructor creates a null object, i.e.
virtual TableColumn * clone() const
Clone the object.
void checkDataType() const
Check if the data type matches the column data type.
Vector< T > getColumnRange(const Slicer &rowRange) const
Get the vector of a range of values in the column.
void put(uInt thisRownr, const ScalarColumn< T > &that, uInt thatRownr)
Use possibly different row numbers for that (i.e.
ScalarColumn(const ScalarColumn< T > &)
Copy constructor (reference semantics).
Main interface class to a read/write table.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
ScalarColumn(const Table &, const String &columnName)
Construct for the given column in the given table.
Bool reaskAccessColumn_p
Keep a switch to know if access knowledge is permanent or has to be asked again the next time.
void getColumnRange(const Slicer &rowRange, Vector< T > &vec, Bool resize=False) const
Get the vector of a range of values in the column.
Class holding the row numbers in a RefTable.
Vector< T > getColumnCells(const RefRows &rownrs) const
Get the vector of some values in the column.
void putColumnCells(const RefRows &rownrs, const Vector< T > &vec)
Put the vector of some values in the column.
void getColumnCells(const RefRows &rownrs, Vector< T > &vec, Bool resize=False) const
Get the vector of some values in the column.
void fillColumn(const T &value)
Put the same value in all cells of the column.
void putColumn(const ScalarColumn< T > &that)
Put the contents of a column with the same data type into this column.
this file contains all the compiler specific defines
void put(uInt rownr, const T &value)
Put the value in a particular cell (i.e.
void getColumn(Vector< T > &vec, Bool resize=False) const
Get the vector of all values in the column.
ScalarColumn< T > & operator=(const ScalarColumn< T > &)
Assignment uses reference semantics, thus works the same as function reference.
void reference(const ScalarColumn< T > &)
Change the reference to another column.
T operator()(uInt rownr) const
String: the storage and methods of handling collections of characters.
Bool canAccessColumn_p
Keep a switch to determine if an entire column can be accessed.
bool Bool
Define the standard types used by Casacore.
void putColumn(const Vector< T > &vec)
Put the vector of all values in the column.
#define TABLECOLUMNCHECKROW(ROWNR)
void get(uInt rownr, T &value) const
Get the data from a particular cell (i.e.
A 1-D Specialization of the Array class.
void attach(const Table &table, const String &columnName)
Attach a column to the object.