Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Public Member Functions | Static Public Member Functions | Friends
mbed::Callback< R(A0, A1, A2, A3, A4)> Class Template Reference

#include <Callback.h>

Public Member Functions

 Callback (R(*func)(A0, A1, A2, A3, A4)=0)
 
 Callback (const Callback< R(A0, A1, A2, A3, A4)> &func)
 
template<typename T , typename U >
 Callback (U *obj, R(T::*method)(A0, A1, A2, A3, A4))
 
template<typename T , typename U >
 Callback (const U *obj, R(T::*method)(A0, A1, A2, A3, A4) const)
 
template<typename T , typename U >
 Callback (volatile U *obj, R(T::*method)(A0, A1, A2, A3, A4) volatile)
 
template<typename T , typename U >
 Callback (const volatile U *obj, R(T::*method)(A0, A1, A2, A3, A4) const volatile)
 
template<typename T , typename U >
 Callback (R(*func)(T *, A0, A1, A2, A3, A4), U *arg)
 
template<typename T , typename U >
 Callback (R(*func)(const T *, A0, A1, A2, A3, A4), const U *arg)
 
template<typename T , typename U >
 Callback (R(*func)(volatile T *, A0, A1, A2, A3, A4), volatile U *arg)
 
template<typename T , typename U >
 Callback (R(*func)(const volatile T *, A0, A1, A2, A3, A4), const volatile U *arg)
 
template<typename F >
 Callback (F f,)
 
template<typename F >
 Callback (const F f,)
 
template<typename F >
 Callback (volatile F f,)
 
template<typename F >
 Callback (const volatile F f,)
 
template<typename T , typename U >
 Callback (U *obj, R(*func)(T *, A0, A1, A2, A3, A4))
 
template<typename T , typename U >
 Callback (const U *obj, R(*func)(const T *, A0, A1, A2, A3, A4))
 
template<typename T , typename U >
 Callback (volatile U *obj, R(*func)(volatile T *, A0, A1, A2, A3, A4))
 
template<typename T , typename U >
 Callback (const volatile U *obj, R(*func)(const volatile T *, A0, A1, A2, A3, A4))
 
 ~Callback ()
 
void attach (R(*func)(A0, A1, A2, A3, A4))
 
void attach (const Callback< R(A0, A1, A2, A3, A4)> &func)
 
template<typename T , typename U >
void attach (U *obj, R(T::*method)(A0, A1, A2, A3, A4))
 
template<typename T , typename U >
void attach (const U *obj, R(T::*method)(A0, A1, A2, A3, A4) const)
 
template<typename T , typename U >
void attach (volatile U *obj, R(T::*method)(A0, A1, A2, A3, A4) volatile)
 
template<typename T , typename U >
void attach (const volatile U *obj, R(T::*method)(A0, A1, A2, A3, A4) const volatile)
 
template<typename T , typename U >
void attach (R(*func)(T *, A0, A1, A2, A3, A4), U *arg)
 
template<typename T , typename U >
void attach (R(*func)(const T *, A0, A1, A2, A3, A4), const U *arg)
 
template<typename T , typename U >
void attach (R(*func)(volatile T *, A0, A1, A2, A3, A4), volatile U *arg)
 
template<typename T , typename U >
void attach (R(*func)(const volatile T *, A0, A1, A2, A3, A4), const volatile U *arg)
 
template<typename F >
void attach (F f,)
 
template<typename F >
void attach (const F f,)
 
template<typename F >
void attach (volatile F f,)
 
template<typename F >
void attach (const volatile F f,)
 
template<typename T , typename U >
void attach (U *obj, R(*func)(T *, A0, A1, A2, A3, A4))
 
template<typename T , typename U >
void attach (const U *obj, R(*func)(const T *, A0, A1, A2, A3, A4))
 
template<typename T , typename U >
void attach (volatile U *obj, R(*func)(volatile T *, A0, A1, A2, A3, A4))
 
template<typename T , typename U >
void attach (const volatile U *obj, R(*func)(const volatile T *, A0, A1, A2, A3, A4))
 
Callbackoperator= (const Callback &that)
 
call (A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) const
 
operator() (A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) const
 
 operator bool () const
 

Static Public Member Functions

static R thunk (void *func, A0 a0, A1 a1, A2 a2, A3 a3, A4 a4)
 

Friends

bool operator== (const Callback &l, const Callback &r)
 
bool operator!= (const Callback &l, const Callback &r)
 

Detailed Description

template<typename R, typename A0, typename A1, typename A2, typename A3, typename A4>
class mbed::Callback< R(A0, A1, A2, A3, A4)>

Callback class based on template specialization

Note
Synchronization level: Not protected

Constructor & Destructor Documentation

template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( R(*)(A0, A1, A2, A3, A4)  func = 0)
inline

Create a Callback with a static function

Parameters
funcStatic function to attach
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( const Callback< R(A0, A1, A2, A3, A4)> &  func)
inline

Attach a Callback

Parameters
funcThe Callback to attach
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( U *  obj,
R(T::*)(A0, A1, A2, A3, A4)  method 
)
inline

