28 #ifndef MEASURES_MEASUREHOLDER_H
29 #define MEASURES_MEASUREHOLDER_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Utilities/PtrHolder.h>
34 #include <casacore/casa/Utilities/RecordTransformable.h>
35 #include <casacore/casa/Containers/Block.h>
46 class MRadialVelocity;
Block< MeasValue * > mvhold_p
Block of pointers to measure values to make a faster interface.
Bool fromType(String &error, const RecordInterface &in)
Bool isMFrequency() const
MeasureHolder(const MeasureHolder &other)
Copy a holder (copy semantics)
virtual const String & ident() const
Get identification of record.
Bool getType(String &error, const RecordInterface &in)
Bool isMDirection() const
Bool toType(String &error, RecordInterface &out) const
Create a default Measure or a record with only a type from a Measure.
MeasValue * getMV(uInt pos) const
Get a pointer to a MeasValue (or 0)
const MBaseline & asMBaseline() const
const MDirection & asMDirection() const
virtual Bool toRecord(String &error, RecordInterface &out) const
Create a record from a Measure.
virtual Bool fromString(String &error, const String &in)
Initialise the class from a String representation.
Bool getType(String &error, const String &in)
void makeMV(uInt n)
Make a block of n MeasValues.
const Measure & asMeasure() const
Get a specific Measure from the holder (with lifetime as long as holder exists).
virtual void toRecord(RecordInterface &outRecord) const
This version throws an exception if the conversion cannot occur.
const MPosition & asMPosition() const
MeasureHolder()
Creates an empty holder.
MeasureHolder(const Measure &in)
Create from a Measure (copy made)
Bool isEmpty() const
Check the the MeasureHolder holds the specified Measure type.
const Muvw & asMuvw() const
void createMV(uInt n)
Make a MeasValue block of pointers of length n.
Bool convertmv_p
Should the mvhold_p be converted into record?
PtrHolder< Measure > hold_p
Pointer to a Measure.
const MEarthMagnetic & asMEarthMagnetic() const
uInt nelements() const
Get number of MeasValue pointers in block.
const MFrequency & asMFrequency() const
Bool setMV(uInt pos, const MeasValue &in)
Set a measvalue at position pos (False if illegal pos)
const MEpoch & asMEpoch() const
Bool isMRadialVelocity() const
MeasureHolder & operator=(const MeasureHolder &other)
Assignment (copy semantics)
Bool writeMV() const
Do we write MeasValues to record?
const MRadialVelocity & asMRadialVelocity() const
Bool isMEarthMagnetic() const
virtual Bool fromRecord(String &error, const RecordInterface &in)
Create a Measure from a record.
const MDoppler & asMDoppler() const
Bool putType(String &error, RecordInterface &out) const
Aid for to/from Record, String and Type.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.