29 #ifndef MEASURES_MEASCONVERT_H
30 #define MEASURES_MEASCONVERT_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.
M::MVType * offout
The output offset.
Unit unit
The model unit to be used in conversions.
Base for specific measure conversions.
size_t nelements() const
The number of elements contained in this Block<T>.
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.
void create()
Create the conversion routine chain.
void setOut(const typename M::Ref &mr)
Set a new output reference.
MeasConvert< M > & operator=(const MeasConvert< M > &other)
Copy assignment.
uInt crtype
Coded (with MeasFrame::FrameTypes) frames used in conversion.
virtual uInt getMethod(uInt which) const
Get method.
M::MVType * offin
The input offset.
virtual void addFrameType(uInt tp)
Add the frame type (Note: tp should be an MeasFrame::FrameType)
Measure * model
The model template Measure.
void set(const M &val, const typename M::Ref &mr)
Set a new model and reference.
Bool isNOP()
Is the conversion engine empty?
bool Bool
Define the standard types used by Casacore.
M::MVType * locres
Local variables that can be used in conversion.
virtual void print(ostream &os) const
Print conversion engine.
MeasConvert()
Tip: In the following constructors and other functions, all MeasRef can be replaced with simple Meas...
const M & operator()()
The actual conversion operations.
void copy(const MeasConvert< M > &other)
Copy a MeasConvert.
MCBase * cvdat
Local conversion data.
virtual Int nMethod() const
Get number of methods.
Int lres
Cyclic buffer for return values.
void init()
Initialise pointers.
virtual void addMethod(uInt method)
Add a method (Note: uInt should be an enum from the appropiate Measure)
M::Ref outref
The output reference.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.