MVDoppler.h

Classes

MVDoppler -- Internal value for MDoppler (full description)

class MVDoppler : public MeasValue

Interface

Public Members
MVDoppler()
MVDoppler(const MVDoppler &other)
MVDoppler &operator=(const MVDoppler &other)
MVDoppler(Double d)
MVDoppler(const Quantity &other)
MVDoppler(const Quantum<Vector<Double> > &other)
MVDoppler(const Vector<Double> &other)
MVDoppler(const Vector<Quantity> &other)
~MVDoppler()
operator Double() const
MVDoppler &operator+=(const MVDoppler &other)
MVDoppler &operator-=(const MVDoppler &other)
Bool operator==(const MVDoppler &other) const
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
static void assure(const MeasValue &in)
virtual void print(ostream &os) const
virtual MeasValue *clone() const
Double getValue() const
Quantity get() const
Quantity get(const Unit &unit) const
virtual Vector<Double> getVector() const
virtual void putVector(const Vector<Double> &in)
virtual Vector<Quantum<Double> > getRecordValue() const
virtual Bool putValue(const Vector<Quantum<Double> > &in)
Private Members
Double makeD(Double v, const Unit &dt, Bool rev=False) const

Description

Review Status

Reviewed By:
tcornwel
Date Reviewed:
1996/02/23
Programs:
Tests:

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

To Do

Member Description

MVDoppler()

Default constructor: generate a zero value

MVDoppler(const MVDoppler &other)

Copy constructor

MVDoppler &operator=(const MVDoppler &other)

Copy assignment

MVDoppler(Double d)

Constructor from Double

MVDoppler(const Quantity &other)
MVDoppler(const Quantum<Vector<Double> > &other)

Constructor from Quantum : value taken will be the canonical value

MVDoppler(const Vector<Double> &other)
MVDoppler(const Vector<Quantity> &other)

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

Thrown Exceptions

~MVDoppler()

Destructor

operator Double() const

Conversion operator

MVDoppler &operator+=(const MVDoppler &other)
MVDoppler &operator-=(const MVDoppler &other)

Addition

Bool operator==(const MVDoppler &other) const
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

Comparisons

virtual uInt type() const
static void assure(const MeasValue &in)

Tell me your type

virtual void print(ostream &os) const

Print data

virtual MeasValue *clone() const

Clone

Double getValue() const

Adjust value: taken from base class, a NOP. Get value as ratio

Quantity get() const

Get quantity in m/s

Quantity get(const Unit &unit) const

Get the Doppler value in (recognised) specified units

virtual Vector<Double> getVector() 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>. Usable in records. The getXRecordValue() gets additional information for records. Note that the Vectors could be empty.

virtual Bool putValue(const Vector<Quantum<Double> > &in)

Set the internal value if correct values and dimensions

Double makeD(Double v, const Unit &dt, Bool rev=False) const

Get correct data type conversion factor from input Quantum