MEL
Microthread & Execution library
mel::mpl::MEncapsulate< isConst, T, PointerType, TRet, VARIABLE_ARGS > Class Template Reference

#include <MemberEncapsulateImpl.h>

Inheritance diagram for mel::mpl::MEncapsulate< isConst, T, PointerType, TRet, VARIABLE_ARGS >:

Public Member Functions

 MEncapsulate (const F &function, PointerType &obj)
 
TRet operator() (VARIABLE_ARGS_IMPL)
 

Detailed Description

template<bool isConst, class T, class PointerType, class TRet, VARIABLE_ARGS>
class mel::mpl::MEncapsulate< isConst, T, PointerType, TRet, VARIABLE_ARGS >

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 );


The documentation for this class was generated from the following file: