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>
const String & dataManagerGroup() const
Get the data manager group.
const String & dataManagerType() const
Get the type name of the default data manager.
RefColumn * makeRefColumn(RefTable *, BaseColumn *) const
Make a RefColumn object out of the description.
void setMaxLength(uInt maxLength)
Set the maximum value length.
void setNdim(uInt ndim)
Set the number of dimensions.
const String & comment() const
Get comment string.
virtual void checkAdd(const ColumnDescSet &cds) const
Check if a column can be handled by ColumnDescSet.
virtual void handleRemove(ColumnDescSet &cds)
virtual void handleRename(ColumnDescSet &cds, const String &oldName)
virtual PlainColumn * makeColumn(ColumnSet *) const =0
Make a PlainColumn object out of the description.
const String & dataTypeId() const
Get the type id for non-standard data types (i.e.
void setDefaultDataManager(Bool always)
Set the data manager type and group to the default.
Int options() const
Get the options.
uInt maxLength() const
Get the maximum value length.
Bool isScalar() const
Test if column is scalar, array or table.
virtual void handleAdd(ColumnDescSet &cds)
Take action after a column has been handled by ColumnDescSet.
void setName(const String &name)
Set the name of the column (for a rename).
virtual void checkRename(const ColumnDescSet &cds, const String &newName) const
virtual ConcatColumn * makeConcatColumn(ConcatTable *) const
Make a ConcatColumn object out of the description.
const IPosition & shape() const
Get the predefined shape.
void setOptions(Int options)
Set the options to the given value.
void setShape(const IPosition &shape)
Set the predefined shape.
Int ndim() const
Get the number of dimensions.
virtual void renameAction(const String &newName, const String &oldName)
This function allows each column to act upon a rename of another column.
DataType dataType() const
Get the data type of the column.
TableRecord & rwKeywordSet()
Get access to the set of keywords.
const TableRecord & keywordSet() const
const TableDesc * tableDesc() const
Get table description (in case column contains subtables).
const String & dataTypeId() const
Get the type id for non-standard data types (i.e.
static ColumnDescCtor * getCtor(const String &name)
Get a construction function for a XXColumnDesc object (thread-safe).
void setName(const String &name)
Set the name of the column.
DataType trueDataType() const
Get the true data type of the column.
DataType dataType() const
Get the data type of the column.
Bool operator==(const ColumnDesc &) const
Comparison.
Bool isFixedShape() const
Check if the column is defined with a fixed shape.
ColumnDesc()
Default constructor (needed for ColumnDescSet).
const TableRecord & keywordSet() const
void checkRename(const ColumnDescSet &cds, const String &newName) const
Check when a column gets renamed in a table description.
friend AipsIO & operator<<(AipsIO &ios, const ColumnDesc &cd)
Write into AipsIO.
void setShape(const IPosition &shape)
Set the predefined shape.
static void registerCtor(const String &name, ColumnDescCtor *func)
Register a "XXColumnDesc" constructor (thread-safe).
const IPosition & shape() const
Get the predefined shape.
String & comment()
Get comment string (allowing it to be changed).
BaseColumnDesc * colPtr_p
ConcatColumn * makeConcatColumn(ConcatTable *rtp) const
Create a ConcatColumn column object out of this column description.
void handleRemove(ColumnDescSet &cds)
TableRecord & rwKeywordSet()
Get access to the set of keywords.
void getFile(AipsIO &, const TableAttr &)
Get the object from AipsIO.
Bool operator!=(const ColumnDesc &) const
const String & dataManagerType() const
Get the type name of the default data manager.
ColumnDesc(const BaseColumnDesc &)
Construct from a column description.
ColumnDesc(BaseColumnDesc *)
Construct from a pointer (for class BaseColumn).
void setShape(const IPosition &shape, Bool directOption)
void setOptions(int options)
Set the options to the given value.
String & dataManagerType()
Get the type name of the default data manager (allowing it to be changed).
void setDefaultDataManager(Bool always=True)
If always==True they are always set, otherwise only if empty.
void show() const
Show the column on cout.
const TableDesc * tableDesc() const
Get table description (in case column contains subtables).
void setNdim(uInt ndim)
Set the number of dimensions.
void handleAdd(ColumnDescSet &cds)
Take action after a column has been handled by ColumnDescSet.
static std::map< String, ColumnDescCtor * > & getRegisterMap()
Define a map which maps the name of the various XXColumnDesc classes to a static function constructin...
BaseColumnDesc * ColumnDescCtor(const String &className)
Define the type of a XXColumnDesc construction function.
Option
Enumerate the possible column options.
@ Direct
direct table or array
@ FixedShape
fixed array/table shape
@ Undefined
undefined values are possible
const String & dataManagerGroup() const
Get the data manager group.
void setMaxLength(uInt maxLength)
Set the maximum value length.
void handleRename(ColumnDescSet &cds, const String &oldName)
int options() const
Get the options.
void renameAction(const String &newName, const String &oldName)
This function allows each column to act upon a rename of another column.
void putFile(AipsIO &ios, const TableAttr &) const
Store the object in AipsIO.
ColumnDesc(const ColumnDesc &that)
Copy constructor (copy semantics).
void checkAdd(const ColumnDescSet &cds) const
Check if a column can be handled by ColumnDescSet.
Bool isArray() const
Test if column is an array.
const String & comment() const
Get comment string.
ColumnDesc & operator=(const ColumnDesc &that)
Assignment (copy semantics).
friend AipsIO & operator>>(AipsIO &ios, ColumnDesc &cd)
Read from AipsIO.
PlainColumn * makeColumn(ColumnSet *csp) const
Create a PlainColumn column object out of this column description.
static std::mutex theirMutex
A mutex for additions to the constructor map.
uInt maxLength() const
Get the maximum value length.
static std::map< String, ColumnDescCtor * > initRegisterMap()
Register the main data managers.
Int ndim() const
Get the number of dimensions.
String & dataManagerGroup()
Get the data manager group.
const String & name() const
Get the name of the column.
Bool isTable() const
Test if column is a table.
Bool isScalar() const
Test if column is a scalar.
RefColumn * makeRefColumn(RefTable *rtp, BaseColumn *bcp) const
Create a RefColumn column object out of this column description.
void show(ostream &os) const
Show the column.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.