Fork of mbed-dev build 137, last build before FAT file system appears to be broken. Also reduced HSE timeout time in STM4XX HAL
Fork of mbed-dev by
Callback< R()> Class Template Reference
[Platform]
Callback class based on template specialization. More...
#include <Callback.h>
Inherited by FunctionPointerArg1< R, void >.
Public Member Functions | |
Callback (R(*func)()=0) | |
Create a Callback with a static function. | |
Callback (const Callback< R()> &func) | |
Attach a Callback. | |
template<typename T , typename U > | |
Callback (U *obj, R(T::*method)()) | |
Create a Callback with a member function. | |
template<typename T , typename U > | |
Callback (const U *obj, R(T::*method)() const) | |
Create a Callback with a member function. | |
template<typename T , typename U > | |
Callback (volatile U *obj, R(T::*method)() volatile) | |
Create a Callback with a member function. | |
template<typename T , typename U > | |
Callback (const volatile U *obj, R(T::*method)() const volatile) | |
Create a Callback with a member function. | |
template<typename T , typename U > | |
Callback (R(*func)(T *), U *arg) | |
Create a Callback with a static function and bound pointer. | |
template<typename T , typename U > | |
Callback (R(*func)(const T *), const U *arg) | |
Create a Callback with a static function and bound pointer. | |
template<typename T , typename U > | |
Callback (R(*func)(volatile T *), volatile U *arg) | |
Create a Callback with a static function and bound pointer. | |
template<typename T , typename U > | |
Callback (R(*func)(const volatile T *), const volatile U *arg) | |
Create a Callback with a static function and bound pointer. | |
template<typename F > | |
Callback (F f, typename detail::enable_if< detail::is_type< R(F::*)(),&F::operator()>::value &&sizeof(F)<=sizeof(uintptr_t) >::type=detail::nil()) | |
Create a Callback with a function object. | |
template<typename F > | |
Callback (const F f, typename detail::enable_if< detail::is_type< R(F::*)() const,&F::operator()>::value &&sizeof(F)<=sizeof(uintptr_t) >::type=detail::nil()) | |
Create a Callback with a function object. | |
template<typename F > | |
Callback (volatile F f, typename detail::enable_if< detail::is_type< R(F::*)() volatile,&F::operator()>::value &&sizeof(F)<=sizeof(uintptr_t) >::type=detail::nil()) | |
Create a Callback with a function object. | |
template<typename F > | |
Callback (const volatile F f, typename detail::enable_if< detail::is_type< R(F::*)() const volatile,&F::operator()>::value &&sizeof(F)<=sizeof(uintptr_t) >::type=detail::nil()) | |
Create a Callback with a function object. | |
template<typename T , typename U > | |
MBED_DEPRECATED_SINCE ("mbed-os-5.1","Arguments to callback have been reordered to Callback(func, arg)") Callback(U *obj | |
Create a Callback with a static function and bound pointer. | |
template<typename T , typename U > | |
MBED_DEPRECATED_SINCE ("mbed-os-5.1","Arguments to callback have been reordered to Callback(func, arg)") Callback(const U *obj | |
Create a Callback with a static function and bound pointer. | |
template<typename T , typename U > | |
MBED_DEPRECATED_SINCE ("mbed-os-5.1","Arguments to callback have been reordered to Callback(func, arg)") Callback(volatile U *obj | |
Create a Callback with a static function and bound pointer. | |
template<typename T , typename U > | |
MBED_DEPRECATED_SINCE ("mbed-os-5.1","Arguments to callback have been reordered to Callback(func, arg)") Callback(const volatile U *obj | |
Create a Callback with a static function and bound pointer. | |
~Callback () | |
Destroy a callback. | |
void | attach (R(*func)()) |
Attach a static function. | |
void | attach (const Callback< R()> &func) |
Attach a Callback. | |
template<typename T , typename U > | |
void | attach (U *obj, R(T::*method)()) |
Attach a member function. | |
template<typename T , typename U > | |
void | attach (const U *obj, R(T::*method)() const) |
Attach a member function. | |
template<typename T , typename U > | |
void | attach (volatile U *obj, R(T::*method)() volatile) |
Attach a member function. | |
template<typename T , typename U > | |
void | attach (const volatile U *obj, R(T::*method)() const volatile) |
Attach a member function. | |
template<typename T , typename U > | |
void | attach (R(*func)(T *), U *arg) |
Attach a static function with a bound pointer. | |
template<typename T , typename U > | |
void | attach (R(*func)(const T *), const U *arg) |
Attach a static function with a bound pointer. | |
template<typename T , typename U > | |
void | attach (R(*func)(volatile T *), volatile U *arg) |
Attach a static function with a bound pointer. | |
template<typename T , typename U > | |
void | attach (R(*func)(const volatile T *), const volatile U *arg) |
Attach a static function with a bound pointer. | |
template<typename F > | |
void | attach (F f, typename detail::enable_if< detail::is_type< R(F::*)(),&F::operator()>::value &&sizeof(F)<=sizeof(uintptr_t) >::type=detail::nil()) |
Attach a function object. | |
template<typename F > | |
void | attach (const F f, typename detail::enable_if< detail::is_type< R(F::*)() const,&F::operator()>::value &&sizeof(F)<=sizeof(uintptr_t) >::type=detail::nil()) |
Attach a function object. | |
template<typename F > | |
void | attach (volatile F f, typename detail::enable_if< detail::is_type< R(F::*)() volatile,&F::operator()>::value &&sizeof(F)<=sizeof(uintptr_t) >::type=detail::nil()) |
Attach a function object. | |
template<typename F > | |
void | attach (const volatile F f, typename detail::enable_if< detail::is_type< R(F::*)() const volatile,&F::operator()>::value &&sizeof(F)<=sizeof(uintptr_t) >::type=detail::nil()) |
Attach a function object. | |
template<typename T , typename U > | |
MBED_DEPRECATED_SINCE ("mbed-os-5.1","Arguments to callback have been reordered to attach(func, arg)") void attach(U *obj | |
Attach a static function with a bound pointer. | |
template<typename T , typename U > | |
MBED_DEPRECATED_SINCE ("mbed-os-5.1","Arguments to callback have been reordered to attach(func, arg)") void attach(const U *obj | |
Attach a static function with a bound pointer. | |
template<typename T , typename U > | |
MBED_DEPRECATED_SINCE ("mbed-os-5.1","Arguments to callback have been reordered to attach(func, arg)") void attach(volatile U *obj | |
Attach a static function with a bound pointer. | |
template<typename T , typename U > | |
MBED_DEPRECATED_SINCE ("mbed-os-5.1","Arguments to callback have been reordered to attach(func, arg)") void attach(const volatile U *obj | |
Attach a static function with a bound pointer. | |
Callback & | operator= (const Callback &that) |
Assign a callback. | |
R | call () const |
Call the attached function. | |
R | operator() () const |
Call the attached function. | |
operator bool () const | |
Test if function has been attached. | |
Static Public Member Functions | |
static R | thunk (void *func) |
Static thunk for passing as C-style function. | |
Friends | |
bool | operator== (const Callback &l, const Callback &r) |
Test for equality. | |
bool | operator!= (const Callback &l, const Callback &r) |
Test for inequality. |
Detailed Description
template<typename R>
class mbed::Callback< R()>
Callback class based on template specialization.
Synchronization level: Not protected
Definition at line 66 of file Callback.h.
Constructor & Destructor Documentation
Callback | ( | R(*)() | func = 0 ) |
Create a Callback with a static function.
- Parameters:
-
func Static function to attach
Definition at line 71 of file Callback.h.
Callback | ( | const F | f ) |
Create a Callback with a function object.
- Parameters:
-
func Function object to attach
- Note:
- The function object is limited to a single word of storage
Definition at line 178 of file Callback.h.
Callback | ( | volatile F | f ) |
Create a Callback with a function object.
- Parameters:
-
func Function object to attach
- Note:
- The function object is limited to a single word of storage
Definition at line 190 of file Callback.h.
Callback | ( | const volatile F | f ) |
Create a Callback with a function object.
- Parameters:
-
func Function object to attach
- Note:
- The function object is limited to a single word of storage
Definition at line 202 of file Callback.h.
Member Function Documentation
void attach | ( | const F | f ) |
Attach a function object.
- Parameters:
-
func Function object to attach
- Note:
- The function object is limited to a single word of storage
Definition at line 383 of file Callback.h.
void attach | ( | volatile F | f ) |
Attach a function object.
- Parameters:
-
func Function object to attach
- Note:
- The function object is limited to a single word of storage
Definition at line 396 of file Callback.h.
void attach | ( | const volatile F | f ) |
Attach a function object.
- Parameters:
-
func Function object to attach
- Note:
- The function object is limited to a single word of storage
Definition at line 409 of file Callback.h.
Generated on Tue Jul 12 2022 20:32:36 by 1.7.2