Binary function object for partially bound binary member functions. More...
#include <function_objects.hpp>
Public Member Functions | |
R | operator() (A a, B b) |
This ensures any children objects are deleted correctly. | |
PartiallyBoundBinaryMemberFunction (R(C::*function)(A, B), C &class_object) | |
Binds a binary member function and creates a binary function object. | |
virtual | ~PartiallyBoundBinaryMemberFunction () |
Private Attributes | |
C & | member_class |
void(C::* | member_function )(A, B) |
Binary function object for partially bound binary member functions.
Binds the class instance but not the arguments for a binary member function and uses this to construct a binary function object.
Usage:
class A { public: void f(int i, string n) { //... } int main() { A a; PartiallyBoundBinaryMemberFunction<A,int,string,void> function_object(&A::f,a); function_object(1,"dude"); }
C | : the member function's class type. |
A | : the member function's first argument type. |
B | : the member function's second argument type. |
R | : the return type. |
Definition at line 807 of file function_objects.hpp.
ecl::PartiallyBoundBinaryMemberFunction< C, A, B, R >::PartiallyBoundBinaryMemberFunction | ( | R(C::*)(A, B) | function, |
C & | class_object | ||
) | [inline] |
Binds a binary member function and creates a binary function object.
Accepts the function, class instance only (not the arguments), binds them and creates a binary function object.
function | : the unary global/static function. |
class_object | : the member function's class instance. |
Definition at line 817 of file function_objects.hpp.
virtual ecl::PartiallyBoundBinaryMemberFunction< C, A, B, R >::~PartiallyBoundBinaryMemberFunction | ( | ) | [inline, virtual] |
Definition at line 821 of file function_objects.hpp.
R ecl::PartiallyBoundBinaryMemberFunction< C, A, B, R >::operator() | ( | A | a, |
B | b | ||
) | [inline, virtual] |
This ensures any children objects are deleted correctly.
A binary function object call.
Redirects the binary function object call to the bound member function.
a | : the first argument passed to the function (type A). |
b | : the second argument passed to the function (type B). |
Implements ecl::BinaryFunction< A, B, R >.
Definition at line 831 of file function_objects.hpp.
C& ecl::PartiallyBoundBinaryMemberFunction< C, A, B, R >::member_class [private] |
Definition at line 835 of file function_objects.hpp.
void(C::* ecl::PartiallyBoundBinaryMemberFunction< C, A, B, R >::member_function)(A, B) [private] |
Definition at line 836 of file function_objects.hpp.