casacore
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
casacore::MeasBase< Mv, Mr > Class Template Reference

More...

#include <MeasBase.h>

Public Member Functions

 MeasBase ()
 Tip: In the following constructors and other functions, all MeasRef can be replaced with simple Measure::TYPE where no offsets or frames are needed in the reference; For reasons of compiler limitations the formal arguments had to be specified as uInt rather than the Measure enums that should be used as actual arguments;
Default constructor More...
 
 MeasBase (const MeasBase< Mv, Mr > &other)
 Copy constructor. More...
 
MeasBase< Mv, Mr > & operator= (const MeasBase< Mv, Mr > &other)
 Copy assignment. More...
 
 MeasBase (const Mv &dt, const Mr &rf)
 Create from data and reference. More...
 
 MeasBase (const Mv &dt, uInt rf)
 
 MeasBase (const Quantity &dt, const Mr &rf)
 
 MeasBase (const Quantity &dt, uInt rf)
 
 MeasBase (const Measure *dt)
 
 MeasBase (const Mr &rf)
 
 MeasBase (const uInt rf)
 
virtual ~MeasBase ()
 
virtual Bool areYou (const String &tp) const
 Check the type of derived entity. More...
 
virtual void assured (const String &tp) const
 Assert that we are the correct type. More...
 
void set (const Mv &dt)
 Refill the specified entities. More...
 
void set (const Mr &rf)
 
void set (const Mv &dt, const Mr &rf)
 
void set (const Unit &inunit)
 
virtual void set (const MeasValue &dt)
 Each Measure should have the following set functions (with appropiate MVs and Ref): More...
 
virtual Bool putValue (const Vector< Quantum< Double > > &in)
 
Mr getRef () const
 Get reference. More...
 
const Mv & getValue () const
 Get Measure data. More...
 
const UnitgetUnit () const
 Get Unit. More...
 
virtual MRBasegetRefPtr () const
 Get reference pointer. More...
 
virtual const MeasValuegetData () const
 Get pointer to data. More...
 
virtual void print (std::ostream &os) const
 Print a Measure. More...
 
- Public Member Functions inherited from casacore::Measure
virtual ~Measure ()
 Destructor. More...
 
virtual Bool setOffset (const Measure &in)=0
 Set the offset in the reference (False if non-matching Measure) More...
 
