casacore
|
Templated class for description of table array columns. More...
#include <ArrColDesc.h>
Public Member Functions | |
ArrayColumnDesc (const String &name, Int ndim=-1, int options=0) | |
Construct the column with the given name and dimensionality. More... | |
ArrayColumnDesc (const String &name, const String &comment, Int ndim=-1, int options=0) | |
Construct the column with the given name, dimensionality, and comment. More... | |
ArrayColumnDesc (const String &name, const String &comment, const String &dataManName, const String &dataManGroup, Int ndim=-1, int options=0) | |
Construct the column with the given name, dimensionality, comment, and default data manager type and group. More... | |
ArrayColumnDesc (const String &name, const IPosition &shape, int options=0) | |
Construct the column with the given name and shape. More... | |
ArrayColumnDesc (const String &name, const String &comment, const IPosition &shape, int options=0) | |
Construct the column with the given name, shape, and comment. More... | |
ArrayColumnDesc (const String &name, const String &comment, const String &dataManName, const String &dataManGroup, const IPosition &shape, int options=0, int ndim=-1) | |
Construct the column with the given name, shape, comment, and default data manager type and group. More... | |
ArrayColumnDesc (const ArrayColumnDesc< T > &) | |
Copy constructor (copy semantics);. More... | |
~ArrayColumnDesc () | |
ArrayColumnDesc< T > & | operator= (const ArrayColumnDesc< T > &) |
Assignment (copy semantics);. More... | |
BaseColumnDesc * | clone () const |
Clone this column description to another. More... | |
void | registerClass () const |
Register the construction function of this class. More... | |
Public Member Functions inherited from casacore::ArrayColumnDescBase | |
ArrayColumnDescBase (const String &name, const String &comment, const String &dataManagerType, const String &dataManagerGroup, DataType, const String &dataTypeId, Int options, uInt ndim, const IPosition &shape) | |
Construct with given parameters. More... | |
ArrayColumnDescBase (const ArrayColumnDescBase &) | |
Copy constructor (copy semantics);. More... | |
~ArrayColumnDescBase () | |
ArrayColumnDescBase & | operator= (const ArrayColumnDescBase &) |
Assignment (copy semantics);. More... | |
String | className () const |
Get the name of this class. More... | |
virtual PlainColumn * | makeColumn (ColumnSet *) const |
Create a Column object out of this. More... | |
void | show (ostream &os) const |
Show the column. More... | |
Public Member Functions inherited from casacore::BaseColumnDesc | |
BaseColumnDesc (const String &name, const String &comment, const String &dataManagerType, const String &dataManagerGroup, DataType, const String &dataTypeId, Int options, uInt ndim, const IPosition &shape, Bool isScalar, Bool isArray, Bool isTable) | |
Construct the column base object. More... | |
BaseColumnDesc (const BaseColumnDesc &) | |
Copy constructor (copy semantics). More... | |
virtual | ~BaseColumnDesc () |
TableRecord & | rwKeywordSet () |
Get access to the set of keywords. More... | |
const TableRecord & | keywordSet () const |
const String & | name () const |
Get the name of the column. More... | |
DataType | dataType () const |
Get the data type of the column. More... | |
const String & | dataTypeId () const |
Get the type id for non-standard data types (i.e. More... | |
const String & | dataManagerType () const |
Get the type name of the default data manager. More... | |
String & | dataManagerType () |
Get the type name of the default data manager. More... | |
const String & | dataManagerGroup () const |
Get the data manager group. More... | |
String & | dataManagerGroup () |
Get the data manager group. More... | |
void | setDefaultDataManager (Bool always) |
Set the data manager type and group to the default. More... | |
const String & | comment () const |
Get comment string. More... | |
String & | comment () |
Get comment string (allowing it to be changed). More... | |
Int | options () const |
Get the options. More... | |
Bool | isScalar () const |
Test if column is scalar, array or table. More... | |
Bool | isArray () const |
Bool | isTable () const |
Int | ndim () const |
Get the number of dimensions. More... | |
const IPosition & | shape () const |
Get the predefined shape. More... | |
void | setNdim (uInt ndim) |
Set the number of dimensions. More... | |
void | setShape (const IPosition &shape) |
Set the predefined shape. More... | |
void | setShape (const IPosition &shape, Bool directOption) |
void | setOptions (Int options) |
Set the options to the given value. More... | |
uInt | maxLength () const |
Get the maximum value length. More... | |
void | setMaxLength (uInt maxLength) |
Set the maximum value length. More... | |
const TableDesc * | tableDesc () const |
Get table description (in case column contains subtables). More... | |
virtual TableDesc * | tableDesc () |
void | setName (const String &name) |
Set the name of the column (for a rename). More... | |
Static Public Member Functions | |
static BaseColumnDesc * | makeDesc (const String &name) |
Create the object from AipsIO (this function is registered). More... | |
Friends | |
class | ColumnDesc |
Templated class for description of table array columns.
Public interface
This class builds descriptions of table columns where each cell (which may also be called a row) will hold an array.
ArrayColumnDesc is a templated class for defining a table column containing arrays.
The table values are handled by a data manager. This can be a storage manager to store the values in a file or it can be a virtual column engine to calculate them on-the-fly. Only the basic data types are allowed when storing in a file. These are: Bool, uChar, Short, uShort, Int, uInt, Int64, float, double, Complex, DComplex and String.
At table creation time (when a table gets created from a table description), each column needs to be bound to a data manager. If not done explicitly, the table system will bind a column to the default manager defined in the column description.
An array column description consists of the following attributes:
There are several constructors, which allow the definition of most of the above mentioned attributes. Others, like the default keyword set, have to be defined explicitly.
This class is derived from ArrayColumnDescBase, thus the functions in there also apply to this class.
Once a column description is set up satisfactorily, it must be added to a table description before it can be used by the table system.
Several column description classes are needed to allow the user to define attributes which are special for each column type. For scalars the special attribute is the default value. They all have to be templated to support arbitrary data types.
static String dataTypeId(); // (not needed for builtin types)
This should return the unique "name" of the class. Definition at line 236 of file ArrColDesc.h.
|
explicit |
Construct the column with the given name and dimensionality.
The data manager type defaults to the StandardStman storage manager. The data manager group defaults to the data manager type. Ndim <=0 means that the number of dimensions is free and will be defined when creating the table (rows). Ndim>0 means that the arrays in this column must have the given dimensionality. The possible options are defined in ColumnDesc.h.
casacore::ArrayColumnDesc< T >::ArrayColumnDesc | ( | const String & | name, |
const String & | comment, | ||
Int | ndim = -1 , |
||
int | options = 0 |
||
) |
Construct the column with the given name, dimensionality, and comment.
The data manager type defaults to the StandardStman storage manager. The data manager group defaults to the data manager type. Ndim <=0 means that the number of dimensions is free and will be defined when creating the table (rows). Ndim>0 means that the arrays in this column must have the given dimensionality. The possible options are defined in ColumnDesc.h.
casacore::ArrayColumnDesc< T >::ArrayColumnDesc | ( | const String & | name, |
const String & | comment, | ||
const String & | dataManName, | ||
const String & | dataManGroup, | ||
Int | ndim = -1 , |
||
int | options = 0 |
||
) |
Construct the column with the given name, dimensionality, comment, and default data manager type and group.
A blank data manager group defaults to the data manager type. Ndim <=0 means that the number of dimensions is free and will be defined when creating the table (rows). Ndim>0 means that the arrays in this column must have the given dimensionality. The possible options are defined in ColumnDesc.h.
casacore::ArrayColumnDesc< T >::ArrayColumnDesc | ( | const String & | name, |
const IPosition & | shape, | ||
int | options = 0 |
||
) |
Construct the column with the given name and shape.
The data manager type defaults to the StandardStman storage manager. The data manager group defaults to the data manager type. The possible options are defined in ColumnDesc.h. This constructor can only be used for FixedShape arrays, because the shape of other arrays can only be set per row.
casacore::ArrayColumnDesc< T >::ArrayColumnDesc | ( | const String & | name, |
const String & | comment, | ||
const IPosition & | shape, | ||
int | options = 0 |
||
) |
Construct the column with the given name, shape, and comment.
The data manager type defaults to the StandardStman storage manager. The data manager group defaults to the data manager type. The possible options are defined in ColumnDesc.h. This constructor can only be used for FixedShape arrays, because the shape of other arrays can only be set per row.
casacore::ArrayColumnDesc< T >::ArrayColumnDesc | ( | const String & | name, |
const String & | comment, | ||
const String & | dataManName, | ||
const String & | dataManGroup, | ||
const IPosition & | shape, | ||
int | options = 0 , |
||
int | ndim = -1 |
||
) |
Construct the column with the given name, shape, comment, and default data manager type and group.
A blank data manager group defaults to the data manager type. The possible options are defined in ColumnDesc.h. This constructor can only be used for FixedShape arrays, because the shape of other arrays can only be set per row. If both ndim and shape are given as > 0, ndim should match the length of shape.
casacore::ArrayColumnDesc< T >::ArrayColumnDesc | ( | const ArrayColumnDesc< T > & | ) |
Copy constructor (copy semantics);.
casacore::ArrayColumnDesc< T >::~ArrayColumnDesc | ( | ) |
|
virtual |
Clone this column description to another.
Implements casacore::BaseColumnDesc.
|
static |
Create the object from AipsIO (this function is registered).
ArrayColumnDesc<T>& casacore::ArrayColumnDesc< T >::operator= | ( | const ArrayColumnDesc< T > & | ) |
Assignment (copy semantics);.
void casacore::ArrayColumnDesc< T >::registerClass | ( | ) | const |
Register the construction function of this class.
|
friend |
Definition at line 238 of file ArrColDesc.h.