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

Class to distinguish external and Measure internal Double. More...

#include <MVDouble.h>

Inheritance diagram for casa::MVDouble:
casa::MeasValue

List of all members.

Public Member Functions

 MVDouble ()
 Default constructor: generate a zero value.
 MVDouble (const MVDouble &other)
 Copy constructor.
MVDoubleoperator= (const MVDouble &other)
 Copy assignment.
 MVDouble (Double d)
 Constructor from Double.
 MVDouble (const Quantity &other)
 Constructor from Quantum : value taken will be the canonical value.
 MVDouble (const Quantum< Vector< Double > > &other)
 MVDouble (const Vector< Double > &other)
 Constructor from Vector.
 MVDouble (const Vector< Quantity > &other)
 ~MVDouble ()
 Destructor.
 operator Double () const
 Conversion operator.
MVDoubleoperator+= (const MVDouble &other)
 Addition.
MVDoubleoperator-= (const MVDouble &other)
Bool operator== (const MVDouble &other) const
 Comparisons.
Bool operator!= (const MVDouble &other) const
Bool near (const MVDouble &other, Double tol=1e-13) const
Bool nearAbs (const MVDouble &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.
virtual Vector< DoublegetVector () const
 Adjust value: taken from base class, a NOP.
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 Attributes

Double val
 Value.

Detailed Description

Class to distinguish external and Measure internal Double.

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 Double

Synopsis

An MVDouble is a simple Double, to be used in simple, single value Measures. Requirements can be found in the MeasValue base class.
The only reasonable constructor is (but all MeasValue constructors are present) MVDouble(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.

Example

See e.g. MFrequency

Motivation

To aid coordinate transformations possibilities

Definition at line 83 of file MVDouble.h.


Constructor & Destructor Documentation

Default constructor: generate a zero value.

casa::MVDouble::MVDouble ( const MVDouble other)

Copy constructor.

Constructor from Double.

casa::MVDouble::MVDouble ( const Quantity other)

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

casa::MVDouble::MVDouble ( const Quantum< Vector< Double > > &  other)
casa::MVDouble::MVDouble ( 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

casa::MVDouble::MVDouble ( const Vector< Quantity > &  other)

Destructor.


Member Function Documentation

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

Clone.

Implements casa::MeasValue.

virtual Vector<Quantum<Double> > casa::MVDouble::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.

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

Adjust value: taken from base class, a NOP.

Get the value in internal units

Implements casa::MeasValue.

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

Conversion operator.

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

Addition.

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

Copy assignment.

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

Comparisons.

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

Print data.

Implements casa::MeasValue.

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

Set the internal value if correct values and dimensions.

Implements casa::MeasValue.

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

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

Implements casa::MeasValue.

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

Tell me your type.

Implements casa::MeasValue.


Member Data Documentation

Value.

Definition at line 158 of file MVDouble.h.


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