ArgumentPolicyAdapter.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2005 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/MEAL/MEAL/ArgumentPolicyAdapter.h
10 
11 #ifndef __MEAL_ArgumentPolicyAdapter_H
12 #define __MEAL_ArgumentPolicyAdapter_H
13 
14 #include "MEAL/ArgumentPolicy.h"
15 
16 namespace MEAL {
17 
19  template<class T>
20  class ArgumentPolicyAdapter : public ArgumentPolicy {
21 
22  public:
23 
25  ArgumentPolicyAdapter (Function* context, T* adapt)
26  : ArgumentPolicy (context), adaptee (adapt) { }
27 
29  ArgumentPolicyAdapter* clone (Function* context) const
30  { return new ArgumentPolicyAdapter (context, adaptee); }
31 
33  void set_argument (unsigned dimension, Argument* axis)
34  { adaptee->set_argument (dimension, axis); }
35 
36  protected:
37 
40 
41  };
42 
43 }
44 
45 #endif
ArgumentPolicyAdapter(Function *context, T *adapt)
Default constructor.
Definition: ArgumentPolicyAdapter.h:35
Managers of Function arguments.
Definition: ArgumentPolicy.h:26
Namespace in which all modeling and calibration related code is declared.
Definition: ExampleComplex2.h:16
ArgumentPolicyAdapter * clone(Function *context) const
Clone operator.
Definition: ArgumentPolicyAdapter.h:39
Pure virtual base class of all functions.
Definition: Function.h:49
void set_argument(unsigned dimension, Argument *axis)
Set the independent variable of the specified dimension.
Definition: ArgumentPolicyAdapter.h:43
Adapts an object with the ArgumentPolicy interface.
Definition: ArgumentPolicyAdapter.h:25
Reference::To< T > adaptee
The adapted object.
Definition: ArgumentPolicyAdapter.h:49

Generated using doxygen 1.8.17