Nullary function object for bound nullary member functions. More...
#include <function_objects.hpp>
Public Member Functions | |
BoundNullaryMemberFunction (R(C::*function)(), C &class_object) | |
Binds a unary member function and creates a nullary function object. | |
R | operator() () |
This ensures any children objects are deleted correctly. | |
virtual | ~BoundNullaryMemberFunction () |
Private Attributes | |
C & | member_class |
R(C::* | member_function )() |
Nullary function object for bound nullary member functions.
Binds the class instance for a nullary member function and uses this to construct a nullary function object.
Usage:
class A { public: void f() { //... } int main() { A a; BoundNullaryMemberFunction<A,void> function_object(&A::f,a); function_object(); }
C | : the member function's class type. |
R | : the return type. |
Definition at line 586 of file function_objects.hpp.
ecl::BoundNullaryMemberFunction< C, R >::BoundNullaryMemberFunction | ( | R(C::*)() | function, |
C & | class_object | ||
) | [inline] |
Binds a unary member function and creates a nullary function object.
Accepts the function pointer and class instance, binds them and creates a nullary function object.
function | : the void member function. |
class_object | : the member function's class instance. |
Definition at line 596 of file function_objects.hpp.
virtual ecl::BoundNullaryMemberFunction< C, R >::~BoundNullaryMemberFunction | ( | ) | [inline, virtual] |
Definition at line 600 of file function_objects.hpp.
R ecl::BoundNullaryMemberFunction< C, R >::operator() | ( | ) | [inline, virtual] |
This ensures any children objects are deleted correctly.
A nullary function object call.
Redirects the nullary function object call to the bound member function.
Implements ecl::NullaryFunction< R >.
Definition at line 609 of file function_objects.hpp.
C& ecl::BoundNullaryMemberFunction< C, R >::member_class [private] |
Definition at line 612 of file function_objects.hpp.
R(C::* ecl::BoundNullaryMemberFunction< C, R >::member_function)() [private] |
Definition at line 613 of file function_objects.hpp.