casa
$Rev:20696$
|
Aid in constructing function objects from C++ functions. More...
#include <WrapperBase.h>
Public Member Functions | |
WrapperBase () | |
Default constructor: zero dimension. | |
WrapperBase (const uInt dim) | |
Standard constructor. | |
virtual | ~WrapperBase () |
Destructor. | |
virtual T | eval (typename Function< T >::FunctionArg x, const Vector< T > &par) const =0 |
Evaluate the function at x . | |
virtual uInt | ndim () const |
Get the dimensionality. | |
Protected Attributes | |
uInt | ndim_p |
Dimensionality. | |
Vector< T > | arg_p |
Vector argument interface. | |
Private Member Functions | |
WrapperBase (const WrapperBase< T > &other) | |
Copy constructor and assignment (not implemented) | |
WrapperBase< T > & | operator= (const WrapperBase< T > &other) |
Aid in constructing function objects from C++ functions.
Internal
This base class is provided to enable compile time selection of the appropriate function call through WrapperData
.
Float func(const Vector<Float>& x) { return x(0)*x(1); } // x*y // Convert C++ functions to Functionals FunctionWrapper<Float> Func(func, 2);
Definition at line 66 of file WrapperBase.h.
casa::WrapperBase< T >::WrapperBase | ( | ) | [inline] |
Default constructor: zero dimension.
Definition at line 70 of file WrapperBase.h.
casa::WrapperBase< T >::WrapperBase | ( | const uInt | dim | ) | [inline, explicit] |
Standard constructor.
Definition at line 72 of file WrapperBase.h.
virtual casa::WrapperBase< T >::~WrapperBase | ( | ) | [inline, virtual] |
Destructor.
Definition at line 75 of file WrapperBase.h.
casa::WrapperBase< T >::WrapperBase | ( | const WrapperBase< T > & | other | ) | [private] |
Copy constructor and assignment (not implemented)
virtual T casa::WrapperBase< T >::eval | ( | typename Function< T >::FunctionArg | x, |
const Vector< T > & | par | ||
) | const [pure virtual] |
Evaluate the function at x
.
Implemented in casa::WrapperData_FF< T, T, T, False, False >, casa::WrapperData_VF< T, Vector< T >, T, True, False >, casa::WrapperData_TF< T, T, T, True, False >, casa::WrapperData_FV< T, T, Vector< T >, False, True >, casa::WrapperData_FT< T, T, T, False, True >, casa::WrapperData_VV< T, Vector< T >, Vector< T >, True, True >, casa::WrapperData_TV< T, T, Vector< T >, True, True >, casa::WrapperData_VT< T, Vector< T >, T, True, True >, and casa::WrapperData_TT< T, T, T, True, True >.
virtual uInt casa::WrapperBase< T >::ndim | ( | ) | const [inline, virtual] |
Get the dimensionality.
Definition at line 86 of file WrapperBase.h.
References casa::WrapperBase< T >::ndim_p.
WrapperBase<T>& casa::WrapperBase< T >::operator= | ( | const WrapperBase< T > & | other | ) | [private] |
Vector<T> casa::WrapperBase< T >::arg_p [mutable, protected] |
Vector argument interface.
Definition at line 93 of file WrapperBase.h.
uInt casa::WrapperBase< T >::ndim_p [protected] |
Dimensionality.
Definition at line 91 of file WrapperBase.h.
Referenced by casa::WrapperBase< T >::ndim().