32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Utilities/DataType.h>
34 #include <casacore/tables/Tables/Table.h>
35 #include <casacore/casa/Utilities/CountedPtr.h>
36 #include <casacore/casa/BasicSL/String.h>
37 #include <casacore/tables/Tables/ColumnDesc.h>
45 template <
class T>
class Block;
150 typedef typename MSEnum::PredefinedColumns
ColEnum;
151 typedef typename MSEnum::PredefinedKeywords
KeyEnum;
308 const String& colMeasureType=
"");
315 const String& keyComment);
Option
Enumerate the possible column options.
A Table intended to hold astronomical data
static void addColumnToDesc(TableDesc &tabDesc, ColEnum which, Int ndim=-1, const String &refCol="")
add a column to a TableDesc An exception is thrown for an invalid data type.
MSEnum::PredefinedKeywords KeyEnum
static DataType columnDataType(ColEnum which)
return the data type for a given ColEnum
static const String & columnStandardComment(const MSTableMaps &maps, ColEnum which)
static KeyEnum keywordType(const String &name)
static const String & keywordStandardComment(KeyEnum which)
static void addColumnCompression(TableDesc &td, ColEnum which, Bool autoScale=True, const String &type=String())
Add the compress option for the given column to the TableDesc.
Bool isScalar(ColEnum which) const
Information about scalar vs array of a column.
static void addColumnToDesc(TableDesc &tabDesc, ColEnum which, const IPosition &shape, ColumnDesc::Option option, const String &refCol="")
add a column to a TableDesc, defining the shape and setting the ColumnDesc option (Fixed,...
static void keyMapDef(MSTableMaps &maps, KeyEnum key, const String &keyName, DataType keyType, const String &keyComment)
Define an entry in the keyword maps.
static const String & keywordStandardComment(const MSTableMaps &maps, KeyEnum which)
static const TableDesc & requiredTableDesc()
return the required table description
Bool validate() const
validate self (make sure that this MS is valid)
static const String & columnName(ColEnum which)
Convert a ColEnum to the actual column name.
static const String & keywordName(KeyEnum which)
KeyEnum convenience functions
Bool isKeyword(KeyEnum which) const
check to see if a keyword exists
static const String & keywordName(const MSTableMaps &maps, KeyEnum which)
static DataType keywordDataType(const MSTableMaps &maps, KeyEnum which)
static void addKeyToDesc(TableDesc &, KeyEnum key)
add a keyword to a TableDesc An exception is thrown for an invalid data type.
Bool isColumnWritable(ColEnum which) const
check to see if a column is writable
MSTable(const Table &table)
MSTable & operator=(const MSTable< MSEnum > &)
Assignment operator, reference semantics.
static ColEnum columnType(const String &name)
Convert a name to a ColEnum.
static void colMapDef(MSTableMaps &maps, ColEnum col, const String &colName, DataType colType, const String &colComment, const String &colUnit="", const String &colMeasureType="")
Define an entry in the column maps.
Bool isColumnWritable(const String &columnName) const
Bool isColumn(ColEnum which) const
ColEnum convenience functions
static void addColumnToDesc(MSTableMaps &, ColEnum which, Int ndim=-1, const String &refCol="")
Table referenceCopy(const String &newTableName, const Block< String > &writableColumns) const
Return a table that references all columns in this table except for those given in writableColumns,...
static const String & columnUnit(const MSTableMaps &maps, ColEnum which)
MSEnum::PredefinedColumns ColEnum
Define the column and keyword enuym types.
const String & unit(const String &which) const
Return the UNIT keyword value associated with the specified column.
static const String & columnStandardComment(ColEnum which)
return the standard comment for a given ColEnum
MSTable(const String &tableName, TableOption option)
static const String & columnMeasureType(const MSTableMaps &maps, ColEnum which)
static Bool validate(const TableRecord &tabKeySet)
check that the keyword set is valid
static const String & columnName(const MSTableMaps &maps, ColEnum which)
Convert a ColEnum to the actual column name.
Bool isColumnWritable(uInt columnIndex) const
static void addColumnToDesc(MSTableMaps &, ColEnum which, const IPosition &shape, ColumnDesc::Option option, const String &refCol="")
add a column to a TableDesc, defining the shape and setting the ColumnDesc option (Fixed,...
static Bool validate(const TableDesc &tabDesc)
tableDesc convenience functions
Bool isArray(ColEnum which) const
const String & unit(ColEnum which) const
static const String & columnUnit(ColEnum which)
return the UNIT string for a given ColEnum
static void addKeyToDesc(MSTableMaps &, KeyEnum key)
MSTable()
These constructors mirror the Table ones
static MSTableMaps & getMaps()
Get the static struct containing all column and keyword mappings.
static DataType columnDataType(const MSTableMaps &maps, ColEnum which)
static const String & columnMeasureType(ColEnum which)
return the MEASURE_TYPE string for a given ColEnum
static DataType keywordDataType(KeyEnum which)
Create a new table - define shapes, data managers, etc.
String: the storage and methods of handling collections of characters.
const TableLock & lockOptions() const
Get the locking options.
Bool isNull() const
Test if the object is null, i.e.
Bool isColumnWritable(const String &columnName) const
Test if the given column is writable.
const TableDesc & tableDesc() const
Get the table description.
const String & tableName() const
Get the table name.
TableOption
Define the possible options how a table can be opened.
TableExprNode key(const String &keywordName) const
Create a TableExprNode object for a column or for a keyword in the table keyword set.
TableExprNode col(const String &columnName) const
this file contains all the compiler specific defines
LatticeExprNode ndim(const LatticeExprNode &expr)
1-argument function to get the dimensionality of a lattice.
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape.
bool Bool
Define the standard types used by Casacore.
uInt64 rownr_t
Define the type of a row number in a table.
Int keywordType(const String &name) const
TableDesc requiredTD_p
The required TableDesc.
std::map< Int, String > keyCommentMap_p
KeyEnum -> comment string.
std::map< Int, Int > keyDTypeMap_p
KeyEnum -> DataType.
std::map< Int, Int > colDTypeMap_p
ColEnum -> DataType.
std::map< Int, String > keywordMap_p
KeyEnum -> name.
std::map< Int, String > colMeasureTypeMap_p
ColEnum -> MEASURE_TYPE string.
std::map< Int, String > colCommentMap_p
ColEnum -> comment string.
std::map< Int, String > colUnitMap_p
ColEnum -> UNIT string.
Int mapType(const std::map< Int, String > &, const String &name) const
Int columnType(const String &name) const
Convert a name to a ColEnum or KeyEnum.
std::map< Int, String > columnMap_p
ColEnum -> name.