Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FXAS21002 FXOS8700Q
FP2< R, A1, A2 > 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 | |
FP2 (R(*function)(A1, A2)=0) | |
Create a function pointer, attaching a static function. | |
template<typename T > | |
FP2 (T *object, R(T::*member)(A1, A2)) | |
Create a function pointer, attaching a member function. | |
void | attach (R(*function)(A1, A2)) |
Attach a static function. | |
template<typename T > | |
void | attach (T *object, R(T::*member)(A1, A2)) |
Attach a member function. | |
R | call (A1 a1, A2 a2) |
Call the attached static or member function. |
Detailed Description
template<typename R, typename A1, typename A2>
class FP2< R, A1, A2 >
A class for storing and calling a pointer to a static or member void function.
Definition at line 199 of file functionpointer.h.
Constructor & Destructor Documentation
FP2 | ( | R(*)(A1, A2) | function = 0 ) |
Create a function pointer, attaching a static function.
- Parameters:
-
function The void static function to attach (default is none).
Definition at line 205 of file functionpointer.h.
FP2 | ( | T * | object, |
R(T::*)(A1, A2) | member | ||
) |
Create a function pointer, attaching a member function.
- Parameters:
-
object The object pointer to invoke the member function on (the "this" pointer). member The address of the void member function to attach.
Definition at line 216 of file functionpointer.h.
Member Function Documentation
void attach | ( | R(*)(A1, A2) | function ) |
Attach a static function.
- Parameters:
-
function The void static function to attach (default is none).
Definition at line 224 of file functionpointer.h.
void attach | ( | T * | object, |
R(T::*)(A1, A2) | member | ||
) |
Attach a member function.
- Parameters:
-
object The object pointer to invoke the member function on (the "this" pointer). member The address of the void member function to attach.
Definition at line 235 of file functionpointer.h.
R call | ( | A1 | a1, |
A2 | a2 | ||
) |
Call the attached static or member function.
Definition at line 243 of file functionpointer.h.
Generated on Tue Jul 12 2022 20:21:05 by
