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::MVFrequency Class Reference

Internal value for MFrequency. More...

#include <MVFrequency.h>

Inheritance diagram for casa::MVFrequency:
casa::MeasValue

List of all members.

Public Member Functions

 MVFrequency ()
 Default constructor: generate a zero value.
 MVFrequency (const MVFrequency &other)
 Copy constructor.
MVFrequencyoperator= (const MVFrequency &other)
 Copy assignment.
 MVFrequency (Double d)
 Constructor from Double, assuming Hz.
 MVFrequency (const Quantity &other)
 Constructor from Quantum : value taken will be the canonical value.
 MVFrequency (const Quantum< Vector< Double > > &other)
 MVFrequency (const Vector< Double > &other)
 Constructor from Vector.
 MVFrequency (const Vector< Quantity > &other)
 ~MVFrequency ()
 Destructor.
 operator Double () const
 Conversion operator.
MVFrequencyoperator+= (const MVFrequency &other)
 Addition.
MVFrequencyoperator-= (const MVFrequency &other)
Bool operator== (const MVFrequency &other) const
 Comparisons.
Bool operator!= (const MVFrequency &other) const
Bool near (const MVFrequency &other, Double tol=1e-13) const
Bool nearAbs (const MVFrequency &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 Hz.
Quantity get (const Unit &unit) const
 Get the wave characteristics 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 makeF (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 MFrequency.

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 Frequency

Synopsis

An MVFrequency is a simple Double, to be used in the MFrequency measure. Requirements can be found in the MeasValue base class.
The only reasonable constructor is (but all MeasValue constructors are present) MVFrequency(Double) (with assumed Hz units); 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 MVFrequency(Quantum) constructors recognise the type of wave characteristics presented from its units. Recognised are:


The frequency is returned in Hz with getValue(); or as a Quantity in Hz with get(); or in one of the above units with get(unit).

Example

See MFrequency

Motivation

To aid coordinate transformations possibilities

Definition at line 97 of file MVFrequency.h.


Constructor & Destructor Documentation

Default constructor: generate a zero value.

Copy constructor.

Constructor from Double, assuming Hz.

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

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::MVFrequency::assure ( const MeasValue in) [static]
virtual MeasValue* casa::MVFrequency::clone ( ) const [virtual]

Clone.

Implements casa::MeasValue.

Get quantity in Hz.

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

Get the wave characteristics in (recognised) specified units.

virtual Vector<Quantum<Double> > casa::MVFrequency::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 in Hz

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

Get the value in internal units.

Implements casa::MeasValue.

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

Get correct data type conversion factor from input Quantum.

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

Conversion operator.

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

Addition.

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

Copy assignment.

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

Comparisons.

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

Print data.

Implements casa::MeasValue.

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

Set the internal value if correct values and dimensions.

Implements casa::MeasValue.

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

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

Implements casa::MeasValue.

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

Tell me your type.

Implements casa::MeasValue.


Member Data Documentation

Value.

Definition at line 180 of file MVFrequency.h.


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