casa::MEpoch Class Reference
[Measures]

#include <MEpoch.h>

Inheritance diagram for casa::MEpoch:

Inheritance graph
[legend]
Collaboration diagram for casa::MEpoch:

Collaboration graph
[legend]
List of all members.

Detailed Description

A Measure: instant in time.

Intended use:

Part of API

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Test programs:
tMeasure

Prerequisite

Etymology

Measure and Epoch

Synopsis

MEpoch forms derived Measure class for an instant in time.

Example

Convert (with all steps explicit) a UTC to an IAT time.

        #include <measures/Measures.h>
        #include <measures/Measures/MEpoch.h>
        cout << "TAI for UTC = MJD(50237.29): " <<
                MEpoch::Convert(MEpoch(MVEpoch(Quantity(50237.29, "d")),
                                       MEpoch::Ref(MEpoch::UTC)),
                                MEpoch::Ref(MEpoch::TAI))() <<
                endl;
Results in:
        TAI for UTC = MJD(50237.29): Epoch: 50237::06:58:06.0000

Motivation

To Do

Definition at line 96 of file MEpoch.h.
virtual const StringtellMe () const
 Tell me your type.
virtual uInt type () const
 Get the type (== Register() of derived Measure (faster than Strings) All should have: static uInt myType();.
static const StringshowMe ()
static void assure (const Measure &in)
Bool giveMe (MEpoch::Ref &mr, const String &in)
static Bool getType (MEpoch::Types &tp, const String &in)
 Translate string to reference code.
virtual const String *const allTypes (Int &nall, Int &nextra, const uInt *&typ) const
 Get a list of all known reference codes.
static const String *const allMyTypes (Int &nall, Int &nextra, const uInt *&typ)
virtual void checkTypes () const
 Check if all internal tables of types (both enum and String) are complete and correct.
static void checkMyTypes ()

Public Types

enum  Types
 Types of known MEpochs Caution: The order defines the order in the translation matrix in the MCEpoch class. More...
typedef MVEpoch MVType
 Measure value container for this class (i.e.
typedef MCEpoch MCType
 Measure conversion routines for this class (i.e.
typedef MeasRef< MEpochRef
 Measure reference (i.e.
typedef MeasConvert< MEpochConvert
 Measure Convert (i.e.
typedef ROScalarMeasColumn<
MEpoch
ROScalarColumn
 Measure table Columns (e.g., MEpoch::ROScalarColumn).
typedef ScalarMeasColumn<
MEpoch
ScalarColumn
typedef ROArrayMeasColumn<
MEpoch
ROArrayColumn
typedef ArrayMeasColumn< MEpochArrayColumn

Public Member Functions

typedef WHATEVER_SUN_TYPEDEF (MEpoch) Types Types
 Reference enum Types (included originally for gcc 2.95).
 MEpoch ()
 Tip: In the following constructors and other functions, all MeasRef can be replaced with simple Measure::TYPE where no offsets or frames are needed in the reference.
virtual ~MEpoch ()
virtual Bool setOffset (const Measure &in)
 Set the offset in the reference (False if non-matching Measure).
virtual Bool setRefString (const String &in)
 Set the reference type to the specified String.
virtual const StringgetDefaultType () const
 Get the default reference type.
virtual String getRefString () const
 Get the reference type (for records, including codes like R_).
Quantity get (const Unit &inunit) const
 Get time in specified units.
virtual Measureclone () const
 Create copy.

Static Public Member Functions

static uInt myType ()
 Get my type (as Register).
static MEpoch::Types castType (uInt tp)
 Translate reference code.
static const StringshowType (MEpoch::Types tp)
static const StringshowType (uInt tp)

Friends

class MeasConvert< MEpoch >


Member Typedef Documentation

typedef MVEpoch casa::MEpoch::MVType

Measure value container for this class (i.e.

MEpoch::MVType)

Definition at line 144 of file MEpoch.h.

typedef MCEpoch casa::MEpoch::MCType

Measure conversion routines for this class (i.e.

MEpoch::MCType)

Definition at line 146 of file MEpoch.h.

typedef MeasRef<MEpoch> casa::MEpoch::Ref

Measure reference (i.e.

MEpoch::Ref)

Definition at line 148 of file MEpoch.h.

typedef MeasConvert<MEpoch> casa::MEpoch::Convert

Measure Convert (i.e.

MEpoch::Convert)

Reimplemented from casa::Measure.

Definition at line 150 of file MEpoch.h.

typedef ROScalarMeasColumn<MEpoch> casa::MEpoch::ROScalarColumn

Measure table Columns (e.g., MEpoch::ROScalarColumn).

Definition at line 152 of file MEpoch.h.

typedef ScalarMeasColumn<MEpoch> casa::MEpoch::ScalarColumn

Definition at line 153 of file MEpoch.h.

typedef ROArrayMeasColumn<MEpoch> casa::MEpoch::ROArrayColumn

Definition at line 154 of file MEpoch.h.

typedef ArrayMeasColumn<MEpoch> casa::MEpoch::ArrayColumn

Definition at line 155 of file MEpoch.h.


Member Enumeration Documentation

enum casa::MEpoch::Types

Types of known MEpochs Caution: The order defines the order in the translation matrix in the MCEpoch class.

Do not change the order without changing the array. Additions should be made before N_types, and an additional row and column should be coded in FromTo (MCEpoch), and in showType().

Reimplemented from casa::Measure.

Definition at line 109 of file MEpoch.h.


Constructor & Destructor Documentation

casa::MEpoch::MEpoch (  ) 

Tip: In the following constructors and other functions, all MeasRef can be replaced with simple Measure::TYPE where no offsets or frames are needed in the reference.

Default constructor; generates an instant at MJD 0 UTC

casa::MEpoch::MEpoch ( const MVEpoch dt  ) 

Create from data and reference.

casa::MEpoch::MEpoch ( const MVEpoch dt,
const MEpoch::Ref rf 
)

casa::MEpoch::MEpoch ( const MVEpoch dt,
MEpoch::Types  rf 
)

casa::MEpoch::MEpoch ( const Quantity dt  ) 

casa::MEpoch::MEpoch ( const Quantity dt,
const MEpoch::Ref rf 
)

casa::MEpoch::MEpoch ( const Quantity dt,
MEpoch::Types  rf 
)

casa::MEpoch::MEpoch ( const Measure dt  ) 

casa::MEpoch::MEpoch ( const MeasValue dt  ) 

virtual casa::MEpoch::~MEpoch (  )  [virtual]

casa::MEpoch::MEpoch ( const MVEpoch dt  ) 

Create from data and reference.

casa::MEpoch::MEpoch ( const MVEpoch dt,
const MEpoch::Ref rf 
)

casa::MEpoch::MEpoch ( const MVEpoch dt,
MEpoch::Types  rf 
)

casa::MEpoch::MEpoch ( const Quantity dt  ) 

casa::MEpoch::MEpoch ( const Quantity dt,
const MEpoch::Ref rf 
)

casa::MEpoch::MEpoch ( const Quantity dt,
MEpoch::Types  rf 
)

casa::MEpoch::MEpoch ( const Measure dt  ) 

casa::MEpoch::MEpoch ( const MeasValue dt  ) 


Member Function Documentation

typedef casa::MEpoch::WHATEVER_SUN_TYPEDEF ( MEpoch   ) 

Reference enum Types (included originally for gcc 2.95).

virtual const String& casa::MEpoch::tellMe (  )  const [virtual]

Tell me your type.

Implements casa::Measure.

static const String& casa::MEpoch::showMe (  )  [static]

virtual uInt casa::MEpoch::type (  )  const [virtual]

Get the type (== Register() of derived Measure (faster than Strings) All should have: static uInt myType();.

Implements casa::Measure.

static void casa::MEpoch::assure ( const Measure in  )  [static]

static MEpoch::Types casa::MEpoch::castType ( uInt  tp  )  [static]

Translate reference code.

The uInt version has a check for valid codes (i.e. it is a safe cast).

Thrown Exceptions

static const String& casa::MEpoch::showType ( MEpoch::Types  tp  )  [static]

static const String& casa::MEpoch::showType ( uInt  tp  )  [static]

static Bool casa::MEpoch::getType ( MEpoch::Types tp,
const String in 
) [static]

Translate string to reference code.

Bool casa::MEpoch::giveMe ( MEpoch::Ref mr,
const String in 
)

virtual Bool casa::MEpoch::setOffset ( const Measure in  )  [virtual]

Set the offset in the reference (False if non-matching Measure).

Implements casa::Measure.

virtual Bool casa::MEpoch::setRefString ( const String in  )  [virtual]

Set the reference type to the specified String.

False if illegal string, reference set to DEFAULT.

Implements casa::Measure.

virtual const String& casa::MEpoch::getDefaultType (  )  const [virtual]

Get the default reference type.

Implements casa::Measure.

virtual const String* const casa::MEpoch::allTypes ( Int nall,
Int nextra,
const uInt *&  typ 
) const [virtual]

Get a list of all known reference codes.

nall returns the number in list, nextra the number of specials (like planets) that should be at end of list). typ returns the list of corresponding types.

Reimplemented from casa::Measure.

static const String* const casa::MEpoch::allMyTypes ( Int nall,
Int nextra,
const uInt *&  typ 
) [static]

virtual void casa::MEpoch::checkTypes (  )  const [virtual]

Check if all internal tables of types (both enum and String) are complete and correct.

This function is called automatically if and when necessary.

Thrown Exceptions

Implements casa::Measure.

static void casa::MEpoch::checkMyTypes (  )  [static]

virtual String casa::MEpoch::getRefString (  )  const [virtual]

Get the reference type (for records, including codes like R_).

Implements casa::Measure.

static uInt casa::MEpoch::myType (  )  [static]

Get my type (as Register).

Quantity casa::MEpoch::get ( const Unit inunit  )  const

Get time in specified units.

Referenced by casa::SimSource::timeSec().

virtual Measure* casa::MEpoch::clone (  )  const [virtual]

Create copy.

Implements casa::Measure.


Friends And Related Function Documentation

friend class MeasConvert< MEpoch > [friend]

Definition at line 100 of file MEpoch.h.


The documentation for this class was generated from the following file:
Generated on Tue Aug 26 22:34:23 2008 for NRAOCASA by  doxygen 1.5.1