#include <MemberEncapsulateImpl.h>
Public Member Functions | |
| MEncapsulate (const F &function, PointerType &obj) | |
| TRet | operator() (VARIABLE_ARGS_IMPL) |
encapsulate an object and a member function in an functor
Example: you have an object with a member function, say float Clase::funcion(int), and you want to create a functor for this
Clase obj; MEncapsulate<Clase,float,int> me( &Clase::function,&obj );
or use the herlper function: makeMemberEncapsulate(&Class::execute,&obj )
The you can use the new object as a normal functor: float result = me( 5 );