virtual const StringtellMe () const =0
 Tell me your Measure type (e.g. More...
 
virtual String getRefString () const =0
 Each Measure should have the following static methods to give its name (e.g. More...
 
virtual Bool isModel () const
 Tell me if you are a pure model (e.g. More...
 
void dummy_giveMe () const
 Each derived class should have a string-to-code translation routine for the reference type. More...
 
virtual Bool setRefString (const String &in)=0
 Set the reference type to the specified String. More...
 
virtual const StringgetDefaultType () const =0
 Get the default reference type. More...
 
virtual const StringallTypes (Int &nall, Int &nextra, const uInt *&typ) const
 Get a list of all known reference codes. More...
 
virtual void checkTypes () const =0
 Check if all internal tables of types (both enum and String) are complete and correct. More...
 
void dummy_getRef () const
 Each class should have a function to return its reference: More...
 
void dummy_getValue () const
 Each derived class should be able to get its internal value and have: More...
 
virtual Measureclone () const =0
 Create a copy. More...
 

Protected Attributes

Mv data
 The measure value (e.g. More...
 
Mr ref
 Reference frame data. More...
 
Unit unit
 Possible input units. More...
 

Private Member Functions

void clear ()
 Error information MeasErr error;. More...
 

Additional Inherited Members

- Public Types inherited from casacore::Measure
enum  Types {
  N_Types ,
  DEFAULT
}
 Each derived class should have a Types enumeration, specifying the recognised frame types. More...
 
typedef void * Convert
 Each Measure should have typedefs of the form: More...
 
- Static Public Member Functions inherited from casacore::Measure
static uInt giveMe (const String &in, Int N_name, const String tname[])
 A general string checking routine to be used in derived measures. More...
 

Detailed Description

template<class Mv, class Mr>
class casacore::MeasBase< Mv, Mr >

Base class for all measures

Intended use:

Internal

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Test programs:
tMeasure

Prerequisite

Etymology

Measure and Base

Synopsis

MeasBase forms derived Measure class for all actual measures

Example

Motivation

To have most work in single routine

To Do

Definition at line 73 of file MeasBase.h.

Constructor & Destructor Documentation

◆ MeasBase() [1/9]

template<class Mv , class Mr >
casacore::MeasBase< Mv, Mr >::MeasBase ( )

Tip: In the following constructors and other functions, all MeasRef can be replaced with simple Measure::TYPE where no offsets or frames are needed in the reference; For reasons of compiler limitations the formal arguments had to be specified as uInt rather than the Measure enums that should be used as actual arguments;
Default constructor

◆ MeasBase() [2/9]

template<class Mv , class Mr >
casacore::MeasBase< Mv, Mr >::MeasBase ( const MeasBase< Mv, Mr > &  other)

Copy constructor.

◆ MeasBase() [3/9]

template<class Mv , class Mr >
casacore::MeasBase< Mv, Mr >::MeasBase ( const Mv &  dt,
const Mr &  rf 
)

Create from data and reference.

◆ MeasBase() [4/9]

template<class Mv , class Mr >
casacore::MeasBase< Mv, Mr >::MeasBase ( const Mv &  dt,
uInt  rf 
)

◆ MeasBase() [5/9]

template<class Mv , class Mr >
casacore::MeasBase< Mv, Mr >::MeasBase ( const Quantity dt,
const Mr &  rf 
)

◆ MeasBase() [6/9]

template<class Mv , class Mr >
casacore::MeasBase< Mv, Mr >::MeasBase ( const Quantity dt,
uInt  rf 
)

◆ MeasBase() [7/9]

template<class Mv , class Mr >
casacore::MeasBase< Mv, Mr >::MeasBase ( const Measure dt)

◆ MeasBase() [8/9]

template<class Mv , class Mr >
casacore::MeasBase< Mv, Mr >::MeasBase ( const Mr &  rf)

◆ MeasBase() [9/9]

template<class Mv , class Mr >
casacore::MeasBase< Mv, Mr >::MeasBase ( const uInt  rf)

◆ ~MeasBase()

template<class Mv , class Mr >
virtual casacore::MeasBase< Mv, Mr >::~MeasBase ( )
virtual

Member Function Documentation

◆ areYou()

template<class Mv , class Mr >
virtual Bool casacore::MeasBase< Mv, Mr >::areYou ( const String tp) const
virtual

Check the type of derived entity.

Implements casacore::Measure.

◆ assured()

template<class Mv , class Mr >
virtual void casacore::MeasBase< Mv, Mr >::assured ( const String tp) const
virtual

Assert that we are the correct type.

Thrown Exceptions

Implements casacore::Measure.

◆ clear()

template<class Mv , class Mr >
void casacore::MeasBase< Mv, Mr >::clear ( )
privatevirtual

Error information MeasErr error;.

Clear the measure

Implements casacore::Measure.

◆ getData()

template<class Mv , class Mr >
virtual const MeasValue* casacore::MeasBase< Mv, Mr >::getData ( ) const
virtual

Get pointer to data.

Implements casacore::Measure.

◆ getRef()

template<class Mv , class Mr >
Mr casacore::MeasBase< Mv, Mr >::getRef ( ) const

Get reference.

◆ getRefPtr()

template<class Mv , class Mr >
virtual MRBase* casacore::MeasBase< Mv, Mr >::getRefPtr ( ) const
virtual

Get reference pointer.

Implements casacore::Measure.

◆ getUnit()

template<class Mv , class Mr >
const Unit& casacore::MeasBase< Mv, Mr >::getUnit ( ) const
virtual

Get Unit.

Implements casacore::Measure.

◆ getValue()

template<class Mv , class Mr >
const Mv& casacore::MeasBase< Mv, Mr >::getValue ( ) const

Get Measure data.

◆ operator=()

template<class Mv , class Mr >
MeasBase<Mv,Mr>& casacore::MeasBase< Mv, Mr >::operator= ( const MeasBase< Mv, Mr > &  other)

Copy assignment.

◆ print()

template<class Mv , class Mr >
virtual void casacore::MeasBase< Mv, Mr >::print ( std::ostream &  os) const
virtual

Print a Measure.

Implements casacore::Measure.

◆ putValue()

template<class Mv , class Mr >
virtual Bool casacore::MeasBase< Mv, Mr >::putValue ( const Vector< Quantum< Double > > &  in)
virtual

Implements casacore::Measure.

◆ set() [1/5]

template<class Mv , class Mr >
virtual void casacore::MeasBase< Mv, Mr >::set ( const MeasValue dt)
virtual

Each Measure should have the following set functions (with appropiate MVs and Ref):

void set(const MVmeasure &dt);
void set(const Measure::Ref &rf);
void set(const MVmeasure &dt, const Measure::Ref &rf);
void set(const Mv &dt)
Refill the specified entities.

Implements casacore::Measure.

◆ set() [2/5]

template<class Mv , class Mr >
void casacore::MeasBase< Mv, Mr >::set ( const Mr &  rf)

◆ set() [3/5]

template<class Mv , class Mr >
void casacore::MeasBase< Mv, Mr >::set ( const Mv &  dt)

Refill the specified entities.

◆ set() [4/5]

template<class Mv , class Mr >
void casacore::MeasBase< Mv, Mr >::set ( const Mv &  dt,
const Mr &  rf 
)

◆ set() [5/5]

template<class Mv , class Mr >
void casacore::MeasBase< Mv, Mr >::set ( const Unit inunit)

Member Data Documentation

◆ data

template<class Mv , class Mr >
Mv casacore::MeasBase< Mv, Mr >::data
protected

The measure value (e.g.

instant in time)

Definition at line 155 of file MeasBase.h.

◆ ref

template<class Mv , class Mr >
Mr casacore::MeasBase< Mv, Mr >::ref
protected

Reference frame data.

Definition at line 157 of file MeasBase.h.

◆ unit

template<class Mv , class Mr >
Unit casacore::MeasBase< Mv, Mr >::unit
protected

Possible input units.

Definition at line 159 of file MeasBase.h.


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