nkjnm

Dependencies:   MAX44000 nexpaq_mdk

Fork of LED_Demo by Maxim nexpaq

Embed: (wiki syntax)

« Back to documentation index

Callback< R(A0, A1)> Class Template Reference

Callback< R(A0, A1)> Class Template Reference

Callback class based on template specialization. More...

#include <Callback.h>

Public Member Functions

 Callback (R(*func)(A0, A1)=0)
 Create a Callback with a static function.
 Callback (void *obj, R(*func)(void *, A0, A1))
 Create a Callback with a static function and bound pointer.
 Callback (const void *obj, R(*func)(const void *, A0, A1))
 Create a Callback with a static function and bound pointer.
 Callback (volatile void *obj, R(*func)(volatile void *, A0, A1))
 Create a Callback with a static function and bound pointer.
 Callback (const volatile void *obj, R(*func)(const volatile void *, A0, A1))
 Create a Callback with a static function and bound pointer.
template<typename T >
 Callback (T *obj, R(*func)(T *, A0, A1))
 Create a Callback with a static function and bound pointer.
template<typename T >
 Callback (const T *obj, R(*func)(const T *, A0, A1))
 Create a Callback with a static function and bound pointer.
template<typename T >
 Callback (volatile T *obj, R(*func)(volatile T *, A0, A1))
 Create a Callback with a static function and bound pointer.
template<typename T >
 Callback (const volatile T *obj, R(*func)(const volatile T *, A0, A1))
 Create a Callback with a static function and bound pointer.
template<typename T >
 Callback (T *obj, R(T::*func)(A0, A1))
 Create a Callback with a member function.
template<typename T >
 Callback (const T *obj, R(T::*func)(A0, A1) const)
 Create a Callback with a member function.
template<typename T >
 Callback (volatile T *obj, R(T::*func)(A0, A1) volatile)
 Create a Callback with a member function.
template<typename T >
 Callback (const volatile T *obj, R(T::*func)(A0, A1) const volatile)
 Create a Callback with a member function.
void attach (R(*func)(A0, A1))
 Attach a static function.
void attach (const Callback< R(A0, A1)> &func)
 Attach a Callback.
void attach (void *obj, R(*func)(void *, A0, A1))
 Attach a static function with a bound pointer.
void attach (const void *obj, R(*func)(const void *, A0, A1))
 Attach a static function with a bound pointer.
void attach (volatile void *obj, R(*func)(volatile void *, A0, A1))
 Attach a static function with a bound pointer.
void attach (const volatile void *obj, R(*func)(const volatile void *, A0, A1))
 Attach a static function with a bound pointer.
template<typename T >
void attach (T *obj, R(*func)(T *, A0, A1))
 Attach a static function with a bound pointer.
template<typename T >
void attach (const T *obj, R(*func)(const T *, A0, A1))
 Attach a static function with a bound pointer.
template<typename T >
void attach (volatile T *obj, R(*func)(volatile T *, A0, A1))
 Attach a static function with a bound pointer.
template<typename T >
void attach (const volatile T *obj, R(*func)(const volatile T *, A0, A1))
 Attach a static function with a bound pointer.
template<typename T >
void attach (T *obj, R(T::*func)(A0, A1))
 Attach a member function.
template<typename T >
void attach (const T *obj, R(T::*func)(A0, A1) const)
 Attach a member function.
template<typename T >
void attach (volatile T *obj, R(T::*func)(A0, A1) volatile)
 Attach a member function.
template<typename T >
void attach (const volatile T *obj, R(T::*func)(A0, A1) const volatile)
 Attach a member function.
call (A0 a0, A1 a1) const
 Call the attached function.
operator() (A0 a0, A1 a1) const
 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)
 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, typename A0, typename A1>
class mbed::Callback< R(A0, A1)>

Callback class based on template specialization.

Synchronization level: Not protected

Definition at line 896 of file Callback.h.


Constructor & Destructor Documentation

Callback ( R(*)(A0, A1)  func = 0 )

Create a Callback with a static function.

Parameters:
funcStatic function to attach

Definition at line 901 of file Callback.h.

Callback ( void *  obj,
R(*)(void *, A0, A1)  func 
)

Create a Callback with a static function and bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 909 of file Callback.h.

Callback ( const void *  obj,
R(*)(const void *, A0, A1)  func 
)

Create a Callback with a static function and bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 917 of file Callback.h.

Callback ( volatile void *  obj,
R(*)(volatile void *, A0, A1)  func 
)

Create a Callback with a static function and bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 925 of file Callback.h.

Callback ( const volatile void *  obj,
R(*)(const volatile void *, A0, A1)  func 
)

Create a Callback with a static function and bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 933 of file Callback.h.

Callback ( T *  obj,
R(*)(T *, A0, A1)  func 
)

Create a Callback with a static function and bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 942 of file Callback.h.

