Template Class NullaryFunctionReference

Inheritance Relationships

Base Type

Class Documentation

template<typename FunctionObject, typename Result = void>
class NullaryFunctionReference : public ecl::NullaryFunction<void>

Creates a nullary function from a reference wrapper.

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

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

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

Public Functions

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

Creates a NullaryFunction descendant from a reference wrapper.

Creates a NullaryFunction descendant by reference (not copying).

Parameters:

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

inline virtual ~NullaryFunctionReference()
inline virtual Result operator()()

This ensures any children objects are deleted correctly.

The nullary function object call.

Redirects the call to the referenced nullary function object call.

Returns:

R : the function’s return value.