Creates a unary function from a reference wrapper. More...
#include <function_objects.hpp>
Public Member Functions | |
Result | operator() (T t) |
This ensures any children objects are deleted correctly. | |
UnaryFunctionReference (const ReferenceWrapper< FunctionObject > &wrapper) | |
Creates a UnaryFunction descendant from a reference wrapper. | |
virtual | ~UnaryFunctionReference () |
Private Attributes | |
FunctionObject & | function_object |
Creates a unary function from a reference wrapper.
Takes a reference wrapper containing a unary function (strictly by definition) object reference and creates a UnaryFunction descendant. This is useful in utilising the inheritance from UnaryFunction (needed for slots and similar classes).
FunctionObject | : type of the function object to be referenced. |
Result | : the return type of the unary function. |
Definition at line 1034 of file function_objects.hpp.
ecl::UnaryFunctionReference< FunctionObject, T, Result >::UnaryFunctionReference | ( | const ReferenceWrapper< FunctionObject > & | wrapper | ) | [inline, explicit] |
Creates a UnaryFunction descendant from a reference wrapper.
Creates a UnaryFunction descendant by reference (not copying).
wrapper | : the reference wrapper holding the unary function object to be referenced. |
Definition at line 1044 of file function_objects.hpp.
virtual ecl::UnaryFunctionReference< FunctionObject, T, Result >::~UnaryFunctionReference | ( | ) | [inline, virtual] |
Definition at line 1048 of file function_objects.hpp.
Result ecl::UnaryFunctionReference< FunctionObject, T, Result >::operator() | ( | T | t | ) | [inline, virtual] |
This ensures any children objects are deleted correctly.
The unary function object call.
Redirects the call to the referenced unary function object call.
Implements ecl::UnaryFunction< T, Result >.
Definition at line 1056 of file function_objects.hpp.
FunctionObject& ecl::UnaryFunctionReference< FunctionObject, T, Result >::function_object [private] |
Definition at line 1059 of file function_objects.hpp.