The standard way of accessing table columns is through Strings. Mistakes in typing the column name will not be caught at compile time (and may not be caught at run time). We have therefore decided to use an enumeration to specify columns so that many mistakes will be caught at compile time. This requires functions to map to and from this enumeration to the strings that are ultimately used.
Upon destruction, the table is checked to see that all required columns and keywords are still present. If not an exception is thrown. Nevertheless, the table will be flushed to disk if it is writable - preserving its state.
check to see if a column exists
check to see if a column is writable
Information about scalar vs array of a column
Return the UNIT keyword value associated with the specified column
Convert a name to a ColEnum
return the data type for a given ColEnum
return the standard comment for a given ColEnum
return the UNIT string for a given ColEnum
return the MEASURE_TYPE string for a given ColEnum
add a column to a TableDesc An exception is thrown for an invalid data type. This indicates a programming error in this class when this occurs. For Array columns you can optionally define the dimension here. For Measure columns you can define a variable reference column.
add a column to a TableDesc, defining the shape and setting the ColumnDesc option (Fixed, Undefined, Direct) For Measure columns you can define a variable reference column.
KeyEnum convenience functions
check to see if a keyword exists
KeyEnum convenience functions
add a keyword to a TableDesc An exception is thrown for an invalid data type. This indicates a missing data type in the code..
KeyEnum convenience functions
tableDesc convenience functions
check that the keyword set is valid
tableDesc convenience functions
validate self (make sure that this MS is valid)
tableDesc convenience functions
return the required table description
tableDesc convenience functions
Add the compress option for the given column to the TableDesc. It can only be used for a Float or a Complex column. For complex columns the type determines which CompressComplex engine is used. "SD" means that CompressComplexSD is used; otherwise CompressComplex is used.
tableDesc convenience functions
Assignment operator, reference semantics
Define an entry in the column maps
Define an entry in the keyword maps
Return a table that references all columns in this table except for
those given in writableColumns, those are empty and writable.
MSTable ()
These constructors mirror the Table ones
MSTable (const String &tableName, TableOption option)
MSTable (const String &tableName, const TableLock& lockOptions, TableOption option)
MSTable (const String &tableName, const String &tableDescName, TableOption option)
MSTable (const String &tableName, const String &tableDescName, const TableLock& lockOptions, TableOption option)
MSTable (SetupNewTable &newTab, uInt nrrow, Bool initialize)
MSTable (SetupNewTable &newTab, const TableLock& lockOptions, uInt nrrow, Bool initialize)
MSTable (const Table &table)
MSTable (const MSTable<ColEnum,KeyEnum> &other)
~MSTable()
MSTable& operator=(const MSTable<ColEnum,KeyEnum>&)
static void colMapDef(ColEnum col, const String& colName, DataType colType, const String& colComment, const String& colUnit="", const String& colMeasureType="")
static void keyMapDef(KeyEnum key, const String& keyName, DataType keyType, const String& keyComment)
Table referenceCopy(const String& newTableName, const Block<String>& writableColumns) const