Simulated product dispenser
Fork of mbed-cloud-workshop-connect-HTS221 by
FP1< R, A1 > Class Template Reference
A class for storing and calling a pointer to a static or member void function. More...
#include <functionpointer.h>
Public Member Functions | |
FP1 (R(*function)(A1)=0) | |
Create a function pointer, attaching a static function. | |
template<typename T > | |
FP1 (T *object, R(T::*member)(A1)) | |
Create a function pointeer, attaching a member function. | |
void | attach (R(*function)(A1)) |
Attach a static function. | |
template<typename T > | |
void | attach (T *object, R(T::*member)(A1)) |
Attach a member function. | |
R | call (A1 a) |
Call the attached static or member function. |
Detailed Description
template<typename R, typename A1>
class FP1< R, A1 >
A class for storing and calling a pointer to a static or member void function.
Definition at line 114 of file functionpointer.h.
Constructor & Destructor Documentation
FP1 | ( | R(*)(A1) | function = 0 ) |
Create a function pointer, attaching a static function.
- Parameters:
-
function The void static function to attach (default is none).
Definition at line 120 of file functionpointer.h.
FP1 | ( | T * | object, |
R(T::*)(A1) | member | ||
) |
Create a function pointeer, attaching a member function.
- Parameters:
-
object The object pointer to invoke the member function on (the "this" pointer). function The address of the void member function to attach.
Definition at line 131 of file functionpointer.h.
Member Function Documentation
void attach | ( | R(*)(A1) | function ) |
Attach a static function.
- Parameters:
-
function The void static function to attach (default is none).
Definition at line 139 of file functionpointer.h.
void attach | ( | T * | object, |
R(T::*)(A1) | member | ||
) |
Attach a member function.
- Parameters:
-
object The object pointer to invoke the member function on (the "this" pointer). function The address of the void member function to attach.
Definition at line 150 of file functionpointer.h.
R call | ( | A1 | a ) |
Call the attached static or member function.
Definition at line 158 of file functionpointer.h.
Generated on Tue Jul 12 2022 19:12:19 by 1.7.2