Callback ( const T *  obj,
R(*)(const T *, A0, A1)  func 
)

Create a Callback with a static function and bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 951 of file Callback.h.

Callback ( volatile T *  obj,
R(*)(volatile T *, A0, A1)  func 
)

Create a Callback with a static function and bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 960 of file Callback.h.

Callback ( const volatile T *  obj,
R(*)(const volatile T *, A0, A1)  func 
)

Create a Callback with a static function and bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 969 of file Callback.h.

Callback ( T *  obj,
R(T::*)(A0, A1)  func 
)

Create a Callback with a member function.

Parameters:
objPointer to object to invoke member function on
funcMember function to attach

Definition at line 978 of file Callback.h.

Callback ( const T *  obj,
R(T::*)(A0, A1) const   func 
)

Create a Callback with a member function.

Parameters:
objPointer to object to invoke member function on
funcMember function to attach

Definition at line 987 of file Callback.h.

Callback ( volatile T *  obj,
R(T::*)(A0, A1) volatile  func 
)

Create a Callback with a member function.

Parameters:
objPointer to object to invoke member function on
funcMember function to attach

Definition at line 996 of file Callback.h.

Callback ( const volatile T *  obj,
R(T::*)(A0, A1) const volatile  func 
)

Create a Callback with a member function.

Parameters:
objPointer to object to invoke member function on
funcMember function to attach

Definition at line 1005 of file Callback.h.


Member Function Documentation

void attach ( R(*)(A0, A1)  func )

Attach a static function.

Parameters:
funcStatic function to attach

Definition at line 1012 of file Callback.h.

void attach ( const Callback< R(A0, A1)> &  func )

Attach a Callback.

Parameters:
funcThe Callback to attach

Definition at line 1029 of file Callback.h.

void attach ( const void *  obj,
R(*)(const void *, A0, A1)  func 
)

Attach a static function with a bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 1058 of file Callback.h.

void attach ( const T *  obj,
R(*)(const T *, A0, A1)  func 
)

Attach a static function with a bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 1132 of file Callback.h.

void attach ( volatile T *  obj,
R(*)(volatile T *, A0, A1)  func 
)

Attach a static function with a bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 1151 of file Callback.h.

void attach ( const volatile T *  obj,
R(T::*)(A0, A1) const volatile  func 
)

Attach a member function.

Parameters:
objPointer to object to invoke member function on
funcMember function to attach

Definition at line 1249 of file Callback.h.

void attach ( volatile T *  obj,
R(T::*)(A0, A1) volatile  func 
)

Attach a member function.

Parameters:
objPointer to object to invoke member function on
funcMember function to attach

Definition at line 1229 of file Callback.h.

void attach ( const T *  obj,
R(T::*)(A0, A1) const   func 
)

Attach a member function.

Parameters:
objPointer to object to invoke member function on
funcMember function to attach

Definition at line 1209 of file Callback.h.

void attach ( T *  obj,
R(T::*)(A0, A1)  func 
)

Attach a member function.

Parameters:
objPointer to object to invoke member function on
funcMember function to attach

Definition at line 1189 of file Callback.h.

void attach ( volatile void *  obj,
R(*)(volatile void *, A0, A1)  func 
)

Attach a static function with a bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 1076 of file Callback.h.

void attach ( const volatile T *  obj,
R(*)(const volatile T *, A0, A1)  func 
)

Attach a static function with a bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 1170 of file Callback.h.

void attach ( void *  obj,
R(*)(void *, A0, A1)  func 
)

Attach a static function with a bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 1040 of file Callback.h.

void attach ( T *  obj,
R(*)(T *, A0, A1)  func 
)

Attach a static function with a bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 1113 of file Callback.h.

void attach ( const volatile void *  obj,
R(*)(const volatile void *, A0, A1)  func 
)

Attach a static function with a bound pointer.

Parameters:
objPointer to object to bind to function
funcStatic function to attach

Definition at line 1094 of file Callback.h.

R call ( A0  a0,
A1  a1 
) const

Call the attached function.

Definition at line 1266 of file Callback.h.

operator bool ( void   ) const

Test if function has been attached.

Definition at line 1279 of file Callback.h.

R operator() ( A0  a0,
A1  a1 
) const

Call the attached function.

Definition at line 1273 of file Callback.h.

static R thunk ( void *  func,
A0  a0,
A1  a1 
) [static]

Static thunk for passing as C-style function.

Parameters:
funcCallback to call passed as void pointer

Definition at line 1298 of file Callback.h.


Friends And Related Function Documentation

bool operator!= ( const Callback< R(A0, A1)> &  l,
const Callback< R(A0, A1)> &  r 
) [friend]

Test for inequality.

Definition at line 1291 of file Callback.h.

bool operator== ( const Callback< R(A0, A1)> &  l,
const Callback< R(A0, A1)> &  r 
) [friend]

Test for equality.

Definition at line 1285 of file Callback.h.