casacore
Loading...
Searching...
No Matches
casacore::MeasRef< Ms > Class Template Reference

More...

#include <MeasRef.h>

Classes

class  RefRep
 Representation class. More...

Public Member Functions

 MeasRef ()
 Construct an empty MeasRef.
 MeasRef (const MeasRef< Ms > &other)
 Copy constructor.
MeasRef & operator= (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 MeasFrame & getFrame ()
 Return the frame of reference.
virtual const Measure * offset () 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.
Public Member Functions inherited from casacore::MRBase
virtual ~MRBase ()

Static Public Member Functions

static const String & showMe ()
 Check the type of Measure the reference can be used for.
static const MeasFrame & framePosition (MRBase &ref1, MRBase &ref2)
 Return the first frame which has specified information.
static const MeasFrame & frameEpoch (MRBase &ref1, MRBase &ref2)
static const MeasFrame & frameDirection (MRBase &ref1, MRBase &ref2)
static const MeasFrame & frameRadialVelocity (MRBase &ref1, MRBase &ref2)
static const MeasFrame & frameComet (MRBase &ref1, MRBase &ref2)

Private Member Functions

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

Private Attributes

std::shared_ptr< RefRep > rep_p

Detailed Description

template<class Ms>
class casacore::MeasRef< Ms >

Reference frame for physical measures

Intended use:

Public interface

Review Status

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

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 80 of file MeasRef.h.

Constructor & Destructor Documentation

◆ MeasRef() [1/6]

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

Construct an empty MeasRef.

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

◆ MeasRef() [2/6]

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

Copy constructor.

◆ MeasRef() [3/6]

template<class Ms>
casacore::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:

◆ MeasRef() [4/6]

template<class Ms>
casacore::MeasRef< Ms >::MeasRef ( const uInt tp,
const Ms & ep )

◆ MeasRef() [5/6]

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

◆ MeasRef() [6/6]

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

◆ ~MeasRef()

template<class Ms>
casacore::MeasRef< Ms >::~MeasRef ( )

Member Function Documentation

◆ copy()

template<class Ms>
MeasRef casacore::MeasRef< Ms >::copy ( )
private

Copy an instance.

◆ create()

template<class Ms>
void casacore::MeasRef< Ms >::create ( )
private

Create an instance of MeasRef.

◆ empty()

template<class Ms>
virtual Bool casacore::MeasRef< Ms >::empty ( ) const
virtual

Check if empty reference.

Implements casacore::MRBase.

◆ frameComet()

template<class Ms>
const MeasFrame & casacore::MeasRef< Ms >::frameComet ( MRBase & ref1,
MRBase & ref2 )
static

◆ frameDirection()

template<class Ms>
const MeasFrame & casacore::MeasRef< Ms >::frameDirection ( MRBase & ref1,
MRBase & ref2 )
static

◆ frameEpoch()

template<class Ms>
const MeasFrame & casacore::MeasRef< Ms >::frameEpoch ( MRBase & ref1,
MRBase & ref2 )
static

◆ framePosition()

template<class Ms>
const MeasFrame & casacore::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

◆ frameRadialVelocity()

template<class Ms>
const MeasFrame & casacore::MeasRef< Ms >::frameRadialVelocity ( MRBase & ref1,
MRBase & ref2 )
static

◆ getFrame()

template<class Ms>
virtual MeasFrame & casacore::MeasRef< Ms >::getFrame ( )
virtual

Return the frame of reference.

Implements casacore::MRBase.

◆ getType()

template<class Ms>
virtual uInt casacore::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 casacore::MRBase.

◆ offset()

template<class Ms>
virtual const Measure * casacore::MeasRef< Ms >::offset ( ) const
virtual

Return the offset (or 0).

Implements casacore::MRBase.

◆ operator!=()

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

Check if unequal MeasRef.

◆ operator=()

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

Copy assignment.

◆ operator==()

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

Check if same MeasRef.

◆ print()

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

Print a Measure.

Implements casacore::MRBase.

◆ set() [1/4]

template<class Ms>
virtual void casacore::MeasRef< Ms >::set ( const MeasFrame & mf)
virtual

Set a new frame.

Implements casacore::MRBase.

◆ set() [2/4]

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

Set a new offset (for internal use only).

◆ set() [3/4]

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

Set a new offset.

◆ set() [4/4]

template<class Ms>
virtual void casacore::MeasRef< Ms >::set ( uInt tp)
virtual

Implements casacore::MRBase.

◆ setType()

template<class Ms>
virtual void casacore::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 casacore::MRBase.

◆ showMe()

template<class Ms>
const String & casacore::MeasRef< Ms >::showMe ( )
static

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

Member Data Documentation

◆ rep_p

template<class Ms>
std::shared_ptr<RefRep> casacore::MeasRef< Ms >::rep_p
private

Definition at line 193 of file MeasRef.h.


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