Template Class NullaryFunctionCopy

Inheritance Relationships

Base Type

Class Documentation

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

Create a NullaryFunction object composited from an existing function object.

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

See also

FunctionObjects.

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

  • R – : the return type.

Public Functions

inline NullaryFunctionCopy(const FunctionObject &f_o)

NullaryFunction child constructor for nullary function objects.

Creates a child of the NullaryFunction class by copying a nullary function object (one that is purely by definition).

Parameters

f_o – : the function object to be assigned to the NullaryFunction child.

inline virtual ~NullaryFunctionCopy()
inline virtual Result operator()()

This ensures any children objects are deleted correctly.

The nullary function object call.

Redirects the call to the composited nullary function object call.

Returns

R : the function’s return value.