Create a Callback with a member function

Parameters
objPointer to object to invoke member function on
methodMember function to attach
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( const U *  obj,
R(T::*)(A0, A1, A2, A3, A4) const  method 
)
inline

Create a Callback with a member function

Parameters
objPointer to object to invoke member function on
methodMember function to attach
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( volatile U *  obj,
R(T::*)(A0, A1, A2, A3, A4) volatile  method 
)
inline

Create a Callback with a member function

Parameters
objPointer to object to invoke member function on
methodMember function to attach
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( const volatile U *  obj,
R(T::*)(A0, A1, A2, A3, A4) const volatile  method 
)
inline

Create a Callback with a member function

Parameters
objPointer to object to invoke member function on
methodMember function to attach
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( R(*)(T *, A0, A1, A2, A3, A4)  func,
U *  arg 
)
inline

Create a Callback with a static function and bound pointer

Parameters
funcStatic function to attach
argPointer argument to function
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( R(*)(const T *, A0, A1, A2, A3, A4)  func,
const U *  arg 
)
inline

Create a Callback with a static function and bound pointer

Parameters
funcStatic function to attach
argPointer argument to function
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( R(*)(volatile T *, A0, A1, A2, A3, A4)  func,
volatile U *  arg 
)
inline

Create a Callback with a static function and bound pointer

Parameters
funcStatic function to attach
argPointer argument to function
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( R(*)(const volatile T *, A0, A1, A2, A3, A4)  func,
const volatile U *  arg 
)
inline

Create a Callback with a static function and bound pointer

Parameters
funcStatic function to attach
argPointer argument to function
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename F >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( f)
inline

Create a Callback with a function object

Parameters
fFunction object to attach
Note
The function object is limited to a single word of storage
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename F >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( const F  f)
inline

Create a Callback with a function object

Parameters
fFunction object to attach
Note
The function object is limited to a single word of storage
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename F >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( volatile F  f)
inline

Create a Callback with a function object

Parameters
fFunction object to attach
Note
The function object is limited to a single word of storage
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename F >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( const volatile F  f)
inline

Create a Callback with a function object

Parameters
fFunction object to attach
Note
The function object is limited to a single word of storage
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( U *  obj,
R(*)(T *, A0, A1, A2, A3, A4)  func 
)
inline

Create a Callback with a static function and bound pointer

Parameters
objPointer to object to bind to function
funcStatic function to attach
Deprecated:
Arguments to callback have been reordered to Callback(func, arg)
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( const U *  obj,
R(*)(const T *, A0, A1, A2, A3, A4)  func 
)
inline

Create a Callback with a static function and bound pointer

Parameters
objPointer to object to bind to function
funcStatic function to attach
Deprecated:
Arguments to callback have been reordered to Callback(func, arg)
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( volatile U *  obj,
R(*)(volatile T *, A0, A1, A2, A3, A4)  func 
)
inline

Create a Callback with a static function and bound pointer

Parameters
objPointer to object to bind to function
funcStatic function to attach
Deprecated:
Arguments to callback have been reordered to Callback(func, arg)
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
mbed::Callback< R(A0, A1, A2, A3, A4)>::Callback ( const volatile U *  obj,
R(*)(const volatile T *, A0, A1, A2, A3, A4)  func 
)
inline

Create a Callback with a static function and bound pointer

Parameters
objPointer to object to bind to function
funcStatic function to attach
Deprecated:
Arguments to callback have been reordered to Callback(func, arg)
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
mbed::Callback< R(A0, A1, A2, A3, A4)>::~Callback ( )
inline

Destroy a callback

Member Function Documentation

template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( R(*)(A0, A1, A2, A3, A4)  func)
inline

Attach a static function

Parameters
funcStatic function to attach
Deprecated:
Replaced by simple assignment 'Callback cb = func'
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( const Callback< R(A0, A1, A2, A3, A4)> &  func)
inline

Attach a Callback

Parameters
funcThe Callback to attach
Deprecated:
Replaced by simple assignment 'Callback cb = func'
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( U *  obj,
R(T::*)(A0, A1, A2, A3, A4)  method 
)
inline

Attach a member function

Parameters
objPointer to object to invoke member function on
methodMember function to attach
Deprecated:
Replaced by simple assignment 'Callback cb = func'
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( const U *  obj,
R(T::*)(A0, A1, A2, A3, A4) const  method 
)
inline

Attach a member function

Parameters
objPointer to object to invoke member function on
methodMember function to attach
Deprecated:
Replaced by simple assignment 'Callback cb = func'
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( volatile U *  obj,
R(T::*)(A0, A1, A2, A3, A4) volatile  method 
)
inline

Attach a member function

Parameters
objPointer to object to invoke member function on
methodMember function to attach
Deprecated:
Replaced by simple assignment 'Callback cb = func'
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( const volatile U *  obj,
R(T::*)(A0, A1, A2, A3, A4) const volatile  method 
)
inline

Attach a member function

