Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
FunctionCaller< MethodDeclaration, ReturnType, ParamsList > Class Template Reference

Delegate function caller class. More...

#include <Delegate.h>

Inheritance diagram for FunctionCaller< MethodDeclaration, ReturnType, ParamsList >:
IDelegateCaller< ReturnType, ParamsList... >

Public Member Functions

 FunctionCaller (MethodDeclaration m)
 Instantiate a delegate function caller object. More...
 
ReturnType invoke (ParamsList...args)
 Invoke the delegate function. 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 MethodDeclaration, class ReturnType, typename... ParamsList>
class FunctionCaller< MethodDeclaration, ReturnType, ParamsList >

Delegate function caller class.

Constructor & Destructor Documentation

template<class MethodDeclaration , class ReturnType , typename... ParamsList>
FunctionCaller< MethodDeclaration, ReturnType, ParamsList >::FunctionCaller ( MethodDeclaration  m)
inline

Instantiate a delegate function caller object.

Parameters
mMethod declaration

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 MethodDeclaration , class ReturnType , typename... ParamsList>
ReturnType FunctionCaller< MethodDeclaration, ReturnType, ParamsList >::invoke ( ParamsList...  args)
inlinevirtual

Invoke the delegate function.

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

Implements IDelegateCaller< ReturnType, ParamsList... >.