26#ifndef TABLES_COLUMNDESC_H
27#define TABLES_COLUMNDESC_H
31#include <casacore/casa/aips.h>
32#include <casacore/tables/Tables/BaseColDesc.h>
33#include <casacore/casa/BasicSL/String.h>
34#include <casacore/casa/Arrays/IPosition.h>
void setMaxLength(uInt maxLength)
Set the maximum value length.
void setNdim(uInt ndim)
Set the number of dimensions.
virtual void checkAdd(const ColumnDescSet &cds) const
Check if a column can be handled by ColumnDescSet.
const String & dataManagerGroup() const
Get the data manager group.
const TableRecord & keywordSet() const
virtual void handleRemove(ColumnDescSet &cds)
virtual void handleRename(ColumnDescSet &cds, const String &oldName)
const IPosition & shape() const
Get the predefined shape.
void setDefaultDataManager(Bool always)
Set the data manager type and group to the default.
Int options() const
Get the options.
TableRecord & rwKeywordSet()
Get access to the set of keywords.
const String & comment() const
Get comment string.
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 PlainColumn * makeColumn(ColumnSet *) const =0
Make a PlainColumn object out of the description.
virtual void checkRename(const ColumnDescSet &cds, const String &newName) const
const String & dataTypeId() const
Get the type id for non-standard data types (i.e.
void setOptions(Int options)
Set the options to the given value.
virtual ConcatColumn * makeConcatColumn(ConcatTable *) const
Make a ConcatColumn object out of the description.
RefColumn * makeRefColumn(RefTable *, BaseColumn *) const
Make a RefColumn object out of the description.
void setShape(const IPosition &shape)
Set the predefined shape.
Int ndim() const
Get the number of dimensions.
const TableDesc * tableDesc() const
Get table description (in case column contains subtables).
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.
const String & dataManagerType() const
Get the type name of the default data manager.
String & comment()
Get comment string (allowing it to be changed).
RefColumn * makeRefColumn(RefTable *rtp, BaseColumn *bcp) const
Create a RefColumn column object out of this column description.
void setName(const String &name)
Set the name of the column.
const String & name() const
Get 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.
static std::map< String, ColumnDescCtor * > & getRegisterMap()
Define a map which maps the name of the various XXColumnDesc classes to a static function constructin...
friend AipsIO & operator<<(AipsIO &ios, const ColumnDesc &cd)
Write into AipsIO.
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 IPosition & shape() const
Get the predefined shape.
void checkRename(const ColumnDescSet &cds, const String &newName) const
Check when a column gets renamed in a table description.
void setShape(const IPosition &shape)
Set the predefined shape.
static void registerCtor(const String &name, ColumnDescCtor *func)
Register a "XXColumnDesc" constructor (thread-safe).
BaseColumnDesc * colPtr_p
const String & dataManagerType() const
Get the type name of the default data manager.
void handleRemove(ColumnDescSet &cds)
static std::map< String, ColumnDescCtor * > initRegisterMap()
Register the main data managers.
void getFile(AipsIO &, const TableAttr &)
Get the object from AipsIO.
Bool operator!=(const ColumnDesc &) const
const String & comment() const
Get comment string.
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.
ColumnDesc & operator=(const ColumnDesc &that)
Assignment (copy semantics).
void setNdim(uInt ndim)
Set the number of dimensions.
void handleAdd(ColumnDescSet &cds)
Take action after a column has been handled by ColumnDescSet.
String & dataManagerGroup()
Get the data manager group.
PlainColumn * makeColumn(ColumnSet *csp) const
Create a PlainColumn column object out of this column description.
Option
Enumerate the possible column options.
@ Direct
direct table or array
@ FixedShape
fixed array/table shape
@ Undefined
undefined values are possible
const TableRecord & keywordSet() const
void setMaxLength(uInt maxLength)
Set the maximum value length.
TableRecord & rwKeywordSet()
Get access to the set of keywords.
void handleRename(ColumnDescSet &cds, const String &oldName)
BaseColumnDesc * ColumnDescCtor(const String &className)
Define the type of a XXColumnDesc construction function.
ConcatColumn * makeConcatColumn(ConcatTable *rtp) const
Create a ConcatColumn column object out of this column description.
static ColumnDescCtor * getCtor(const String &name)
Get a construction function for a XXColumnDesc object (thread-safe).
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.
static std::mutex theirMutex
A mutex for additions to the constructor map.
const String & dataTypeId() const
Get the type id for non-standard data types (i.e.
uInt maxLength() const
Get the maximum value length.
Int ndim() const
Get the number of dimensions.
Bool isTable() const
Test if column is a table.
friend AipsIO & operator>>(AipsIO &ios, ColumnDesc &cd)
Read from AipsIO.
Bool isScalar() const
Test if column is a scalar.
void show(ostream &os) const
Show the column.
const TableDesc * tableDesc() const
Get table description (in case column contains subtables).
const String & dataManagerGroup() const
Get the data manager group.
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.