Template Class UnaryFreeFunction

Inheritance Relationships

Base Type

Class Documentation

template<typename A, typename R = void>
class UnaryFreeFunction : public ecl::UnaryFunction<A, void>

Unary function object for global/static functions.

Creates a function object from a global/static function with a single argument.

See also

generateFunctionObject

See also

FunctionObjects.

Template Parameters:
  • A – : the argument type.

  • R – : the return type.

Public Functions

inline UnaryFreeFunction(R (*function)(A))

Unary function object constructor for global/static functions.

Accepts a global/static function with a single argument and builds the function object around it.

Parameters:

function – : a global/static function with a single argument.

inline virtual ~UnaryFreeFunction()
inline virtual R operator()(A a)

This ensures any children objects are deleted correctly.

A unary function object call.

Redirects the unary function object call to the composited global/static function.

Returns:

R : the function’s return value.