TableMeasDescBase.h
Classes
- TableMeasDescBase -- Definition of a Measure in a Table. (full description)
Interface
- Public Members
- TableMeasDescBase()
- TableMeasDescBase (const TableMeasValueDesc&, const TableMeasRefDesc&)
- TableMeasDescBase (const TableMeasDescBase& that)
- virtual ~TableMeasDescBase()
- virtual TableMeasDescBase* clone() const
- TableMeasDescBase& operator= (const TableMeasDescBase& that)
- void write (TableDesc&)
- void write (Table&)
- const String& columnName() const
- uInt getRefCode() const
- Bool isRefCodeVariable() const
- const String& refColumnName() const
- const TableMeasRefDesc& getRefDesc()
- const String& offsetColumnName() const
- Bool hasOffset() const
- Bool isOffsetVariable() const
- Bool isOffsetArray() const
- const Measure& getOffset() const
- const String& type() const
- uInt refCode (const String& refString) const
- const String& refType (uInt refCode) const
- const Vector<Unit>& getUnits() const
- void resetRefCode (uInt refCode)
- void resetOffset (const Measure& offset)
- void resetUnits (const Vector<Unit>& units)
- static TableMeasDescBase* reconstruct (const Table& tab, const String& columnName)
- static Bool hasMeasures (const ROTableColumn& column)
- Protected Members
- void setMeasUnits (const Measure& meas, const Vector<Quantum<Double> >& val, const Vector<Unit>& units)
Review Status
- Reviewed By:
- Bob Garwood
- Date Reviewed:
- 1999/12/23
- Programs:
- Tests:
Prerequisite
Synopsis
Abstract base class for TableMeasDesc.
Example
See class TableMeasDesc.
Motivation
Creating the required keyword for the definition of a Measure
in a Table is somewhat complicated. This class assists in that
process.
Thrown Exceptions
- AipsError during reconstruction if the column doesn't contain
a MEASINFO record.
- AipsError during reconstruction if the column has a MEASINFO
but it Measure type is invalid.
Member Description
Null constructor.
Constructor with value and reference descriptors.
Note that setMeasType is always called by the derived class.
Copy constructor.
virtual TableMeasDescBase* clone() const
Clone the object.
TableMeasDescBase& operator= (const TableMeasDescBase& that)
Assignment operator.
Makes the descriptor persistent.
Get the name of the underlying column.
Return the reference code.
Returns True if the reference varies per row.
Returns the name of the ref code column when the ref code is variable.
The null string is returned if the ref code is not variable.
Returns a reference to its measure reference descriptor.
Get the name of the offset column. Empty string is returned if no
offset.
Returns True if an offset has been defined.
Returns True if the offset is variable.
Returns True if the offset is variable and is stored in an
ArrayMeasColumn, i.e., offsets are stored per element.
Returns a reference to the offset.
Returns the descriptors measure type as a String.
uInt refCode (const String& refString) const
Returns the reference code for this object given a string. Throws
an exception if the refString is invalid for this object.
const String& refType (uInt refCode) const
Translates the refCode for the descriptors measure type.
Return the Units of the Measure values
Reset the refCode, offset, or units.
It overwrites the value used when defining the TableMeasDesc.
It is only possible if it was defined as fixed for the entire column.
static TableMeasDescBase* reconstruct (const Table& tab, const String& columnName)
Reconstructs the object for the given table and column name.
Does this column contain table measures?
Set the measure and possible units.