Go to the documentation of this file.
28 #ifndef TABLES_COLUMNDESC_H
29 #define TABLES_COLUMNDESC_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/Tables/BaseColDesc.h>
35 #include <casacore/casa/BasicSL/String.h>
36 #include <casacore/casa/Arrays/IPosition.h>
37 #include <casacore/casa/OS/Mutex.h>
326 void show (ostream& os)
const;
static std::map< String, ColumnDescCtor * > initRegisterMap()
Register the main data managers.
void setNdim(uInt ndim)
Set the number of dimensions.
Define the structure of a Casacore table.
String & dataManagerGroup()
Get the data manager group.
void setShape(const IPosition &shape)
Set the predefined shape.
A Vector of integers, for indexing into Array<T> objects.
ColumnDesc()
Default constructor (needed for ColumnDescSet).
AipsIO is the object persistency mechanism of Casacore
Class to view a concatenation of tables as a single table.
const String & comment() const
Get comment string.
TableRecord & rwKeywordSet()
Get access to the set of keywords.
virtual void handleAdd(ColumnDescSet &cds)
Take action after a column has been handled by ColumnDescSet.
A column in a reference table.
void setName(const String &name)
Set the name of the column.
Bool isTable() const
Test if column is a table.
const IPosition & shape() const
Get the predefined shape.
void getFile(AipsIO &, const TableAttr &)
Get the object from AipsIO.
const String & dataManagerType() const
Get the type name of the default data manager.
const String & dataTypeId() const
Get the type id for non-standard data types (i.e.
void handleRename(ColumnDescSet &cds, const String &oldName)
Bool isScalar() const
Test if column is scalar, array or table.
A hierarchical collection of named fields of various types.
void setDefaultDataManager(Bool always=True)
If always==True they are always set, otherwise only if empty.
ConcatColumn * makeConcatColumn(ConcatTable *rtp) const
Create a ConcatColumn column object out of this column description.
const String & name() const
Get the name of the column.
virtual PlainColumn * makeColumn(ColumnSet *) const =0
Make a PlainColumn object out of the description.
Bool operator!=(const ColumnDesc &) const
virtual void renameAction(const String &newName, const String &oldName)
This function allows each column to act upon a rename of another column.
static ColumnDescCtor * getCtor(const String &name)
Get a construction function for a XXColumnDesc object (thread-safe).
void setMaxLength(uInt maxLength)
Set the maximum value length.
void setName(const String &name)
Set the name of the column (for a rename).
const String & dataManagerType() const
Get the type name of the default data manager.
const TableRecord & keywordSet() const
void setOptions(Int options)
Set the options to the given value.
RefColumn * makeRefColumn(RefTable *, BaseColumn *) const
Make a RefColumn object out of the description.
uInt maxLength() const
Get the maximum value length.
static Mutex theirMutex
A mutex for additions to the constructor map.
static std::map< String, ColumnDescCtor * > & getRegisterMap()
Define a map which maps the name of the various XXColumnDesc classes to a static function constructin...
Bool isArray() const
Test if column is an array.
Class to manage a set of table columns.
Int ndim() const
Get the number of dimensions.
Bool isScalar() const
Test if column is a scalar.
Option
Enumerate the possible column options.
Int options() const
Get the options.
const String & comment() const
Get comment string.
virtual void checkAdd(const ColumnDescSet &cds) const
Check if a column can be handled by ColumnDescSet.
Abstract base class for a table column.
PlainColumn * makeColumn(ColumnSet *csp) const
Create a PlainColumn column object out of this column description.
virtual void handleRename(ColumnDescSet &cds, const String &oldName)
Bool operator==(const ColumnDesc &) const
Comparison.
TableRecord & rwKeywordSet()
Get access to the set of keywords.
DataType trueDataType() const
Get the true data type of the column.
friend AipsIO & operator<<(AipsIO &ios, const ColumnDesc &cd)
Write into AipsIO.
void setDefaultDataManager(Bool always)
Set the data manager type and group to the default.
An abstract base class for table column descriptions.
undefined values are possible
this file contains all the compiler specific defines
String & dataManagerType()
Get the type name of the default data manager (allowing it to be changed).
void setOptions(int options)
Set the options to the given value.
String & comment()
Get comment string (allowing it to be changed).
void setShape(const IPosition &shape)
Set the predefined shape.
const IPosition & shape() const
Get the predefined shape.
void show() const
Show the column on cout.
void checkAdd(const ColumnDescSet &cds) const
Check if a column can be handled by ColumnDescSet.
void checkRename(const ColumnDescSet &cds, const String &newName) const
Check when a column gets renamed in a table description.
BaseColumnDesc * colPtr_p
virtual ConcatColumn * makeConcatColumn(ConcatTable *) const
Make a ConcatColumn object out of the description.
DataType dataType() const
Get the data type of the column.
void setMaxLength(uInt maxLength)
Set the maximum value length.
RefColumn * makeRefColumn(RefTable *rtp, BaseColumn *bcp) const
Create a RefColumn column object out of this column description.
uInt maxLength() const
Get the maximum value length.
DataType dataType() const
Get the data type of the column.
void handleRemove(ColumnDescSet &cds)
const TableDesc * tableDesc() const
Get table description (in case column contains subtables).
String: the storage and methods of handling collections of characters.
const String & dataManagerGroup() const
Get the data manager group.
Wrapper around a pthreads mutex.
bool Bool
Define the standard types used by Casacore.
void handleAdd(ColumnDescSet &cds)
Take action after a column has been handled by ColumnDescSet.
Base class for a column in a plain table.
int options() const
Get the options.
static void registerCtor(const String &name, ColumnDescCtor *func)
Register a "XXColumnDesc" constructor (thread-safe).
void setShape(const IPosition &shape, Bool directOption)
const String & dataTypeId() const
Get the type id for non-standard data types (i.e.
const TableRecord & keywordSet() const
const TableDesc * tableDesc() const
Get table description (in case column contains subtables).
void putFile(AipsIO &ios, const TableAttr &) const
Store the object in AipsIO.
friend AipsIO & operator>>(AipsIO &ios, ColumnDesc &cd)
Read from AipsIO.
Bool isFixedShape() const
Check if the column is defined with a fixed shape.
void setNdim(uInt ndim)
Set the number of dimensions.
const String & dataManagerGroup() const
Get the data manager group.
void renameAction(const String &newName, const String &oldName)
This function allows each column to act upon a rename of another column.
Set of table column descriptions.
ColumnDesc & operator=(const ColumnDesc &that)
Assignment (copy semantics).
Class for a table as a view of another table.
Envelope class for the description of a table column.
Some attributes of a table.
BaseColumnDesc * ColumnDescCtor(const String &className)
Define the type of a XXColumnDesc construction function.
virtual void handleRemove(ColumnDescSet &cds)
virtual void checkRename(const ColumnDescSet &cds, const String &newName) const
A column in a concatenated table.
Int ndim() const
Get the number of dimensions.