EmbeddedArtists AB / ewgui

Dependents:   app_emwin1 app_emwin2_pos lpc4088_ebb_gui_emwin

Embed: (wiki syntax)

« Back to documentation index

EwFunctionPointer Class Reference

EwFunctionPointer Class Reference

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

#include <EwFunctionPointer.h>

Public Member Functions

 EwFunctionPointer (void(*function)(EwWindow *w)=0)
 Create a FunctionPointer, attaching a static function.
template<typename T >
 EwFunctionPointer (T *object, void(T::*member)(EwWindow *w))
 Create a FunctionPointer, attaching a member function.
void attach (void(*function)(EwWindow *w)=0)
 Attach a static function.
template<typename T >
void attach (T *object, void(T::*member)(EwWindow *w))
 Attach a member function.
void call (EwWindow *w)
 Call the attached static or member function.

Detailed Description

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

Definition at line 28 of file EwFunctionPointer.h.


Constructor & Destructor Documentation

EwFunctionPointer ( void(*)(EwWindow *w)  function = 0 )

Create a FunctionPointer, attaching a static function.

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

Definition at line 20 of file EwFunctionPointer.cpp.

EwFunctionPointer ( T *  object,
void(T::*)(EwWindow *w)  member 
)

Create a FunctionPointer, 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 43 of file EwFunctionPointer.h.


Member Function Documentation

void attach ( void(*)(EwWindow *w)  function = 0 )

Attach a static function.

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

Definition at line 24 of file EwFunctionPointer.cpp.

void attach ( T *  object,
void(T::*)(EwWindow *w)  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 59 of file EwFunctionPointer.h.

void call ( EwWindow w )

Call the attached static or member function.

Definition at line 29 of file EwFunctionPointer.cpp.