Simulated product dispenser

Dependencies:   HTS221

Fork of mbed-cloud-workshop-connect-HTS221 by Jim Carver

Embed: (wiki syntax)

« Back to documentation index

FP3< R, A1, A2, A3 > Class Template Reference

FP3< R, A1, A2, A3 > 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

 FP3 (R(*function)(A1, A2, A3)=0)
 Create a function pointer, attaching a static function.
template<typename T >
 FP3 (T *object, R(T::*member)(A1, A2, A3))
 Create a function pointer, attaching a member function.
void attach (R(*function)(A1, A2, A3))
 Attach a static function.
template<typename T >
void attach (T *object, R(T::*member)(A1, A2, A3))
 Attach a member function.
call (A1 a1, A2 a2, A3 a3)
 Call the attached static or member function.

Detailed Description

template<typename R, typename A1, typename A2, typename A3>
class FP3< R, A1, A2, A3 >

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

Definition at line 284 of file functionpointer.h.


Constructor & Destructor Documentation

FP3 ( R(*)(A1, A2, A3)  function = 0 )

Create a function pointer, attaching a static function.

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

Definition at line 290 of file functionpointer.h.

FP3 ( T *  object,
R(T::*)(A1, A2, A3)  member 
)

Create a function pointer, attaching a member function.

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

Definition at line 301 of file functionpointer.h.


Member Function Documentation

void attach ( R(*)(A1, A2, A3)  function )

Attach a static function.

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

Definition at line 309 of file functionpointer.h.

void attach ( T *  object,
R(T::*)(A1, A2, A3)  member 
)

Attach a member function.

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

Definition at line 320 of file functionpointer.h.

R call ( A1  a1,
A2  a2,
A3  a3 
)

Call the attached static or member function.

Definition at line 328 of file functionpointer.h.