29 #ifndef MEASURES_MEASCONVERT_H
30 #define MEASURES_MEASCONVERT_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/casa/Containers/Block.h>
35 #include <casacore/measures/Measures/MConvertBase.h>
36 #include <casacore/casa/Quanta/Quantum.h>
37 #include <casacore/measures/Measures/Measure.h>
168 MeasConvert(
const typename M::Ref &mrin,
const typename M::Ref &mr);
173 const typename M::Ref &mr);
175 typename M::Types mr);
177 const typename M::Ref &mr);
179 typename M::Types mr);
197 const M &
operator()(
const M &val,
const typename M::Ref &mr);
213 void set(
const M &val,
const typename M::Ref &mr);
214 void set(
const M &val,
typename M::Types mr);
232 virtual void print(ostream &os)
const;
275 const typename M::MVType &
convert(
const typename M::MVType &val);
284 #ifndef CASACORE_NO_AUTO_TEMPLATES
285 #include <casacore/measures/Measures/MeasConvert.tcc>
size_t nelements() const
The number of elements contained in this Block<T>.
virtual void addMethod(uInt method)
Add a method (Note: uInt should be an enum from the appropiate Measure)
virtual void print(ostream &os) const
Print conversion engine.
MeasConvert(const Unit &inunit, typename M::Types mrin, const typename M::Ref &mr)
virtual uInt getMethod(uInt which) const
Get method.
const M & operator()(Double val)
Bool isNOP()
Is the conversion engine empty?
void set(const M &val, const typename M::Ref &mr)
Set a new model and reference.
MeasConvert(const M &ep, const typename M::Ref &mr)
virtual void set(const MeasValue &val)
Set a new model value only.
M::MVType * offin
The input offset.
void init()
Initialise pointers.
void setOut(const typename M::Ref &mr)
Set a new output reference.
const M & operator()(const M &val, const typename M::Ref &mr)
const M & operator()()
The actual conversion operations.
MeasConvert(const Unit &inunit, const typename M::Ref &mrin, const typename M::Ref &mr)
MeasConvert(const Unit &inunit, const typename M::Ref &mrin, typename M::Types mr)
MeasConvert(const Measure &ep, const typename M::Ref &mr)
const M & operator()(const Quantum< Vector< Double > > &val)
const M::MVType & convert(const typename M::MVType &val)
M::MVType * offout
The output offset.
M::Ref outref
The output reference.
MeasConvert(const typename M::Ref &mrin, const typename M::Ref &mr)
MeasConvert()
Tip: In the following constructors and other functions, all MeasRef can be replaced with simple Measu...
MeasConvert< M > & operator=(const MeasConvert< M > &other)
Copy assignment.
virtual void addFrameType(uInt tp)
Add the frame type (Note: tp should be an MeasFrame::FrameType)
const M & operator()(const Vector< Double > &val)
const M & operator()(const typename M::MVType &val)
MeasConvert(const Unit &inunit, typename M::Types mrin, typename M::Types mr)
Unit unit
The model unit to be used in conversions.
MeasConvert(typename M::Types mrin, typename M::Types mr)
const M & operator()(const typename M::Ref &mr)
Int lres
Cyclic buffer for return values.
void setOut(typename M::Types mr)
void copy(const MeasConvert< M > &other)
Copy a MeasConvert.
virtual void setModel(const Measure &val)
Set a new model for the conversion.
MeasConvert(const typename M::Ref &mrin, typename M::Types mr)
uInt crtype
Coded (with MeasFrame::FrameTypes) frames used in conversion.
void set(const M &val, typename M::Types mr)
MeasConvert(const M &ep)
Construct a conversion for the specified Measure and reference.
const M & operator()(const MeasVal *val)
Block< uInt > crout
Vector of conversion routines (length variable)
MeasConvert(typename M::Types mrin, const typename M::Ref &mr)
Measure * model
The model template Measure.
const M & operator()(const Quantum< Double > &val)
MeasConvert(const Measure &ep, typename M::Types mr)
const M & operator()(const M &val, typename M::Types mr)
virtual Int nMethod() const
Get number of methods.
void create()
Create the conversion routine chain.
MCBase * cvdat
Local conversion data.
const M & operator()(typename M::Types mr)
MeasConvert(const MeasConvert< M > &other)
Copy constructor.
const M::MVType & convert()
Convert a value.
MeasConvert(const M &ep, typename M::Types mr)
M::MVType * locres
Local variables that can be used in conversion.
const M & operator()(const M &val)
virtual void set(const Unit &inunit)
Set a new model unit only.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.