Unary function object for member functions without arguments. More...
#include <function_objects.hpp>
Public Member Functions | |
NullaryMemberFunction (R(C::*function)()) | |
Unary function object constructor for member functions without arguments. | |
R | operator() (C &class_object) |
This ensures any children objects are deleted correctly. | |
virtual | ~NullaryMemberFunction () |
Private Attributes | |
R(C::* | member_function )() |
Unary function object for member functions without arguments.
Creates a function object from a member function without arguments (note, the single argument to this unary function object is the class instance itself).
Usage:
class A { public: void f() { //... } }; int main() { A a; NullaryMemberFunction<A,void> function_object(&A::f); function_object(a); }
C | : the member function's class type type. |
R | : the return type. |
Definition at line 391 of file function_objects.hpp.
ecl::NullaryMemberFunction< C, R >::NullaryMemberFunction | ( | R(C::*)() | function | ) | [inline] |
Unary function object constructor for member functions without arguments.
Accepts a void member function, and builds the function object around it.
function | : a void member function. |
Definition at line 401 of file function_objects.hpp.
virtual ecl::NullaryMemberFunction< C, R >::~NullaryMemberFunction | ( | ) | [inline, virtual] |
Definition at line 402 of file function_objects.hpp.
R ecl::NullaryMemberFunction< C, R >::operator() | ( | C & | class_object | ) | [inline, virtual] |
This ensures any children objects are deleted correctly.
A unary function object call.
Uses the specified class instance to redirect the function call to the void member function.
class_object | : the member function's class instance. |
Implements ecl::UnaryFunction< C &, R >.
Definition at line 414 of file function_objects.hpp.
R(C::* ecl::NullaryMemberFunction< C, R >::member_function)() [private] |
Definition at line 418 of file function_objects.hpp.