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

Internal value for MDoppler. More...

#include <MVDoppler.h>

Inheritance diagram for casa::MVDoppler:
casa::MeasValue

List of all members.

Public Member Functions

 MVDoppler ()
 Default constructor: generate a zero value.
 MVDoppler (const MVDoppler &other)
 Copy constructor.
MVDoppleroperator= (const MVDoppler &other)
 Copy assignment.
 MVDoppler (Double d)
 Constructor from Double.
 MVDoppler (const Quantity &other)
 Constructor from Quantum : value taken will be the canonical value.
 MVDoppler (const Quantum< Vector< Double > > &other)
 MVDoppler (const Vector< Double > &other)
 Constructor from Vector.
 MVDoppler (const Vector< Quantity > &other)
 ~MVDoppler ()
 Destructor.
 operator Double () const
 Conversion operator.
MVDoppleroperator+= (const MVDoppler &other)
 Addition.
MVDoppleroperator-= (const MVDoppler &other)
Bool operator== (const MVDoppler &other) const
 Comparisons.
Bool operator!= (const MVDoppler &other) const
Bool near (const MVDoppler &other, Double tol=1e-13) const
Bool nearAbs (const MVDoppler &other, Double tol=1e-13) const
virtual uInt type () const
 Tell me your type.
virtual void print (ostream &os) const
 Print data.
virtual MeasValueclone () const
 Clone.
Double getValue () const
 Adjust value: taken from base class, a NOP.
Quantity get () const
 Get quantity in m/s.
Quantity get (const Unit &unit) const
 Get the Doppler value in (recognised) specified units.
virtual Vector< DoublegetVector () const
 Get the value in internal units.
virtual void putVector (const Vector< Double > &in)
 Set the value from internal units (set 0 for empty vector)
virtual Vector< Quantum< Double > > getRecordValue () const
 Get the internal value as a Vector<Quantity>.
virtual Bool putValue (const Vector< Quantum< Double > > &in)
 Set the internal value if correct values and dimensions.

Static Public Member Functions

static void assure (const MeasValue &in)

Private Member Functions

Double makeD (Double v, const Unit &dt, Bool rev=False) const
 Get correct data type conversion factor from input Quantum.

Private Attributes

Double val
 Value.

Detailed Description

Internal value for MDoppler.

Intended use:

Public interface

 <h3>Review Status</h3><dl><dt>Reviewed By:<dd>tcornwel<dt>Date Reviewed:<dd>1996/02/23<dt>Test programs:<dd>tMeasMath</dl> 

Prerequisite

Etymology

From Measure, Value and Doppler

Synopsis

An MVDoppler is a simple Double, to be used in the MDoppler measure. Requirements can be found in the MeasValue base class.
The only reasonable constructor is (but all MeasValue constructors are present) MVDoppler(Double); and an operator Double takes care of all other possibilities. Its external use is for MeasConvert , to distinguish between input in internal Measure units, and values which have to have units applied.
The MVDoppler(Quantum) constructors recognise the type of representation characteristics presented from its units. Recognised are:


The Doppler is returned dimensionless with getValue(); or as a Quantity in m/s with get(); or in one of the related units with get(unit).

Example

See MDoppler

Motivation

To aid coordinate transformations possibilities

Definition at line 91 of file MVDoppler.h.


Constructor & Destructor Documentation

Default constructor: generate a zero value.

Copy constructor.

Constructor from Double.

Constructor from Quantum : value taken will be the canonical value.

casa::MVDoppler::MVDoppler ( const Quantum< Vector< Double > > &  other)
casa::MVDoppler::MVDoppler ( const Vector< Double > &  other)

Constructor from Vector.

A zero value will be taken for an empty vector, the canonical value for a quantum vector.

Thrown Exceptions

Destructor.


Member Function Documentation

static void casa::MVDoppler::assure ( const MeasValue in) [static]
virtual MeasValue* casa::MVDoppler::clone ( ) const [virtual]

Clone.

Implements casa::MeasValue.

Get quantity in m/s.

Quantity casa::MVDoppler::get ( const Unit unit) const

Get the Doppler value in (recognised) specified units.

virtual Vector<Quantum<Double> > casa::MVDoppler::getRecordValue ( ) const [virtual]

Get the internal value as a Vector<Quantity>.

Usable in records. The getXRecordValue() gets additional information for records. Note that the Vectors could be empty.

Implements casa::MeasValue.

Adjust value: taken from base class, a NOP.

Get value as ratio

virtual Vector<Double> casa::MVDoppler::getVector ( ) const [virtual]

Get the value in internal units.

Implements casa::MeasValue.

Double casa::MVDoppler::makeD ( Double  v,
const Unit dt,
Bool  rev = False 
) const [private]

Get correct data type conversion factor from input Quantum.

Bool casa::MVDoppler::near ( const MVDoppler other,
Double  tol = 1e-13 
) const
Bool casa::MVDoppler::nearAbs ( const MVDoppler other,
Double  tol = 1e-13 
) const
casa::MVDoppler::operator Double ( ) const

Conversion operator.

Bool casa::MVDoppler::operator!= ( const MVDoppler other) const
MVDoppler& casa::MVDoppler::operator+= ( const MVDoppler other)

Addition.

MVDoppler& casa::MVDoppler::operator-= ( const MVDoppler other)
MVDoppler& casa::MVDoppler::operator= ( const MVDoppler other)

Copy assignment.

Bool casa::MVDoppler::operator== ( const MVDoppler other) const

Comparisons.

virtual void casa::MVDoppler::print ( ostream &  os) const [virtual]

Print data.

Implements casa::MeasValue.

virtual Bool casa::MVDoppler::putValue ( const Vector< Quantum< Double > > &  in) [virtual]

Set the internal value if correct values and dimensions.

Implements casa::MeasValue.

virtual void casa::MVDoppler::putVector ( const Vector< Double > &  in) [virtual]

Set the value from internal units (set 0 for empty vector)

Implements casa::MeasValue.

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

Tell me your type.

Implements casa::MeasValue.


Member Data Documentation

Value.

Definition at line 174 of file MVDoppler.h.


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