GainSpan Wi-Fi library see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/

Dependents:   GSwifi_httpd GSwifi_websocket GSwifi_tcpclient GSwifi_tcpserver ... more

Fork of GSwifi by gs fan

Embed: (wiki syntax)

« Back to documentation index

GSFunctionPointer Class Reference

GSFunctionPointer Class Reference

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

#include <GSFunctionPointer.h>

Public Member Functions

 GSFunctionPointer (void(*function)(int, int)=0)
 Create a FunctionPointer, attaching a static function.
template<typename T >
 GSFunctionPointer (T *object, void(T::*member)(int, int))
 Create a FunctionPointer, attaching a member function.
void attach (void(*function)(int, int)=0)
 Attach a static function.
template<typename T >
void attach (T *object, void(T::*member)(int, int))
 Attach a member function.
int call (int a, int b)
 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 34 of file GSFunctionPointer.h.


Constructor & Destructor Documentation

GSFunctionPointer ( void(*)(int, int)  function = 0 )

Create a FunctionPointer, attaching a static function.

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

Definition at line 41 of file GSFunctionPointer.h.

GSFunctionPointer ( T *  object,
void(T::*)(int, int)  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 51 of file GSFunctionPointer.h.


Member Function Documentation

void attach ( void(*)(int, int)  function = 0 )

Attach a static function.

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

Definition at line 59 of file GSFunctionPointer.h.

void attach ( T *  object,
void(T::*)(int, int)  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 70 of file GSFunctionPointer.h.

int call ( int  a,
int  b 
)

Call the attached static or member function.

Definition at line 79 of file GSFunctionPointer.h.