nkjnm

Dependencies:   MAX44000 nexpaq_mdk

Fork of LED_Demo by Maxim nexpaq

Embed: (wiki syntax)

« Back to documentation index

Callback< R(A0)> Class Template Reference

Callback< R(A0)> Class Template Reference

Callback class based on template specialization. More...

#include <Callback.h>

Public Member Functions

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

Callback class based on template specialization.

Synchronization level: Not protected

Definition at line 467 of file Callback.h.


Constructor & Destructor Documentation

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

Create a Callback with a static function.

Parameters:
funcStatic function to attach

Definition at line 472 of file Callback.h.

Callback ( void *  obj,
R(*)(void *, A0)  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 480 of file Callback.h.

Callback ( const void *  obj,
R(*)(const void *, A0)  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 488 of file Callback.h.

Callback ( volatile void *  obj,
R(*)(volatile void *, A0)  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 496 of file Callback.h.

Callback ( const volatile void *  obj,
R(*)(const volatile void *, A0)  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 504 of file Callback.h.

Callback ( T *  obj,
R(*)(T *, A0)  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 513 of file Callback.h.

Callback ( const T *  obj,
R(*)(const T *, A0)  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 522 of file Callback.h.

Callback ( volatile T *  obj,
R(*)(volatile T *, A0)  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 531 of file Callback.h.

Callback ( const volatile T *  obj,
R(*)(const volatile T *, A0)  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 540 of file Callback.h.

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

Create a Callback with a member function.

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

Definition at line 549 of file Callback.h.

Callback ( const T *  obj,
R(T::*)(A0) 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 558 of file Callback.h.

Callback ( volatile T *  obj,
R(T::*)(A0) 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 567 of file Callback.h.

Callback ( const volatile T *  obj,
R(T::*)(A0) 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 576 of file Callback.h.


Member Function Documentation

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

Attach a static function.

Parameters:
funcStatic function to attach

Definition at line 583 of file Callback.h.

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

Attach a Callback.

Parameters:
funcThe Callback to attach

Definition at line 600 of file Callback.h.

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

Attach a static function with a bound pointer.

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

Definition at line 629 of file Callback.h.

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

Attach a static function with a bound pointer.

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

Definition at line 703 of file Callback.h.

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

Attach a static function with a bound pointer.

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

Definition at line 722 of file Callback.h.

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

Attach a member function.

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

Definition at line 820 of file Callback.h.

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

Attach a member function.

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

Definition at line 800 of file Callback.h.

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

Attach a member function.

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

Definition at line 780 of file Callback.h.

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

Attach a member function.

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

Definition at line 760 of file Callback.h.

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

Attach a static function with a bound pointer.

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

Definition at line 647 of file Callback.h.

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

Attach a static function with a bound pointer.

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

Definition at line 741 of file Callback.h.

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

Attach a static function with a bound pointer.

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

Definition at line 611 of file Callback.h.

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

Attach a static function with a bound pointer.

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

Definition at line 684 of file Callback.h.

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

Attach a static function with a bound pointer.

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

Definition at line 665 of file Callback.h.

R call ( A0  a0 ) const

Call the attached function.

Definition at line 837 of file Callback.h.

operator bool ( void   ) const

Test if function has been attached.

Definition at line 850 of file Callback.h.

R operator() ( A0  a0 ) const

Call the attached function.

Definition at line 844 of file Callback.h.

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

Static thunk for passing as C-style function.

Parameters:
funcCallback to call passed as void pointer

Definition at line 869 of file Callback.h.


Friends And Related Function Documentation

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

Test for inequality.

Definition at line 862 of file Callback.h.

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

Test for equality.

Definition at line 856 of file Callback.h.