Go to the documentation of this file.
28 #ifndef MEASURES_TABLEMEASREFDESC_H
29 #define MEASURES_TABLEMEASREFDESC_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/measures/TableMeasures/TableMeasOffsetDesc.h>
34 #include <casacore/casa/Quanta/Unit.h>
35 #include <casacore/casa/Arrays/Vector.h>
36 #include <casacore/casa/BasicSL/String.h>
41 class TableMeasDescBase;
Define the structure of a Casacore table.
uInt fillMap(Block< Int > &f2t, const Vector< uInt > &codesf, const Vector< String > &typesf, Vector< uInt > &codest, Vector< String > &typest, Int maxnr)
A holder for Measures to enable record conversions.
Bool isOffsetArray() const
Returns True is the offset is variable and it is an ArrayMeasColumn.
Definition of a Measure Reference in a Table.
uInt getRefCode() const
Return the reference code.
Bool empty() const
Test for empty.
Physical quantities within reference frame.
A hierarchical collection of named fields of various types.
Bool isOffsetVariable() const
Returns True if the offset is variable.
const Measure & getOffset() const
Return the fixed Measure offset.
Bool itsHasRefTab
Do the keywords contain the reference codes and types?
void resetOffset(const Measure &offset)
Bool isRefCodeColumnInt() const
Is the reference code variable and stored in an integer column?
void checkColumn(const TableDesc &td)
Throw an exception if the column doesn't exist or is of the wrong type.
TableMeasRefDesc & operator=(const TableMeasRefDesc &that)
Assignment operator (copy semantics).
Definition of a Measure in a Table.
void fillTabRefMap(const MeasureHolder &measHolder)
uInt tab2cur(uInt tabRefCode) const
Reference codes can be persistent in tables.
String itsColumn
The name of column containing its variable references.
Bool isArray() const
Returns True if the offset varies per array element.
TableMeasOffsetDesc * itsOffset
static void defaultTypesFunc(Vector< String > &types, Vector< uInt > &codes, const MeasureHolder &)
Main interface class to a read/write table.
void write(TableDesc &, TableRecord &measInfo, const TableMeasDescBase &)
Make the Measure value descriptor persistent.
const String & offsetColumnName() const
Return the name of the Measure offset column.
void initTabRefMap()
Fill the reference code mappings for table<->current.
Bool isVariable() const
Returns True if the offset varies per row.
Bool itsRefCodeColInt
Is the reference code column a string column?
static TypesFunc * theirTypesFunc
void initTabRef(const MeasureHolder &measHolder)
Initialize the table reference codes and types and the maps (mapping a code onto itself).
void resetRefCode(uInt refCode)
Reset the refCode or offset.
const String & columnName() const
Gets the name of the column which stores the variable offset.
this file contains all the compiler specific defines
const Measure & getOffset() const
Get the (non-variable) measure offset for this column.
Bool isRefCodeVariable() const
Is the reference variable?
const String & columnName() const
Return the name of its variable reference code column.
Bool hasRefTab() const
Do the keywords contain the reference codes and types.
Vector< uInt > itsTabRefCodes
void writeKeys(TableRecord &measInfo, const TableMeasDescBase &measDesc)
Write the actual keywords.
uInt cur2tab(uInt curRefCode) const
Bool hasOffset() const
Returns True if the reference has an offset.
String: the storage and methods of handling collections of characters.
static void setTypesFunc(TypesFunc *func)
void TypesFunc(Vector< String > &types, Vector< uInt > &codes, const MeasureHolder &)
Set the function used to get all reference codes for a MeasureHolder.
bool Bool
Define the standard types used by Casacore.
Vector< String > itsTabRefTypes
Definition of a Measure Offset in a Table.
A 1-D Specialization of the Array class.
TableMeasRefDesc(uInt refCode=0)
Define a fixed MeasRef by supplying its reference code Optionally a Measure offset can be specified.