Mistake on this page? Email us
FP0< R > Class Template Reference

#include <functionpointer.h>

Public Types

typedef R(* static_fp) ()
 

Public Member Functions

 FP0 (R(*function)(void)=0)
 
template<typename T >
 FP0 (T *object, R(T::*member)(void))
 
void attach (R(*function)(void))
 
template<typename T >
void attach (T *object, R(T::*member)(void))
 
call ()
 
static_fp get_function () const
 
operator() (void)
 
 operator bool (void)
 

Detailed Description

template<typename R>
class FP0< R >

Pointer to a function with no parameters.

Constructor & Destructor Documentation

template<typename R >
FP0< R >::FP0 ( R(*)(void)  function = 0)
inline

Create a function pointer, attaching a static function.

Parameters
functionThe void static function to attach (default is none).
template<typename R >
template<typename T >
FP0< R >::FP0 ( T *  object,
R(T::*)(void)  member 
)
inline

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.

Member Function Documentation

template<typename R >
void FP0< R >::attach ( R(*)(void)  function)
inline

Attach a static function.

Parameters
functionThe void static function to attach (default is none).
template<typename R >
template<typename T >
void FP0< R >::attach ( T *  object,
R(T::*)(void)  member 
)
inline

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.
template<typename R >
R FP0< R >::call ( )
inline

Call the attached static or member function.


The documentation for this class was generated from the following file: