TableMeasType.h

Classes

TableMeasType -- Definition of a Measure column in a Table. (full description)

class TableMeasType

Interface

Public Members
TableMeasType()
explicit TableMeasType (const Measure&)
TableMeasType (const TableMeasType& that)
~TableMeasType()
TableMeasType& operator= (const TableMeasType& that)
const String& type() const
const String& refType (uInt refCode) const
uInt refCode (const String& refString) const
void toRecord (RecordInterface& rec)

Description

Review Status

Reviewed By:
Bob Garwood
Date Reviewed:
1999/12/23
Programs:
Tests:

Prerequisite

Synopsis

This class is a helper class for TableMeasDescBase to know the type of measure it is dealing with.
It eases the process of converting reference codes to their strings and vice-versa. It also writes the measure type to a record to assist in making table measure definitions persistent.

Example

Create the object for an epoch measure. TableMeasType mtype (MEpoch()); // Get the code for the given string. uInt code = mtype.refCode ("UTC");

Motivation

Creating the required keyword for the definition of a Measure in a Table is somewhat complicated. This class assists in that process.

Member Description

TableMeasType()

explicit TableMeasType (const Measure&)

Construct from the given type of measure.

TableMeasType (const TableMeasType& that)

Copy constructor (copy semantics).

~TableMeasType()

TableMeasType& operator= (const TableMeasType& that)

Assignment operator (copy semantics)

const String& type() const

Returns the descriptor's measure type as a String.

const String& refType (uInt refCode) const

Translates the refCode for the descriptors measure type.

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.

void toRecord (RecordInterface& rec)

Creates a record from the MeasureHolder.