Loading...
Searching...
No Matches
casacore::WrapperBase< T > Class Template Referenceabstract
Functionals_module_internal_classes

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)

## 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

- FunctionWrapper class
- WrapperData class

### 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);
casacore::FunctionWrapper
Definition FunctionWrapper.h:84
casacore::Vector
Definition Vector.h:82
casacore::Float
float Float
Definition aipstype.h:52

Definition at line 64 of file WrapperBase.h.

## Constructor & Destructor Documentation

## WrapperBase() [1/3]

template<class T>

casacore::WrapperBase< T >::WrapperBase | ( |  | ) |

inline

Default constructor: zero dimension.

Definition at line 68 of file WrapperBase.h.

References arg_p, and ndim_p.

Referenced by operator=(), casacore::WrapperData_FF< T, T, T, False, False >::operator=(), casacore::WrapperData_FT< T, T, T, False, True >::operator=(), casacore::WrapperData_FV< T, T, Vector< T >, False, True >::operator=(), casacore::WrapperData_TF< T, T, T, True, False >::operator=(), casacore::WrapperData_TT< T, T, T, True, True >::operator=(), casacore::WrapperData_TV< T, T, Vector< T >, True, True >::operator=(), casacore::WrapperData_VF< T, Vector< T >, T, True, False >::operator=(), casacore::WrapperData_VT< T, Vector< T >, T, True, True >::operator=(), casacore::WrapperData_VV< T, Vector< T >, Vector< T >, True, True >::operator=(), WrapperBase(), casacore::WrapperData_FF< T, T, T, False, False >::WrapperData_FF(), casacore::WrapperData_FT< T, T, T, False, True >::WrapperData_FT(), casacore::WrapperData_FV< T, T, Vector< T >, False, True >::WrapperData_FV(), casacore::WrapperData_TF< T, T, T, True, False >::WrapperData_TF(), casacore::WrapperData_TT< T, T, T, True, True >::WrapperData_TT(), casacore::WrapperData_TV< T, T, Vector< T >, True, True >::WrapperData_TV(), casacore::WrapperData_VF< T, Vector< T >, T, True, False >::WrapperData_VF(), casacore::WrapperData_VT< T, Vector< T >, T, True, True >::WrapperData_VT(), and casacore::WrapperData_VV< T, Vector< T >, Vector< T >, True, True >::WrapperData_VV().

## WrapperBase() [2/3]

template<class T>

casacore::WrapperBase< T >::WrapperBase | ( | const uInt | dim | ) |

inline explicit

Standard constructor.

Definition at line 70 of file WrapperBase.h.

References arg_p, and ndim_p.

## ~WrapperBase()

template<class T>

virtual casacore::WrapperBase< T >::~WrapperBase | ( |  | ) |

inline virtual

Destructor.

Definition at line 73 of file WrapperBase.h.

## WrapperBase() [3/3]

template<class T>

casacore::WrapperBase< T >::WrapperBase | ( | const WrapperBase< T > & | other | ) |

private

Copy constructor and assignment (not implemented).

References WrapperBase().

## 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

Evaluate the function at x.

Implemented in casacore::WrapperData_FF< T, T, T, False, False >, casacore::WrapperData_FT< T, T, T, False, True >, casacore::WrapperData_FV< T, T, Vector< T >, False, True >, casacore::WrapperData_TF< T, T, T, True, False >, casacore::WrapperData_TT< T, T, T, True, True >, casacore::WrapperData_TV< T, T, Vector< T >, True, True >, casacore::WrapperData_VF< T, Vector< T >, T, True, False >, casacore::WrapperData_VT< T, Vector< T >, T, True, True >, and casacore::WrapperData_VV< T, Vector< T >, Vector< T >, True, True >.

## ndim()

template<class T>

virtual uInt casacore::WrapperBase< T >::ndim | ( |  | ) | const

inline virtual

Get the dimensionality.

Definition at line 84 of file WrapperBase.h.

References ndim_p.

## operator=()

template<class T>

WrapperBase< T > & casacore::WrapperBase< T >::operator= | ( | const WrapperBase< T > & | other | ) |

private

References WrapperBase().

## Member Data Documentation

## arg_p

template<class T>

Vector<T> casacore::WrapperBase< T >::arg_p

mutable protected

Vector argument interface.

Definition at line 91 of file WrapperBase.h.

Referenced by casacore::WrapperData_VF< T, Vector< T >, T, True, False >::eval(), casacore::WrapperData_VT< T, Vector< T >, T, True, True >::eval(), casacore::WrapperData_VV< T, Vector< T >, Vector< T >, True, True >::eval(), casacore::WrapperData_FF< T, T, T, False, False >::operator=(), casacore::WrapperData_FT< T, T, T, False, True >::operator=(), casacore::WrapperData_FV< T, T, Vector< T >, False, True >::operator=(), casacore::WrapperData_TF< T, T, T, True, False >::operator=(), casacore::WrapperData_TT< T, T, T, True, True >::operator=(), casacore::WrapperData_TV< T, T, Vector< T >, True, True >::operator=(), casacore::WrapperData_VF< T, Vector< T >, T, True, False >::operator=(), casacore::WrapperData_VT< T, Vector< T >, T, True, True >::operator=(), casacore::WrapperData_VV< T, Vector< T >, Vector< T >, True, True >::operator=(), WrapperBase(), and WrapperBase().

## ndim_p

template<class T>

uInt casacore::WrapperBase< T >::ndim_p

protected

Dimensionality.

Definition at line 89 of file WrapperBase.h.

Referenced by casacore::WrapperData_VF< T, Vector< T >, T, True, False >::eval(), casacore::WrapperData_VT< T, Vector< T >, T, True, True >::eval(), casacore::WrapperData_VV< T, Vector< T >, Vector< T >, True, True >::eval(), ndim(), casacore::WrapperData_FF< T, T, T, False, False >::operator=(), casacore::WrapperData_FT< T, T, T, False, True >::operator=(), casacore::WrapperData_FV< T, T, Vector< T >, False, True >::operator=(), casacore::WrapperData_TF< T, T, T, True, False >::operator=(), casacore::WrapperData_TT< T, T, T, True, True >::operator=(), casacore::WrapperData_TV< T, T, Vector< T >, True, True >::operator=(), casacore::WrapperData_VF< T, Vector< T >, T, True, False >::operator=(), casacore::WrapperData_VT< T, Vector< T >, T, True, True >::operator=(), casacore::WrapperData_VV< T, Vector< T >, Vector< T >, True, True >::operator=(), WrapperBase(), and WrapperBase().

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

- scimath/Functionals/FunctionWrapper.h
- scimath/Functionals/WrapperBase.h