Parameters
objPointer to object to invoke member function on
methodMember function to attach
Deprecated:
Replaced by simple assignment 'Callback cb = func'
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( R(*)(T *, A0, A1, A2, A3, A4)  func,
U *  arg 
)
inline

Attach a static function with a bound pointer

Parameters
funcStatic function to attach
argPointer argument to function
Deprecated:
Replaced by simple assignment 'Callback cb = func'
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( R(*)(const T *, A0, A1, A2, A3, A4)  func,
const U *  arg 
)
inline

Attach a static function with a bound pointer

Parameters
funcStatic function to attach
argPointer argument to function
Deprecated:
Replaced by simple assignment 'Callback cb = func'
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( R(*)(volatile T *, A0, A1, A2, A3, A4)  func,
volatile U *  arg 
)
inline

Attach a static function with a bound pointer

Parameters
funcStatic function to attach
argPointer argument to function
Deprecated:
Replaced by simple assignment 'Callback cb = func'
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( R(*)(const volatile T *, A0, A1, A2, A3, A4)  func,
const volatile U *  arg 
)
inline

Attach a static function with a bound pointer

Parameters
funcStatic function to attach
argPointer argument to function
Deprecated:
Replaced by simple assignment 'Callback cb = func'
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename F >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( f)
inline

Attach a function object

Parameters
fFunction object to attach
Note
The function object is limited to a single word of storage
Deprecated:
Replaced by simple assignment 'Callback cb = func'
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename F >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( const F  f)
inline

Attach a function object

Parameters
fFunction object to attach
Note
The function object is limited to a single word of storage
Deprecated:
Replaced by simple assignment 'Callback cb = func'
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename F >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( volatile F  f)
inline

Attach a function object

Parameters
fFunction object to attach
Note
The function object is limited to a single word of storage
Deprecated:
Replaced by simple assignment 'Callback cb = func'
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename F >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( const volatile F  f)
inline

Attach a function object

Parameters
fFunction object to attach
Note
The function object is limited to a single word of storage
Deprecated:
Replaced by simple assignment 'Callback cb = func'
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( U *  obj,
R(*)(T *, A0, A1, A2, A3, A4)  func 
)
inline

Attach a static function with a bound pointer

Parameters
objPointer to object to bind to function
funcStatic function to attach
Deprecated:
Arguments to callback have been reordered to attach(func, arg)
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( const U *  obj,
R(*)(const T *, A0, A1, A2, A3, A4)  func 
)
inline

Attach a static function with a bound pointer

Parameters
objPointer to object to bind to function
funcStatic function to attach
Deprecated:
Arguments to callback have been reordered to attach(func, arg)
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( volatile U *  obj,
R(*)(volatile T *, A0, A1, A2, A3, A4)  func 
)
inline

Attach a static function with a bound pointer

Parameters
objPointer to object to bind to function
funcStatic function to attach
Deprecated:
Arguments to callback have been reordered to attach(func, arg)
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
template<typename T , typename U >
void mbed::Callback< R(A0, A1, A2, A3, A4)>::attach ( const volatile U *  obj,
R(*)(const volatile T *, A0, A1, A2, A3, A4)  func 
)
inline

Attach a static function with a bound pointer

Parameters
objPointer to object to bind to function
funcStatic function to attach
Deprecated:
Arguments to callback have been reordered to attach(func, arg)
template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
R mbed::Callback< R(A0, A1, A2, A3, A4)>::call ( A0  a0,
A1  a1,
A2  a2,
A3  a3,
A4  a4 
) const
inline

Call the attached function

template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
mbed::Callback< R(A0, A1, A2, A3, A4)>::operator bool ( ) const
inline

Test if function has been attached

template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
R mbed::Callback< R(A0, A1, A2, A3, A4)>::operator() ( A0  a0,
A1  a1,
A2  a2,
A3  a3,
A4  a4 
) const
inline

Call the attached function

template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
Callback& mbed::Callback< R(A0, A1, A2, A3, A4)>::operator= ( const Callback< R(A0, A1, A2, A3, A4)> &  that)
inline

Assign a callback

template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
static R mbed::Callback< R(A0, A1, A2, A3, A4)>::thunk ( void *  func,
A0  a0,
A1  a1,
A2  a2,
A3  a3,
A4  a4 
)
inlinestatic

Static thunk for passing as C-style function

Parameters
funcCallback to call passed as void pointer
a0An argument to be called with function func
a1An argument to be called with function func
a2An argument to be called with function func
a3An argument to be called with function func
a4An argument to be called with function func
Returns
the value as determined by func which is of type and determined by the signiture of func

Friends And Related Function Documentation

template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
bool operator!= ( const Callback< R(A0, A1, A2, A3, A4)> &  l,
const Callback< R(A0, A1, A2, A3, A4)> &  r 
)
friend

Test for inequality

template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
bool operator== ( const Callback< R(A0, A1, A2, A3, A4)> &  l,
const Callback< R(A0, A1, A2, A3, A4)> &  r 
)
friend

Test for equality


The documentation for this class was generated from the following file:
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.