sprint 1-alpha
|
#include <simple_function.h>
Public Types | |
typedef void(* | Type )(void *) |
Public Member Functions | |
bool | is_nothing () const |
test if function object is initialized | |
void | operator() (void) |
Execute the callback. | |
void | ptr_fun (void(*func)(void *), void *param) |
bind (dinamically) with a ptr_function | |
template<void(*)(void) F> | |
void | bind () |
bind statically with a ptr function | |
template<class T , void(T::*)(void) F> | |
void | bind (T *_this) |
bind statically with a member function | |
Public Attributes | |
Type | m_func |
void * | m_param |
the function param |
a function object who wraps a callback (no parameters, only POD type available at compile time) cost: 1 ref call + 1 call memory: 1 delegate function x N, 2 pointer (The Callback + The param)