Loading...
Searching...
No Matches
casacore::MeasBase< Mv, Mr > Class Template Reference
measures package (libcasa_measures) » Measures_module » Measures_module_internal_classes

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
| MeasBase (const MeasBase< Mv, Mr > &other)
| Copy constructor.
MeasBase< Mv, Mr > & | operator= (const MeasBase< Mv, Mr > &other)
| Copy assignment.
| MeasBase (const Mv &dt, const Mr &rf)
| Create from data and reference.
| 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.
virtual void | assured (const String &tp) const
| Assert that we are the correct type.
void | set (const Mv &dt)
| Refill the specified entities.
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):
virtual Bool | putValue (const Vector< Quantum< Double > > &in)
Mr | getRef () const
| Get reference.
const Mv & | getValue () const
| Get Measure data.
const Unit & | getUnit () const
| Get Unit.
virtual MRBase * | getRefPtr () const
| Get reference pointer.
virtual const MeasValue * | getData () const
| Get pointer to data.
virtual void | print (std::ostream &os) const
| Print a Measure.
Public Member Functions inherited from casacore::Measure
virtual | ~Measure ()
| Destructor.
virtual Bool | setOffset (const Measure &in)=0
| Set the offset in the reference (False if non-matching Measure).
virtual const String & | tellMe () const =0
| Tell me your Measure type (e.g.
virtual String | getRefString () const =0
| Each Measure should have the following static methods to give its name (e.g.
virtual Bool | isModel () const
| Tell me if you are a pure model (e.g.
void | dummy_giveMe () const
| Each derived class should have a string-to-code translation routine for the reference type.
virtual Bool | setRefString (const String &in)=0
| Set the reference type to the specified String.
virtual const String & | getDefaultType () const =0
| Get the default reference type.
virtual const String * | allTypes (Int &nall, Int &nextra, const uInt *&typ) const
| Get a list of all known reference codes.
virtual void | checkTypes () const =0
| Check if all internal tables of types (both enum and String) are complete and correct.
void | dummy_getRef () const
| Each class should have a function to return its reference:
void | dummy_getValue () const
| Each derived class should be able to get its internal value and have:
virtual Measure * | clone () const =0
| Create a copy.

## Protected Attributes

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

## Private Member Functions

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

## 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:
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.

## 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

- Measure class

### 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 70 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

Referenced by MeasBase(), and operator=().

## MeasBase() [2/9]

template<class Mv, class Mr>

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

Copy constructor.

References MeasBase().

## 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

- AipsError if wrong Measure

Implements casacore::Measure.

## clear()

template<class Mv, class Mr>

void casacore::MeasBase< Mv, Mr >::clear | ( |  | ) |

private virtual

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.

References MeasBase().

## 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);
casacore::MeasBase::set
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 152 of file MeasBase.h.

## ref

template<class Mv, class Mr>

Mr casacore::MeasBase< Mv, Mr >::ref

protected

Reference frame data.

Definition at line 154 of file MeasBase.h.

## unit

template<class Mv, class Mr>

Unit casacore::MeasBase< Mv, Mr >::unit

protected

Possible input units.

Definition at line 156 of file MeasBase.h.

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

- measures/Measures/MeasBase.h