mbed library sources

Fork of mbed-src by mbed official

Embed: (wiki syntax)

« Back to documentation index

FunctionPointerArg1< R, void > Class Template Reference

FunctionPointerArg1< R, void > Class Template Reference

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

#include <FunctionPointer.h>

Public Member Functions

 FunctionPointerArg1 (R(*function)(void)=0)
 Create a FunctionPointer, attaching a static function.
template<typename T >
 FunctionPointerArg1 (T *object, R(T::*member)(void))
 Create a FunctionPointer, 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.

Data Fields

R(*)() get_function ()
 Get registered static function.

Detailed Description

template<typename R>
class mbed::FunctionPointerArg1< R, void >

A class for storing and calling a pointer to a static or member function (R ()(void))

Definition at line 114 of file FunctionPointer.h.


Constructor & Destructor Documentation

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

Create a FunctionPointer, attaching a static function.

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

Definition at line 120 of file FunctionPointer.h.

FunctionPointerArg1 ( T *  object,
R(T::*)(void)  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 130 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 138 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 149 of file FunctionPointer.h.

R call ( void   )

Call the attached static or member function.

Definition at line 157 of file FunctionPointer.h.


Field Documentation

R(*)() get_function()

Get registered static function.

Definition at line 168 of file FunctionPointer.h.