MeasRef.h
Classes
- MeasRef -- Reference frame for physical measures (full description)
template<class Ms> class MeasRef : public MRBase
Interface
- Public Members
- MeasRef()
- MeasRef(const MeasRef<Ms> &other)
- MeasRef &operator=(const MeasRef<Ms> &other)
- explicit MeasRef(const uInt tp)
- 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
- Bool operator!=(const MeasRef<Ms> &other) const
- virtual Bool empty() const
- static const String &showMe()
- virtual uInt getType() const
- virtual MeasFrame &getFrame()
- static const MeasFrame &framePosition(MRBase &ref1, MRBase &ref2)
- 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)
- virtual const Measure *const offset() const
- virtual void setType(uInt tp)
- virtual void set(uInt tp)
- void set(const Ms &ep)
- void set(const Measure &ep)
- virtual void set(const MeasFrame &mf)
- virtual void print(ostream &os) const
- void create()
- MeasRef copy()
Review Status
- Reviewed By:
- UNKNOWN
- Date Reviewed:
- before2004/08/25
- Programs:
- Tests:
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.
To Do
Member Description
Construct an empty MeasRef. I.e. it will have a standard,
default, type; no offsets and Frame.
MeasRef(const MeasRef<Ms> &other)
Copy constructor
MeasRef &operator=(const MeasRef<Ms> &other)
Copy assignment
explicit MeasRef(const uInt tp)
Construct a reference with specified type, offset and Frame
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(const uInt tp, const Ms &ep)
MeasRef(const uInt tp, const MeasFrame &mf)
MeasRef(const uInt tp, const MeasFrame &mf, const Ms &ep)
Construct a reference with specified type, offset and Frame
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
Check the type of Measure the reference can be used for
virtual uInt getType() const
Return the type of the reference
the following should really be
(and should be interpreted as), but
cannot create a virtual function:
Ms::Types getType();
Return the frame of reference
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
virtual const Measure *const offset() const
Return the offset (or 0)
virtual void setType(uInt tp)
virtual void set(uInt tp)
Set the type
Thrown Exceptions
- AipsError if wrong Measure
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);
void set(const Ms &ep)
Set a new offset
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
Create an instance of MeasRef
MeasRef copy()
Copy an instance