mbed library sources. Supersedes mbed-src.
Dependents: LPCXpresso1769_blinky
Fork of mbed-dev by
Callback< R(A0, A1, A2, A3)> Class Template Reference
Templated function class. More...
#include <Callback.h>
Public Member Functions | |
Callback (R(*func)(A0, A1, A2, A3)=0) | |
Create a Callback with a static function. | |
template<typename T > | |
Callback (T *obj, R(*func)(T *, A0, A1, A2, A3)) | |
Create a Callback with a static function and bound pointer. | |
template<typename T > | |
Callback (T *obj, R(T::*func)(A0, A1, A2, A3)) | |
Create a Callback with a member function. | |
Callback (const Callback< R(A0, A1, A2, A3)> &func) | |
Create a Callback with another Callback. | |
void | attach (R(*func)(A0, A1, A2, A3)) |
Attach a static function. | |
template<typename T > | |
void | attach (T *obj, R(*func)(T *, A0, A1, A2, A3)) |
Attach a static function with a bound pointer. | |
template<typename T > | |
void | attach (T *obj, R(T::*func)(A0, A1, A2, A3)) |
Attach a member function. | |
void | attach (const Callback< R(A0, A1, A2, A3)> &func) |
Attach a Callback. | |
R | call (A0 a0, A1 a1, A2 a2, A3 a3) |
Call the attached function. | |
R | operator() (A0 a0, A1 a1, A2 a2, A3 a3) |
Call the attached function. | |
operator bool () const | |
Test if function has been attached. | |
Static Public Member Functions | |
static R | thunk (void *func, A0 a0, A1 a1, A2 a2, A3 a3) |
Static thunk for passing as C-style function. |
Detailed Description
template<typename R, typename A0, typename A1, typename A2, typename A3>
class mbed::Callback< R(A0, A1, A2, A3)>
Templated function class.
Definition at line 176 of file Callback.h.
Constructor & Destructor Documentation
Callback | ( | R(*)(A0, A1, A2, A3) | func = 0 ) |
Create a Callback with a static function.
- Parameters:
-
func Static function to attach
Definition at line 181 of file Callback.h.
Callback | ( | T * | obj, |
R(*)(T *, A0, A1, A2, A3) | func | ||
) |
Create a Callback with a static function and bound pointer.
- Parameters:
-
obj Pointer to object to bind to function func Static function to attach
Definition at line 190 of file Callback.h.
Callback | ( | T * | obj, |
R(T::*)(A0, A1, A2, A3) | func | ||
) |
Create a Callback with a member function.
- Parameters:
-
obj Pointer to object to invoke member function on func Member function to attach
Definition at line 199 of file Callback.h.
Callback | ( | const Callback< R(A0, A1, A2, A3)> & | func ) |
Create a Callback with another Callback.
- Parameters:
-
func Callback to attach
Definition at line 206 of file Callback.h.
Member Function Documentation
void attach | ( | R(*)(A0, A1, A2, A3) | func ) |
Attach a static function.
- Parameters:
-
func Static function to attach
Definition at line 213 of file Callback.h.
void attach | ( | T * | obj, |
R(*)(T *, A0, A1, A2, A3) | func | ||
) |
Attach a static function with a bound pointer.
- Parameters:
-
obj Pointer to object to bind to function func Static function to attach
Definition at line 223 of file Callback.h.
void attach | ( | const Callback< R(A0, A1, A2, A3)> & | func ) |
Attach a Callback.
- Parameters:
-
func The Callback to attach
Definition at line 243 of file Callback.h.
void attach | ( | T * | obj, |
R(T::*)(A0, A1, A2, A3) | func | ||
) |
Attach a member function.
- Parameters:
-
obj Pointer to object to invoke member function on func Member function to attach
Definition at line 234 of file Callback.h.
R call | ( | A0 | a0, |
A1 | a1, | ||
A2 | a2, | ||
A3 | a3 | ||
) |
Call the attached function.
Definition at line 251 of file Callback.h.
operator bool | ( | ) | const |
Test if function has been attached.
Definition at line 266 of file Callback.h.
R operator() | ( | A0 | a0, |
A1 | a1, | ||
A2 | a2, | ||
A3 | a3 | ||
) |
Call the attached function.
Definition at line 260 of file Callback.h.
static R thunk | ( | void * | func, |
A0 | a0, | ||
A1 | a1, | ||
A2 | a2, | ||
A3 | a3 | ||
) | [static] |
Static thunk for passing as C-style function.
- Parameters:
-
func Callback to call passed as void pointer
Definition at line 273 of file Callback.h.
Generated on Tue Jul 12 2022 16:04:31 by 1.7.2