Nullary function object for bound unary global/static functions. More...
#include <function_objects.hpp>
Public Member Functions | |
BoundUnaryFreeFunction (R(*function)(A), A a) | |
Binds a unary function and creates a nullary function object. More... | |
R | operator() () |
This ensures any children objects are deleted correctly. More... | |
virtual | ~BoundUnaryFreeFunction () |
Public Member Functions inherited from ecl::NullaryFunction< R > | |
virtual | ~NullaryFunction () |
Private Attributes | |
A | argument |
R(* | free_function )(A) |
Additional Inherited Members | |
Public Types inherited from ecl::NullaryFunction< R > | |
typedef R | result_type |
The result type. More... | |
Nullary function object for bound unary global/static functions.
Binds the argument to a unary global/static function and uses this to construct a nullary function object.
Usage:
Note, often the use of generateFunctionObject is simpler.
A | : the type of the argument to be bound. |
R | : the return type. |
Definition at line 292 of file function_objects.hpp.
|
inline |
Binds a unary function and creates a nullary function object.
Accepts both the function and a value for its single argument, binds them and creates a nullary function object.
function | : the unary global/static function. |
a | : the argument to bind. |
Definition at line 303 of file function_objects.hpp.
|
inlinevirtual |
Definition at line 304 of file function_objects.hpp.
|
inlinevirtual |
This ensures any children objects are deleted correctly.
A nullary function object call.
Redirects the function object call to the bound global/static function.
Implements ecl::NullaryFunction< R >.
Definition at line 312 of file function_objects.hpp.
|
private |
Definition at line 316 of file function_objects.hpp.
|
private |
Definition at line 315 of file function_objects.hpp.