joey shelton / LED_Demo

Dependencies:   MAX44000 PWM_Tone_Library nexpaq_mdk

Fork of LED_Demo by Maxim nexpaq

Embed: (wiki syntax)

« Back to documentation index

FP0< R > Class Template Reference

FP0< R > Class Template Reference

A class for storing and calling a pointer to a static or member void function. More...

#include <functionpointer.h>

Public Member Functions

 FP0 (R(*function)(void)=0)
 Create a Function Pointer, attaching a static function.
template<typename T >
 FP0 (T *object, R(T::*member)(void))
 Create a FP, attaching a member function.
void attach (R(*function)(void))
 Attach a static function.
template<typename T >
void attach (T *object, R(T::*member)(void))
 Attach a member function.
call ()
 Call the attached static or member function.

Detailed Description

template<typename R>
class FP0< R >

A class for storing and calling a pointer to a static or member void function.

Definition at line 26 of file functionpointer.h.


Constructor & Destructor Documentation

FP0 ( R(*)(void)  function = 0 )

Create a Function Pointer, attaching a static function.

Parameters:
functionThe void static function to attach (default is none)

Definition at line 32 of file functionpointer.h.

FP0 ( T *  object,
R(T::*)(void)  member 
)

Create a FP, attaching a member function.

Parameters:
objectThe object pointer to invoke the member function on (i.e. the this pointer)
functionThe address of the void member function to attach

Definition at line 42 of file functionpointer.h.


Member Function Documentation

void attach ( R(*)(void)  function )

Attach a static function.

Parameters:
functionThe void static function to attach (default is none)

Definition at line 50 of file functionpointer.h.

void attach ( T *  object,
R(T::*)(void)  member 
)

Attach a member function.

Parameters:
objectThe object pointer to invoke the member function on (i.e. the this pointer)
functionThe address of the void member function to attach

Definition at line 61 of file functionpointer.h.

R call (  )

Call the attached static or member function.

Definition at line 69 of file functionpointer.h.