Mbed OS Reference
Loading...
Searching...
No Matches
Callback class

Data Structures

class  Callback< Signature >
 Callback class based on template specialization. More...
 
class  Callback< R(ArgTs...)>
 Callback class based on template specialization. More...
 

Functions

template<typename R , typename... ArgTs>
Callback< R(ArgTs...)> callback (R(*func)(ArgTs...)=nullptr) noexcept
 Create a callback class with type inferred from the arguments. More...
 
template<typename R , typename... ArgTs>
Callback< R(ArgTs...)> callback (const Callback< R(ArgTs...)> &func)
 Create a callback class with type inferred from the arguments. More...
 
template<typename R , typename... ArgTs>
Callback< R(ArgTs...)> callback (Callback< R(ArgTs...)> &&func) noexcept
 Create a callback class with type inferred from the arguments. More...
 
template<typename T , typename U , typename R , typename... ArgTs>
Callback< R(ArgTs...)> callback (U *obj, R(T::*method)(ArgTs...)) noexcept
 Create a callback class with type inferred from the arguments. More...
 
template<typename T , typename U , typename R , typename... ArgTs>
Callback< R(ArgTs...)> callback (R(*func)(T *, ArgTs...), U *arg) noexcept
 Create a callback class with type inferred from the arguments. More...
 
template<typename F >
Callback< detail::unqualify_fn_t< detail::member_type_t< decltype(&mstd::remove_cvref_t< F >::operator())> > > callback (F &&f)
 Create a Create a callback class with type inferred from the arguments. More...
 

Detailed Description

Function Documentation

◆ callback() [1/6]

Callback< R(ArgTs...)> callback ( R(*)(ArgTs...)  func = nullptr)
noexcept

Create a callback class with type inferred from the arguments.

Parameters
funcStatic function to attach
Returns
Callback with inferred type

Definition at line 678 of file Callback.h.

◆ callback() [2/6]

Callback< R(ArgTs...)> callback ( const Callback< R(ArgTs...)> &  func)

Create a callback class with type inferred from the arguments.

Parameters
funcStatic function to attach
Returns
Callback with inferred type

Definition at line 689 of file Callback.h.

◆ callback() [3/6]

Callback< R(ArgTs...)> callback ( Callback< R(ArgTs...)> &&  func)
noexcept

Create a callback class with type inferred from the arguments.

Parameters
funcStatic function to attach
Returns
Callback with inferred type

Definition at line 700 of file Callback.h.

◆ callback() [4/6]

Callback< R(ArgTs...)> callback ( U *  obj,
R(T::*)(ArgTs...)  method 
)
noexcept

Create a callback class with type inferred from the arguments.

Parameters
objOptional pointer to object to bind to function
methodMember function to attach
Returns
Callback with inferred type

Definition at line 712 of file Callback.h.

◆ callback() [5/6]

Callback< R(ArgTs...)> callback ( R(*)(T *, ArgTs...)  func,
U *  arg 
)
noexcept

Create a callback class with type inferred from the arguments.

Parameters
funcStatic function to attach
argPointer argument to function
Returns
Callback with inferred type

Definition at line 766 of file Callback.h.

◆ callback() [6/6]

Callback< detail::unqualify_fn_t< detail::member_type_t< decltype(&mstd::remove_cvref_t< F >::operator())> > > callback ( F &&  f)

Create a Create a callback class with type inferred from the arguments.

Parameters
fFunction object to attach
Note
The function object is limited to a single word of storage

Definition at line 795 of file Callback.h.