Template Class UnaryFunctionReference

Inheritance Relationships

Base Type

Class Documentation

template<typename FunctionObject, typename T, typename Result = void>
class UnaryFunctionReference : public ecl::UnaryFunction<T, void>

Creates a unary function from a reference wrapper.

Takes a reference wrapper containing a unary function (strictly by definition) object reference and creates a UnaryFunction descendant. This is useful in utilising the inheritance from UnaryFunction (needed for slots and similar classes).

See also

UnaryFunctionReference<FunctionObject,void>, FunctionObjects.

Template Parameters:
  • FunctionObject – : type of the function object to be referenced.

  • Result – : the return type of the unary function.

Public Functions

inline explicit UnaryFunctionReference(const ReferenceWrapper<FunctionObject> &wrapper)

Creates a UnaryFunction descendant from a reference wrapper.

Creates a UnaryFunction descendant by reference (not copying).

Parameters:

wrapper – : the reference wrapper holding the unary function object to be referenced.

inline virtual ~UnaryFunctionReference()
inline Result operator()(T t)

This ensures any children objects are deleted correctly.

The unary function object call.

Redirects the call to the referenced unary function object call.

Returns:

R : the function’s return value.