|
| SubTableDesc (const String &columnName, const String &comment, const String &tableDescName, int options=0) |
| Construct from a table description with the given name. More...
|
|
| SubTableDesc (const String &columnName, const String &comment, const TableDesc &, int options=0) |
| Construct from the given table description, which will be copied and frozen. More...
|
|
| SubTableDesc (const String &columnName, const String &comment, TableDesc *, int options=0) |
| Construct from the given table description, which will be used directly. More...
|
|
| SubTableDesc (const SubTableDesc &) |
| Copy constructor (copy semantics). More...
|
|
| ~SubTableDesc () |
|
SubTableDesc & | operator= (const SubTableDesc &) |
| Assignment (copy semantics). More...
|
|
BaseColumnDesc * | clone () const |
| Clone this column description to another. More...
|
|
TableDesc * | tableDesc () |
| Get the table description. More...
|
|
String | className () const |
| Get the name of this class. More...
|
|
PlainColumn * | makeColumn (ColumnSet *) const |
| Create a Column 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...
|
|
void | setName (const String &name) |
| Set the name of the column (for a rename). More...
|
|
Description of columns containing tables.
Intended use:
Public interface
Review Status
- Reviewed By:
- UNKNOWN
- Date Reviewed:
- before2004/08/25
Prerequisite
Etymology
SubTableDesc holds a description of a subtable contained in the columns of the parent table.
Synopsis
SubTableDesc describes a table column containing subtables. The semantics of subtables are described below. The column description is constructed using a table description describing the subtable. This subtable decription or its name is stored with the column description. When a table containing this column gets created, the subtable description gets copied and this copy is thereafter frozen.
Constructing a column description for a subtable can be done in 3 ways:
-
It can be constructed with the name of a table description kept in a file. Only this name will be stored with the column description. Only when the table column gets created, it will read the newest version of this table description. This is a completely dynamic way of defining the column. When the subtable description in the file changes, this column in newly created tables gets the latest version.
-
It can be constructed with a given table description. This means that a copy of that description will be made. The frozen subtable description will be stored with the column description. This is a completely static way of defining the column.
-
It can be constructed with a pointer to a table description. This means that a copy will only be made when the column description gets written. Thus changes to the subtable description will as long as possible be reflected in the column description. This is a mix of the first two ways.
A column can be direct or indirect. Direct columns will be written directly in the table file. All cells in the column must have the same description and it is therefore not possible to change a description. The subtables in indirect columns will be stored in separate files. The cells in indirect columns can contain different tables.
Example
subTableDesc.keywordSet().keysInt()("subkey") = 10;
subTableDesc.addColumn (TpDouble, "ra");
subTableDesc.addColumn (TpDouble, "dec");
td.addColumn (
SubTableDesc(
"sub1",
"subtable by name",
"tTableDesc_sub"));
td.addColumn (
SubTableDesc(
"sub2",
"subtable copy", subTableDesc));
td.addColumn (
SubTableDesc(
"sub3",
"subtable pointer", &subTableDesc));
Motivation
Several column description classes are needed to allow the user to define attributes which are special for each column type. For columns containing a table this is the table description.
To Do
-
Probably only direct table descriptions should be allowed. Indirect arrays can have a shape in the description (although they can have #dim), so tables should behave similarly.
Definition at line 143 of file SubTabDesc.h.