Go to the documentation of this file.
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>
143 template<
class M>
class MeasConvert :
public MConvertBase {
159 MeasConvert<M> &
operator=(
const MeasConvert<M> &other);
164 MeasConvert(
const M &ep,
const typename M::Ref &mr);
165 MeasConvert(
const Measure &ep,
const typename M::Ref &mr);
167 MeasConvert(
const Measure &ep,
typename M::Types mr);
168 MeasConvert(
const typename M::Ref &mrin,
const typename M::Ref &mr);
169 MeasConvert(
const typename M::Ref &mrin,
typename M::Types mr);
170 MeasConvert(
typename M::Types mrin,
const typename M::Ref &mr);
171 MeasConvert(
typename M::Types mrin,
typename M::Types mr);
172 MeasConvert(
const Unit &inunit,
const typename M::Ref &mrin,
173 const typename M::Ref &mr);
174 MeasConvert(
const Unit &inunit,
const typename M::Ref &mrin,
175 typename M::Types mr);
176 MeasConvert(
const Unit &inunit,
typename M::Types mrin,
177 const typename M::Ref &mr);
178 MeasConvert(
const Unit &inunit,
typename M::Types mrin,
179 typename M::Types mr);
191 const M &
operator()(
const Vector<Double> &val);
192 const M &
operator()(
const Quantum<Double> &val);
193 const M &
operator()(
const Quantum<Vector<Double> > &val);
194 const M &
operator()(
const typename M::MVType &val);
197 const M &
operator()(
const M &val,
const typename M::Ref &mr);
198 const M &
operator()(
const M &val,
typename M::Types mr);
199 const M &
operator()(
const typename M::Ref &mr);
205 virtual void setModel(
const Measure &val);
208 void setOut(
const typename M::Ref &mr);
209 void setOut(
typename M::Types mr);
213 void set(
const M &val,
const typename M::Ref &mr);
214 void set(
const M &val,
typename M::Types mr);
217 virtual void set(
const MeasValue &val);
219 virtual void set(
const Unit &inunit);
232 virtual void print(ostream &os)
const;
274 const typename M::MVType &
convert();
275 const typename M::MVType &
convert(
const typename M::MVType &val);
284 #ifndef CASACORE_NO_AUTO_TEMPLATES
285 #include <casacore/measures/Measures/MeasConvert.tcc>
286 #endif //# CASACORE_NO_AUTO_TEMPLATES
const M::MVType & convert()
Convert a value.
virtual void addMethod(uInt method)
Add a method (Note: uInt should be an enum from the appropiate Measure)
M::Ref outref
The output reference.
Block< uInt > crout
Vector of conversion routines (length variable)
Physical quantities within reference frame.
virtual void setModel(const Measure &val)
Set a new model for the conversion.
M::MVType * offout
The output offset.
Base for specific measure conversions.
uInt crtype
Coded (with MeasFrame::FrameTypes) frames used in conversion.
virtual void addFrameType(uInt tp)
Add the frame type (Note: tp should be an MeasFrame::FrameType)
void create()
Create the conversion routine chain.
void setOut(const typename M::Ref &mr)
Set a new output reference.
void set(const M &val, const typename M::Ref &mr)
Set a new model and reference.
virtual Int nMethod() const
Get number of methods.
M::MVType * locres
Local variables that can be used in conversion.
virtual void print(ostream &os) const
Print conversion engine.
MeasConvert< M > & operator=(const MeasConvert< M > &other)
Copy assignment.
Measure * model
The model template Measure.
this file contains all the compiler specific defines
const M & operator()()
The actual conversion operations.
void copy(const MeasConvert< M > &other)
Copy a MeasConvert.
M::MVType * offin
The input offset.
MeasConvert()
Tip: In the following constructors and other functions, all MeasRef can be replaced with simple Measu...
size_t nelements() const
The number of elements contained in this Block<T>.
Bool isNOP()
Is the conversion engine empty?
Int lres
Cyclic buffer for return values.
virtual uInt getMethod(uInt which) const
Get method.
void init()
Initialise pointers.
bool Bool
Define the standard types used by Casacore.
MCBase * cvdat
Local conversion data.
Unit unit
The model unit to be used in conversions.