26#ifndef MEASURES_TABLEMEASREFDESC_H
27#define MEASURES_TABLEMEASREFDESC_H
30#include <casacore/casa/aips.h>
31#include <casacore/measures/TableMeasures/TableMeasOffsetDesc.h>
32#include <casacore/casa/Quanta/Unit.h>
33#include <casacore/casa/Arrays/Vector.h>
34#include <casacore/casa/BasicSL/String.h>
String: the storage and methods of handling collections of characters.
String itsColumn
The name of column containing its variable references.
TableMeasRefDesc(const TableDesc &, const String &column)
Define a variable reference by supplying the name of the column in which the reference is to be store...
TableMeasRefDesc(const TableDesc &, const String &column, const TableMeasOffsetDesc &)
Bool isRefCodeVariable() const
Is the reference variable?
Bool hasRefTab() const
Do the keywords contain the reference codes and types.
TableMeasRefDesc & operator=(const TableMeasRefDesc &that)
Assignment operator (copy semantics).
const Measure & getOffset() const
Return the fixed Measure offset.
void write(TableDesc &, TableRecord &measInfo, const TableMeasDescBase &)
Make the Measure value descriptor persistent.
uInt getRefCode() const
Return the reference code.
void fillTabRefMap(const MeasureHolder &measHolder)
Bool isOffsetArray() const
Returns True is the offset is variable and it is an ArrayMeasColumn.
static void defaultTypesFunc(Vector< String > &types, Vector< uInt > &codes, const MeasureHolder &)
void initTabRef(const MeasureHolder &measHolder)
Initialize the table reference codes and types and the maps (mapping a code onto itself).
uInt cur2tab(uInt curRefCode) const
const String & columnName() const
Return the name of its variable reference code column.
Bool itsHasRefTab
Do the keywords contain the reference codes and types?
void write(Table &, TableRecord &measInfo, const TableMeasDescBase &)
Bool isOffsetVariable() const
Returns True if the offset is variable.
TableMeasRefDesc(uInt refCode=0)
Define a fixed MeasRef by supplying its reference code Optionally a Measure offset can be specified.
void checkColumn(const TableDesc &td)
Throw an exception if the column doesn't exist or is of the wrong type.
TableMeasRefDesc(const TableMeasRefDesc &that)
Copy constructor (copy semantics).
TableMeasOffsetDesc * itsOffset
const String & offsetColumnName() const
Return the name of the Measure offset column.
void writeKeys(TableRecord &measInfo, const TableMeasDescBase &measDesc)
Write the actual keywords.
void initTabRefMap()
Fill the reference code mappings for table<->current.
TableMeasRefDesc(uInt refCode, const TableMeasOffsetDesc &)
TableMeasRefDesc(const TableRecord &measInfo, const Table &, const MeasureHolder &measHolder, const TableMeasDescBase &)
Reconstruct the object from the MEASINFO record.
Vector< uInt > itsTabRefCodes
Bool hasOffset() const
Returns True if the reference has an offset.
void resetRefCode(uInt refCode)
Reset the refCode or offset.
uInt fillMap(Block< Int > &f2t, const Vector< uInt > &codesf, const Vector< String > &typesf, Vector< uInt > &codest, Vector< String > &typest, Int maxnr)
Vector< String > itsTabRefTypes
static void setTypesFunc(TypesFunc *func)
static TypesFunc * theirTypesFunc
uInt tab2cur(uInt tabRefCode) const
Reference codes can be persistent in tables.
void resetOffset(const Measure &offset)
Bool isRefCodeColumnInt() const
Is the reference code variable and stored in an integer column?
Bool itsRefCodeColInt
Is the reference code column a string column?
void TypesFunc(Vector< String > &types, Vector< uInt > &codes, const MeasureHolder &)
Set the function used to get all reference codes for a MeasureHolder.
this file contains all the compiler specific defines
int offset(int, int) const
compute a linear offset from array indicies
bool Bool
Define the standard types used by Casacore.