Convert.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2011 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/MEAL/MEAL/Convert.h
10
11#ifndef __MEAL_Convert_H
12#define __MEAL_Convert_H
13
14namespace MEAL {
15
17
18 template<typename From, typename To>
19 class Convert : public To
20 {
21
22 public:
23
25 void set_model (From* _model)
26 {
27 model = _model;
28 this->copy_parameter_policy (model);
29 }
30
32 From* get_model () { return model; }
33
35 const From* get_model () const { return model; }
36
38 bool has_model () const { return model; }
39
40 protected:
41
44 };
45
46}
47
48#endif
Convert a function to another type.
Definition Convert.h:20
Reference::To< From > model
The function to be converted.
Definition Convert.h:43
bool has_model() const
Return true if the function to be converted has been set.
Definition Convert.h:38
void set_model(From *_model)
Set the function to be converted.
Definition Convert.h:25
const From * get_model() const
Get the function to be converted.
Definition Convert.h:35
From * get_model()
Get the function to be converted.
Definition Convert.h:32
Namespace in which all modeling and calibration related code is declared.
Definition ExampleComplex2.h:16

Generated using doxygen 1.14.0