casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
casa::MeasRef< Ms > Class Template Reference

Reference frame for physical measures. More...

#include <MeasRef.h>

Inheritance diagram for casa::MeasRef< Ms >:
casa::MRBase

List of all members.

Classes

class  RefRep
 Representation class. More...

Public Member Functions

 MeasRef ()
 Construct an empty MeasRef.
 MeasRef (const MeasRef< Ms > &other)
 Copy constructor.
MeasRefoperator= (const MeasRef< Ms > &other)
 Copy assignment.
 MeasRef (const uInt tp)
 Construct a reference with specified type, offset and Frame.
 MeasRef (const uInt tp, const Ms &ep)
 MeasRef (const uInt tp, const MeasFrame &mf)
 MeasRef (const uInt tp, const MeasFrame &mf, const Ms &ep)
 ~MeasRef ()
 
    

Bool operator== (const MeasRef< Ms > &other) const
 Check if same MeasRef.
Bool operator!= (const MeasRef< Ms > &other) const
 Check if unequal MeasRef.
virtual Bool empty () const
 Check if empty reference.
virtual uInt getType () const
 Return the type of the reference
Caution: the following should really be (and should be interpreted as), but cannot create a virtual function:
Ms::Types getType();
virtual MeasFramegetFrame ()
 Return the frame of reference.
virtual const Measureoffset () const
 Return the offset (or 0)
virtual void setType (uInt tp)
 Set the type.
virtual void set (uInt tp)
void set (const Ms &ep)
 Set a new offset.
void set (const Measure &ep)
 Set a new offset (for internal use only)
virtual void set (const MeasFrame &mf)
 Set a new frame.
virtual void print (ostream &os) const
 Print a Measure.

Static Public Member Functions

static const StringshowMe ()
 Check the type of Measure the reference can be used for.
static const MeasFrameframePosition (MRBase &ref1, MRBase &ref2)
 Return the first frame which has specified information.
static const MeasFrameframeEpoch (MRBase &ref1, MRBase &ref2)
static const MeasFrameframeDirection (MRBase &ref1, MRBase &ref2)
static const MeasFrameframeRadialVelocity (MRBase &ref1, MRBase &ref2)
static const MeasFrameframeComet (MRBase &ref1, MRBase &ref2)

Private Member Functions

void create ()
 Create an instance of MeasRef.
MeasRef copy ()
 Copy an instance.

Private Attributes

CountedPtr< RefReprep_p

Detailed Description

template<class Ms>
class casa::MeasRef< Ms >

Reference frame for physical measures.

Intended use:

Public interface

 <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 frame

Synopsis

MeasRef specifies the reference frame for a physical quantity specified by one of the derived Measure classes (e.g. MEpoch ). It is derived from MRBase , which describes the class.

MeasRef containres are created using the Measure::Ref class (e.g. MDirection::Ref).

Example

See Measure for an example

Motivation

To gather all reference frame information in the one class.

Definition at line 82 of file MeasRef.h.


Constructor & Destructor Documentation

template<class Ms>
casa::MeasRef< Ms >::MeasRef ( )

Construct an empty MeasRef.

I.e. it will have a standard, default, type; no offsets and Frame.

template<class Ms>
casa::MeasRef< Ms >::MeasRef ( const MeasRef< Ms > &  other)

Copy constructor.

template<class Ms>
casa::MeasRef< Ms >::MeasRef ( const uInt  tp) [explicit]

Construct a reference with specified type, offset and Frame.


Caution: The following should really be (and should still be called as), but compiler does not accept it, due to incomplete definition when called in MeasBase:
MeasRef(Ms::Types tp); Furthermore, default arguments are not supported with templated classes:

template<class Ms>
casa::MeasRef< Ms >::MeasRef ( const uInt  tp,
const Ms &  ep 
)
template<class Ms>
casa::MeasRef< Ms >::MeasRef ( const uInt  tp,
const MeasFrame mf 
)
template<class Ms>
casa::MeasRef< Ms >::MeasRef ( const uInt  tp,
const MeasFrame mf,
const Ms &  ep 
)
template<class Ms>
casa::MeasRef< Ms >::~MeasRef ( )

    


Member Function Documentation

template<class Ms>
MeasRef casa::MeasRef< Ms >::copy ( ) [private]

Copy an instance.

template<class Ms>
void casa::MeasRef< Ms >::create ( ) [private]

Create an instance of MeasRef.

template<class Ms>
virtual Bool casa::MeasRef< Ms >::empty ( ) const [virtual]

Check if empty reference.

Implements casa::MRBase.

template<class Ms>
static const MeasFrame& casa::MeasRef< Ms >::frameComet ( MRBase ref1,
MRBase ref2 
) [static]
template<class Ms>
static const MeasFrame& casa::MeasRef< Ms >::frameDirection ( MRBase ref1,
MRBase ref2 
) [static]
template<class Ms>
static const MeasFrame& casa::MeasRef< Ms >::frameEpoch ( MRBase ref1,
MRBase ref2 
) [static]
template<class Ms>
static const MeasFrame& casa::MeasRef< Ms >::framePosition ( MRBase ref1,
MRBase ref2 
) [static]

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
template<class Ms>
static const MeasFrame& casa::MeasRef< Ms >::frameRadialVelocity ( MRBase ref1,
MRBase ref2 
) [static]
template<class Ms>
virtual MeasFrame& casa::MeasRef< Ms >::getFrame ( ) [virtual]

Return the frame of reference.

Implements casa::MRBase.

template<class Ms>
virtual uInt casa::MeasRef< Ms >::getType ( ) const [virtual]

Return the type of the reference
Caution: the following should really be (and should be interpreted as), but cannot create a virtual function:
Ms::Types getType();

Implements casa::MRBase.

Referenced by casa::SDPointingHandler::directionRefType().

template<class Ms>
virtual const Measure* casa::MeasRef< Ms >::offset ( ) const [virtual]

Return the offset (or 0)

Implements casa::MRBase.

template<class Ms>
Bool casa::MeasRef< Ms >::operator!= ( const MeasRef< Ms > &  other) const

Check if unequal MeasRef.

template<class Ms>
MeasRef& casa::MeasRef< Ms >::operator= ( const MeasRef< Ms > &  other)

Copy assignment.

template<class Ms>
Bool casa::MeasRef< Ms >::operator== ( const MeasRef< Ms > &  other) const

Check if same MeasRef.

template<class Ms>
virtual void casa::MeasRef< Ms >::print ( ostream &  os) const [virtual]

Print a Measure.

Implements casa::MRBase.

template<class Ms>
virtual void casa::MeasRef< Ms >::set ( uInt  tp) [virtual]

Implements casa::MRBase.

template<class Ms>
void casa::MeasRef< Ms >::set ( const Ms &  ep)

Set a new offset.

template<class Ms>
void casa::MeasRef< Ms >::set ( const Measure ep)

Set a new offset (for internal use only)

template<class Ms>
virtual void casa::MeasRef< Ms >::set ( const MeasFrame mf) [virtual]

Set a new frame.

Implements casa::MRBase.

template<class Ms>
virtual void casa::MeasRef< Ms >::setType ( uInt  tp) [virtual]

Set the type.

Thrown Exceptions


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

Implements casa::MRBase.

template<class Ms>
static const String& casa::MeasRef< Ms >::showMe ( ) [static]

Check the type of Measure the reference can be used for.


Member Data Documentation

template<class Ms>
CountedPtr<RefRep> casa::MeasRef< Ms >::rep_p [private]

Definition at line 198 of file MeasRef.h.


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