Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
MethodCaller< ReturnType(ClassType::*)(ParamsList...)> Class Template Reference

Delegate method caller class. More...

#include <Delegate.h>

Inheritance diagram for MethodCaller< ReturnType(ClassType::*)(ParamsList...)>:
IDelegateCaller< ReturnType, ParamsList... >

Public Member Functions

 MethodCaller (ClassType *c, MethodDeclaration m)
 Instantiate a delegate method caller object. More...
 
ReturnType invoke (ParamsList...args)
 Invoke the delegate method. More...
 
__forceinline void increase ()
 Increase the quantity of delegate caller references by one. More...
 
__forceinline void decrease ()
 Decrease the quantity of delegate caller references by one. More...
 

Detailed Description

template<class ClassType, class ReturnType, typename... ParamsList>
class MethodCaller< ReturnType(ClassType::*)(ParamsList...)>

Delegate method caller class.

Constructor & Destructor Documentation

template<class ClassType , class ReturnType , typename... ParamsList>
MethodCaller< ReturnType(ClassType::*)(ParamsList...)>::MethodCaller ( ClassType *  c,
MethodDeclaration  m 
)
inline

Instantiate a delegate method caller object.

Parameters
cPointer to the method class type
mDeclaration of the method

Member Function Documentation

__forceinline void IDelegateCaller< ReturnType, ParamsList >::decrease ( )
inlineinherited

Decrease the quantity of delegate caller references by one.

Note
If no references remain the delegate caller object is deleted
__forceinline void IDelegateCaller< ReturnType, ParamsList >::increase ( )
inlineinherited

Increase the quantity of delegate caller references by one.

template<class ClassType , class ReturnType , typename... ParamsList>
ReturnType MethodCaller< ReturnType(ClassType::*)(ParamsList...)>::invoke ( ParamsList...  args)
inlinevirtual

Invoke the delegate method.

Parameters
argsThe delegate method parameters
Return values
ReturnTypeThe return value from the invoked method

Implements IDelegateCaller< ReturnType, ParamsList... >.