mbed library sources
Fork of mbed-src by
FunctionPointerArg1< R, void > Class Template Reference
A class for storing and calling a pointer to a static or member function (R ()(void)) More...
#include <FunctionPointer.h>
Public Member Functions | |
FunctionPointerArg1 (R(*function)(void)=0) | |
Create a FunctionPointer, attaching a static function. | |
template<typename T > | |
FunctionPointerArg1 (T *object, R(T::*member)(void)) | |
Create a FunctionPointer, attaching a member function. | |
void | attach (R(*function)(void)) |
Attach a static function. | |
template<typename T > | |
void | attach (T *object, R(T::*member)(void)) |
Attach a member function. | |
R | call () |
Call the attached static or member function. | |
Data Fields | |
R(*)() | get_function () |
Get registered static function. |
Detailed Description
template<typename R>
class mbed::FunctionPointerArg1< R, void >
A class for storing and calling a pointer to a static or member function (R ()(void))
Definition at line 114 of file FunctionPointer.h.
Constructor & Destructor Documentation
FunctionPointerArg1 | ( | R(*)(void) | function = 0 ) |
Create a FunctionPointer, attaching a static function.
- Parameters:
-
function The static function to attach (default is none)
Definition at line 120 of file FunctionPointer.h.
FunctionPointerArg1 | ( | T * | object, |
R(T::*)(void) | member | ||
) |
Create a FunctionPointer, attaching a member function.
- Parameters:
-
object The object pointer to invoke the member function on (i.e. the this pointer) function The address of the void member function to attach
Definition at line 130 of file FunctionPointer.h.
Member Function Documentation
void attach | ( | R(*)(void) | function ) |
Attach a static function.
- Parameters:
-
function The void static function to attach (default is none)
Definition at line 138 of file FunctionPointer.h.
void attach | ( | T * | object, |
R(T::*)(void) | member | ||
) |
Attach a member function.
- Parameters:
-
object The object pointer to invoke the member function on (i.e. the this pointer) function The address of the void member function to attach
Definition at line 149 of file FunctionPointer.h.
R call | ( | void | ) |
Call the attached static or member function.
Definition at line 157 of file FunctionPointer.h.
Field Documentation
R(*)() get_function() |
Get registered static function.
Definition at line 168 of file FunctionPointer.h.
Generated on Tue Jul 12 2022 20:47:29 by 1.7.2