casacore
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
casacore::WrapperBase< T > Class Template Referenceabstract

Aid in constructing function objects from C++ functions. More...

#include <FunctionWrapper.h>

Public Member Functions

 WrapperBase ()
 Default constructor: zero dimension. More...
 
 WrapperBase (const uInt dim)
 Standard constructor. More...
 
virtual ~WrapperBase ()
 Destructor. More...
 
virtual T eval (typename Function< T >::FunctionArg x, const Vector< T > &par) const =0
 Evaluate the function at x. More...
 
virtual uInt ndim () const
 Get the dimensionality. More...
 

Protected Attributes

uInt ndim_p
 Dimensionality. More...
 
Vector< T > arg_p
 Vector argument interface. More...
 

Private Member Functions

 WrapperBase (const WrapperBase< T > &other)
 Copy constructor and assignment (not implemented) More...
 
WrapperBase< T > & operator= (const WrapperBase< T > &other)
 

Detailed Description

template<class T>
class casacore::WrapperBase< T >

Aid in constructing function objects from C++ functions.

Intended use:

Internal

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Prerequisite

Synopsis

This base class is provided to enable compile time selection of the appropriate function call through WrapperData.

Example

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 40 of file FunctionWrapper.h.

Constructor & Destructor Documentation

§ WrapperBase() [1/3]

template<class T >
casacore::WrapperBase< T >::WrapperBase ( )
inline

Default constructor: zero dimension.

Definition at line 70 of file WrapperBase.h.

§ WrapperBase() [2/3]

template<class T >
casacore::WrapperBase< T >::WrapperBase ( const uInt  dim)
inlineexplicit

Standard constructor.

Definition at line 72 of file WrapperBase.h.

§ ~WrapperBase()

template<class T >
virtual casacore::WrapperBase< T >::~WrapperBase ( )
inlinevirtual

Destructor.

Definition at line 75 of file WrapperBase.h.

References casacore::WrapperBase< T >::eval().

§ WrapperBase() [3/3]

template<class T >
casacore::WrapperBase< T >::WrapperBase ( const WrapperBase< T > &  other)
private

Copy constructor and assignment (not implemented)

Member Function Documentation

§ eval()

template<class T >
virtual T casacore::WrapperBase< T >::eval ( typename Function< T >::FunctionArg  x,
const Vector< T > &  par 
) const
pure virtual

§ ndim()

template<class T >
virtual uInt casacore::WrapperBase< T >::ndim ( ) const
inlinevirtual

Get the dimensionality.

Definition at line 86 of file WrapperBase.h.

References casacore::WrapperBase< T >::ndim_p.

§ operator=()

template<class T >
WrapperBase<T>& casacore::WrapperBase< T >::operator= ( const WrapperBase< T > &  other)
private

Member Data Documentation

§ arg_p

template<class T >
Vector<T> casacore::WrapperBase< T >::arg_p
mutableprotected

§ ndim_p

template<class T >
uInt casacore::WrapperBase< T >::ndim_p
protected

The documentation for this class was generated from the following files: