Template Class NullaryFreeFunction

Inheritance Relationships

Base Type

Class Documentation

template<typename R = void>
class NullaryFreeFunction : public ecl::NullaryFunction<void>

Nullary function object for void global/static functions.

Creates a function object from a void global/static function.

See also

ecl::utilities::NullaryFreeFunction<void>, generateFunctionObject, FunctionObjects.

Template Parameters:

R – : the return type.

Public Functions

inline NullaryFreeFunction(R (*function)())

Nullary function object constructor for global/static functions with no args.

Accepts a global/static function with no args and builds the function object around it.

Parameters:

function – : the global/static function.

inline virtual ~NullaryFreeFunction()
inline virtual R operator()()

This ensures any children objects are deleted correctly.

A nullary function object call.

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

Returns:

R : the function’s return value.