26#ifndef MEASURES_TABLEMEASDESCBASE_H
27#define MEASURES_TABLEMEASDESCBASE_H
30#include <casacore/casa/aips.h>
31#include <casacore/measures/TableMeasures/TableMeasValueDesc.h>
32#include <casacore/measures/TableMeasures/TableMeasRefDesc.h>
33#include <casacore/measures/TableMeasures/TableMeasType.h>
34#include <casacore/casa/Quanta/Unit.h>
35#include <casacore/casa/Arrays/Vector.h>
128 {
return itsRef.getRefCode(); }
132 {
return itsRef.isRefCodeVariable(); }
137 {
return itsRef.columnName(); }
146 {
return itsRef.offsetColumnName(); }
150 {
return itsRef.hasOffset(); }
154 {
return itsRef.isOffsetVariable(); }
159 {
return itsRef.isOffsetArray(); }
163 {
return itsRef.getOffset(); }
String: the storage and methods of handling collections of characters.
static TableMeasDescBase * reconstruct(const Table &tab, const String &columnName)
Reconstructs the object for the given table and column name.
const String & refType(uInt refCode) const
Translates the refCode for the descriptors measure type.
static Bool hasMeasures(const TableColumn &column)
Does this column contain table measures?
TableMeasDescBase(const TableMeasValueDesc &, const TableMeasRefDesc &)
Constructor with value and reference descriptors.
const String & offsetColumnName() const
Get the name of the offset column.
void initTabRef(const MeasureHolder &measHolder)
Set the initial reference codes and types in the table.
void resetOffset(const Measure &offset)
void setMeasUnits(const Measure &meas, const Vector< Quantum< Double > > &val, const Vector< Unit > &units)
Set the measure and possible units.
Bool isOffsetVariable() const
Returns True if the offset is variable.
virtual TableMeasDescBase * clone() const
Clone the object.
TableMeasType itsMeasType
const Vector< Unit > & getUnits() const
Return the Units of the Measure values.
const String & refColumnName() const
Returns the name of the ref code column when the ref code is variable.
const Measure & getOffset() const
Returns a reference to the offset.
TableMeasDescBase()
Null constructor.
const TableMeasRefDesc & getRefDesc() const
Returns a reference to its measure reference descriptor.
Bool hasOffset() const
Returns True if an offset has been defined.
void write(TableDesc &)
Makes the descriptor persistent.
void resetRefCode(uInt refCode)
Reset the refCode, offset, or units.
const String & columnName() const
Get the name of the underlying column.
TableMeasDescBase(const TableMeasDescBase &that)
Copy constructor.
Bool isRefCodeVariable() const
Returns True if the reference varies per row.
TableMeasDescBase & operator=(const TableMeasDescBase &that)
Assignment operator.
TableMeasValueDesc itsValue
Bool isOffsetArray() const
Returns True if the offset is variable and is stored in an ArrayMeasColumn, i.e., offsets are stored ...
const String & type() const
Returns the descriptors measure type as a String.
uInt refCode(const String &refString) const
Returns the reference code for this object given a string.
virtual ~TableMeasDescBase()
void writeIfOld(const Table &)
Make the descriptor persistent if there was no refcode vector.
uInt getRefCode() const
Return the reference code.
void resetUnits(const Vector< Unit > &units)
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.