Creates a nullary function from a reference wrapper. More...
#include <function_objects.hpp>
Public Member Functions | |
NullaryFunctionReference (const ReferenceWrapper< FunctionObject > &wrapper) | |
Creates a NullaryFunction descendant from a reference wrapper. | |
Result | operator() () |
This ensures any children objects are deleted correctly. | |
virtual | ~NullaryFunctionReference () |
Private Attributes | |
FunctionObject & | function_object |
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).
FunctionObject | : type of the function object to be referenced. |
Result | : the return type of the nullary function. |
Definition at line 935 of file function_objects.hpp.
ecl::NullaryFunctionReference< FunctionObject, Result >::NullaryFunctionReference | ( | const ReferenceWrapper< FunctionObject > & | wrapper | ) | [inline, explicit] |
Creates a NullaryFunction descendant from a reference wrapper.
Creates a NullaryFunction descendant by reference (not copying).
wrapper | : the reference wrapper holding the nullary function object to be referenced. |
Definition at line 945 of file function_objects.hpp.
virtual ecl::NullaryFunctionReference< FunctionObject, Result >::~NullaryFunctionReference | ( | ) | [inline, virtual] |
Definition at line 948 of file function_objects.hpp.
Result ecl::NullaryFunctionReference< FunctionObject, Result >::operator() | ( | ) | [inline, virtual] |
This ensures any children objects are deleted correctly.
The nullary function object call.
Redirects the call to the referenced nullary function object call.
Implements ecl::NullaryFunction< Result >.
Definition at line 957 of file function_objects.hpp.
FunctionObject& ecl::NullaryFunctionReference< FunctionObject, Result >::function_object [private] |
Definition at line 960 of file function_objects.hpp.