casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Friends
casa::MRBase Class Reference

Base for Reference frame for physical measures. More...

#include <MRBase.h>

Inheritance diagram for casa::MRBase:
casa::MeasRef< Ms > casa::MeasRef< MBaseline > casa::MeasRef< MDirection > casa::MeasRef< MDoppler > casa::MeasRef< MEarthMagnetic > casa::MeasRef< MEpoch > casa::MeasRef< MFrequency > casa::MeasRef< MPosition > casa::MeasRef< MRadialVelocity > casa::MeasRef< Muvw >

List of all members.

Public Member Functions

virtual ~MRBase ()
virtual Bool empty () const =0
 Check if empty reference.
virtual uInt getType () const =0
 Check the type of Measure the reference can be used for:
static const String &showMe() = 0; .
virtual MeasFramegetFrame ()=0
 Return the frame of the reference.
virtual const Measureoffset () const =0
 Return the first frame which has specified information.
virtual void setType (uInt tp)=0
 Set the type.
virtual void set (uInt tp)=0
virtual void set (const MeasFrame &mf)=0
 Set a new offset:
void set(const Measure &ep); Set a new frame.
virtual void print (ostream &os) const =0
 Print a Measure.

Friends

ostream & operator<< (ostream &os, const MRBase &meas)

Detailed Description

Base for Reference frame for physical measures.

Intended use:

Internal

 <h3>Review Status</h3><dl><dt>Reviewed By:<dd>UNKNOWN<dt>Date Reviewed:<dd>before2004/08/25<dt>Test programs:<dd>tMeasure</dl> 

Prerequisite

Etymology

From Measure and Reference and Base

Synopsis

MRBase is the abstract base class for reference frames. Reference frames are specified (see Measure ) as Measure::Ref (e.g. MEpoch::Ref).

A Measure::Ref is a container for type indicators, (e.g. MDirection::J2000), an optional offset (e.g. beginning of year), and, if necessary, a MeasFrame .
A MeasFrame consists of one or more Measures specifying the reference frame (e.g. an MPosition for a sidereal time definition). A time ( MEpoch ) could e.g. have a type MEpoch::TAI, and an MEpoch as offset:

    MEpoch off(Quantity(40745,"d"), MEpoch::Ref(MEpoch::UTC));
    MEpoch::Ref myref(MEpoch::TAI, off);

It is obvious that a circular reference between Measure and Measure::Ref is possible. Therefore, each Measure has a default reference (necessary anyway to be able to start a Measure chain). For MEpoch the default is e.g. an MJD in UTC; and the default Measure for an MEpoch reference is 0.
References are copied by reference; i.e. a reference can be used in many places without overhead.
Some Measure::Ref could need additional conversion information ( example: type of Nutation calculations). They are provided by Aipsrc keywords.
All constructors are related to a specific Measure, to be able to check relations at compile time.

Example

See Measure for an example

Motivation

To gather all reference frame information in the one class.

Definition at line 103 of file MRBase.h.


Constructor & Destructor Documentation

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

Member Function Documentation

virtual Bool casa::MRBase::empty ( ) const [pure virtual]
virtual MeasFrame& casa::MRBase::getFrame ( ) [pure virtual]
virtual uInt casa::MRBase::getType ( ) const [pure virtual]

Check the type of Measure the reference can be used for:
static const String &showMe() = 0; .


Return the type of the reference
Caution: the following should really be (and should be interpreted as), but compiler does not accept it:
Ms::Types getType();

Implemented in casa::MeasRef< Ms >, casa::MeasRef< MRadialVelocity >, casa::MeasRef< MBaseline >, casa::MeasRef< MDirection >, casa::MeasRef< MPosition >, casa::MeasRef< MFrequency >, casa::MeasRef< Muvw >, casa::MeasRef< MEarthMagnetic >, casa::MeasRef< MDoppler >, casa::MeasRef< MEpoch >, and casa::MeasRef< M >.

virtual const Measure* casa::MRBase::offset ( ) const [pure virtual]

Return the first frame which has specified information.

Checking is done in argument order.

Thrown Exceptions

  • AipsError if neither reference has a frame or the proper type
       static const MeasFrame &framePosition(const MRBase &ref1,
                                                const MRBase &ref2) = 0;
       static const MeasFrame &frameEpoch(const MRBase &ref1,
                                         const MRBase &ref2) = 0;
       static const MeasFrame &frameDirection(const MRBase &ref1,
                                             const MRBase &ref2) = 0;
       static const MeasFrame &frameRadialVelocity(const MRBase &ref1,
                                                  const MRBase &ref2) = 0;

Return the offset (or 0)

Implemented in casa::MeasRef< Ms >, casa::MeasRef< MRadialVelocity >, casa::MeasRef< MBaseline >, casa::MeasRef< MDirection >, casa::MeasRef< MPosition >, casa::MeasRef< MFrequency >, casa::MeasRef< Muvw >, casa::MeasRef< MEarthMagnetic >, casa::MeasRef< MDoppler >, casa::MeasRef< MEpoch >, and casa::MeasRef< M >.

virtual void casa::MRBase::print ( ostream &  os) const [pure virtual]
virtual void casa::MRBase::set ( uInt  tp) [pure virtual]
virtual void casa::MRBase::set ( const MeasFrame mf) [pure virtual]
virtual void casa::MRBase::setType ( uInt  tp) [pure virtual]

Set the type.

Thrown Exceptions


Caution: the following should really be (and should be called as), but compiler does not accept it:
void set(Ms::Types tp);

Implemented in casa::MeasRef< Ms >, casa::MeasRef< MRadialVelocity >, casa::MeasRef< MBaseline >, casa::MeasRef< MDirection >, casa::MeasRef< MPosition >, casa::MeasRef< MFrequency >, casa::MeasRef< Muvw >, casa::MeasRef< MEarthMagnetic >, casa::MeasRef< MDoppler >, casa::MeasRef< MEpoch >, and casa::MeasRef< M >.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const MRBase meas 
) [friend]

The documentation for this class was generated from the following file: