added prescaler for 16 bit pwm in LPC1347 target

Fork of mbed-dev by mbed official

Embed: (wiki syntax)

« Back to documentation index

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

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

Templated function class. More...

#include <Callback.h>

Public Member Functions

 Callback (R(*func)(A0, A1, A2, A3, A4)=0)
 Create a Callback with a static function.
template<typename T >
 Callback (T *obj, R(*func)(T *, A0, A1, A2, A3, A4))
 Create a Callback with a static function and bound pointer.
template<typename T >
 Callback (T *obj, R(T::*func)(A0, A1, A2, A3, A4))
 Create a Callback with a member function.
 Callback (const Callback< R(A0, A1, A2, A3, A4)> &func)
 Create a Callback with another Callback.
void attach (R(*func)(A0, A1, A2, A3, A4))
 Attach a static function.
template<typename T >
void attach (T *obj, R(*func)(T *, A0, A1, A2, A3, A4))
 Attach a static function with a bound pointer.
template<typename T >
void attach (T *obj, R(T::*func)(A0, A1, A2, A3, A4))
 Attach a member function.
void attach (const Callback< R(A0, A1, A2, A3, A4)> &func)
 Attach a Callback.
call (A0 a0, A1 a1, A2 a2, A3 a3, A4 a4)
 Call the attached function.
operator() (A0 a0, A1 a1, A2 a2, A3 a3, A4 a4)
 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, A2 a2, A3 a3, A4 a4)
 Static thunk for passing as C-style function.

Detailed Description

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

Templated function class.

Definition at line 35 of file Callback.h.


Constructor & Destructor Documentation

Callback ( R(*)(A0, A1, A2, A3, A4)  func = 0 )

Create a Callback with a static function.

Parameters:
funcStatic function to attach

Definition at line 40 of file Callback.h.

Callback ( T *  obj,
R(*)(T *, A0, A1, A2, A3, A4)  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 49 of file Callback.h.

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

Create a Callback with a member function.

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

Definition at line 58 of file Callback.h.

Callback ( const Callback< R(A0, A1, A2, A3, A4)> &  func )

Create a Callback with another Callback.

Parameters:
funcCallback to attach

Definition at line 65 of file Callback.h.


Member Function Documentation

void attach ( R(*)(A0, A1, A2, A3, A4)  func )

Attach a static function.

Parameters:
funcStatic function to attach

Definition at line 72 of file Callback.h.

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

Attach a static function with a bound pointer.

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

Definition at line 82 of file Callback.h.

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

Attach a Callback.

Parameters:
funcThe Callback to attach

Definition at line 102 of file Callback.h.

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

Attach a member function.

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

Definition at line 93 of file Callback.h.

R call ( A0  a0,
A1  a1,
A2  a2,
A3  a3,
A4  a4 
)

Call the attached function.

Definition at line 110 of file Callback.h.

operator bool (  ) const

Test if function has been attached.

Definition at line 125 of file Callback.h.

R operator() ( A0  a0,
A1  a1,
A2  a2,
A3  a3,
A4  a4 
)

Call the attached function.

Definition at line 119 of file Callback.h.

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

Static thunk for passing as C-style function.

Parameters:
funcCallback to call passed as void pointer

Definition at line 132 of file Callback.h.