Callback class based on template specialization. More...
#include <Callback.h>
Public Member Functions | |
Callback (R(*func)(A0, A1, A2, A3)=0) | |
Create a Callback with a static function. More... | |
Callback (const Callback< R(A0, A1, A2, A3)> &func) | |
Attach a Callback. More... | |
template<typename T , typename U > | |
Callback (U *obj, R(T::*method)(A0, A1, A2, A3)) | |
Create a Callback with a member function. More... | |
template<typename T , typename U > | |
Callback (const U *obj, R(T::*method)(A0, A1, A2, A3) const) | |
Create a Callback with a member function. More... | |
template<typename T , typename U > | |
Callback (volatile U *obj, R(T::*method)(A0, A1, A2, A3) volatile) | |
Create a Callback with a member function. More... | |
template<typename T , typename U > | |
Callback (const volatile U *obj, R(T::*method)(A0, A1, A2, A3) const volatile) | |
Create a Callback with a member function. More... | |
template<typename T , typename U > | |
Callback (R(*func)(T *, A0, A1, A2, A3), U *arg) | |
Create a Callback with a static function and bound pointer. More... | |
template<typename T , typename U > | |
Callback (R(*func)(const T *, A0, A1, A2, A3), const U *arg) | |
Create a Callback with a static function and bound pointer. More... | |
template<typename T , typename U > | |
Callback (R(*func)(volatile T *, A0, A1, A2, A3), volatile U *arg) | |
Create a Callback with a static function and bound pointer. More... | |
template<typename T , typename U > | |
Callback (R(*func)(const volatile T *, A0, A1, A2, A3), const volatile U *arg) | |
Create a Callback with a static function and bound pointer. More... | |
template<typename F > | |
Callback (F f,) | |
Create a Callback with a function object. More... | |
template<typename F > | |
Callback (const F f,) | |
Create a Callback with a function object. More... | |
template<typename F > | |
Callback (volatile F f,) | |
Create a Callback with a function object. More... | |
template<typename F > | |
Callback (const volatile F f,) | |
Create a Callback with a function object. More... | |
template<typename T , typename U > | |
Callback (U *obj, R(*func)(T *, A0, A1, A2, A3)) | |
Create a Callback with a static function and bound pointer. More... | |
template<typename T , typename U > | |
Callback (const U *obj, R(*func)(const T *, A0, A1, A2, A3)) | |
Create a Callback with a static function and bound pointer. More... | |
template<typename T , typename U > | |
Callback (volatile U *obj, R(*func)(volatile T *, A0, A1, A2, A3)) | |
Create a Callback with a static function and bound pointer. More... | |
template<typename T , typename U > | |
Callback (const volatile U *obj, R(*func)(const volatile T *, A0, A1, A2, A3)) | |
Create a Callback with a static function and bound pointer. More... | |
~Callback () | |
Destroy a callback. More... | |
void | attach (R(*func)(A0, A1, A2, A3)) |
Attach a static function. More... | |
void | attach (const Callback< R(A0, A1, A2, A3)> &func) |
Attach a Callback. More... | |
template<typename T , typename U > | |
void | attach (U *obj, R(T::*method)(A0, A1, A2, A3)) |
Attach a member function. More... | |
template<typename T , typename U > | |
void | attach (const U *obj, R(T::*method)(A0, A1, A2, A3) const) |
Attach a member function. More... | |
template<typename T , typename U > | |
void | attach (volatile U *obj, R(T::*method)(A0, A1, A2, A3) volatile) |
Attach a member function. More... | |
template<typename T , typename U > | |
void | attach (const volatile U *obj, R(T::*method)(A0, A1, A2, A3) const volatile) |
Attach a member function. More... | |
template<typename T , typename U > | |
void | attach (R(*func)(T *, A0, A1, A2, A3), U *arg) |
Attach a static function with a bound pointer. More... | |
template<typename T , typename U > | |
void | attach (R(*func)(const T *, A0, A1, A2, A3), const U *arg) |
Attach a static function with a bound pointer. More... | |
template<typename T , typename U > | |
void | attach (R(*func)(volatile T *, A0, A1, A2, A3), volatile U *arg) |
Attach a static function with a bound pointer. More... | |
template<typename T , typename U > | |
void | attach (R(*func)(const volatile T *, A0, A1, A2, A3), const volatile U *arg) |
Attach a static function with a bound pointer. More... | |
template<typename F > | |
void | attach (F f,) |
Attach a function object. More... | |
template<typename F > | |
void | attach (const F f,) |
Attach a function object. More... | |
template<typename F > | |
void | attach (volatile F f,) |
Attach a function object. More... | |
template<typename F > | |
void | attach (const volatile F f,) |
Attach a function object. More... | |
template<typename T , typename U > | |
void | attach (U *obj, R(*func)(T *, A0, A1, A2, A3)) |
Attach a static function with a bound pointer. More... | |
template<typename T , typename U > | |
void | attach (const U *obj, R(*func)(const T *, A0, A1, A2, A3)) |
Attach a static function with a bound pointer. More... | |
template<typename T , typename U > | |
void | attach (volatile U *obj, R(*func)(volatile T *, A0, A1, A2, A3)) |
Attach a static function with a bound pointer. More... | |
template<typename T , typename U > | |
void | attach (const volatile U *obj, R(*func)(const volatile T *, A0, A1, A2, A3)) |
Attach a static function with a bound pointer. More... | |
Callback & | operator= (const Callback &that) |
Assign a callback. More... | |
R | call (A0 a0, A1 a1, A2 a2, A3 a3) const |
Call the attached function. More... | |
R | operator() (A0 a0, A1 a1, A2 a2, A3 a3) const |
Call the attached function. More... | |
operator bool () const | |
Test if function has been attached. More... | |
Static Public Member Functions | |
static R | thunk (void *func, A0 a0, A1 a1, A2 a2, A3 a3) |
Static thunk for passing as C-style function. More... | |
Friends | |
bool | operator== (const Callback &l, const Callback &r) |
Test for equality. More... | |
bool | operator!= (const Callback &l, const Callback &r) |
Test for inequality. More... | |
Callback class based on template specialization.
Definition at line 2584 of file Callback.h.
Callback | ( | R(*)(A0, A1, A2, A3) | func = 0 | ) |
Create a Callback with a static function.
func | Static function to attach |
Definition at line 2589 of file Callback.h.
Attach a Callback.
func | The Callback to attach |
Definition at line 2601 of file Callback.h.
Callback | ( | U * | obj, |
R(T::*)(A0, A1, A2, A3) | method | ||
) |
Create a Callback with a member function.
obj | Pointer to object to invoke member function on |
method | Member function to attach |
Definition at line 2615 of file Callback.h.
Callback | ( | const U * | obj, |
R(T::*)(A0, A1, A2, A3) const | method | ||
) |
Create a Callback with a member function.
obj | Pointer to object to invoke member function on |
method | Member function to attach |
Definition at line 2625 of file Callback.h.
Callback | ( | volatile U * | obj, |
R(T::*)(A0, A1, A2, A3) volatile | method | ||
) |
Create a Callback with a member function.
obj | Pointer to object to invoke member function on |
method | Member function to attach |
Definition at line 2635 of file Callback.h.
Callback | ( | const volatile U * | obj, |
R(T::*)(A0, A1, A2, A3) const volatile | method | ||
) |
Create a Callback with a member function.
obj | Pointer to object to invoke member function on |
method | Member function to attach |
Definition at line 2645 of file Callback.h.
Callback | ( | R(*)(T *, A0, A1, A2, A3) | func, |
U * | arg | ||
) |
Create a Callback with a static function and bound pointer.
func | Static function to attach |
arg | Pointer argument to function |
Definition at line 2655 of file Callback.h.
Callback | ( | R(*)(const T *, A0, A1, A2, A3) | func, |
const U * | arg | ||
) |
Create a Callback with a static function and bound pointer.
func | Static function to attach |
arg | Pointer argument to function |
Definition at line 2665 of file Callback.h.
Callback | ( | R(*)(volatile T *, A0, A1, A2, A3) | func, |
volatile U * | arg | ||
) |
Create a Callback with a static function and bound pointer.
func | Static function to attach |
arg | Pointer argument to function |
Definition at line 2675 of file Callback.h.
Callback | ( | R(*)(const volatile T *, A0, A1, A2, A3) | func, |
const volatile U * | arg | ||
) |
Create a Callback with a static function and bound pointer.
func | Static function to attach |
arg | Pointer argument to function |
Definition at line 2685 of file Callback.h.
Callback | ( | F | f | ) |
Create a Callback with a function object.
f | Function object to attach |
Definition at line 2695 of file Callback.h.
Callback | ( | const F | f | ) |
Create a Callback with a function object.
f | Function object to attach |
Definition at line 2705 of file Callback.h.
Callback | ( | volatile F | f | ) |
Create a Callback with a function object.
f | Function object to attach |
Definition at line 2715 of file Callback.h.
Callback | ( | const volatile F | f | ) |
Create a Callback with a function object.
f | Function object to attach |
Definition at line 2725 of file Callback.h.
Callback | ( | U * | obj, |
R(*)(T *, A0, A1, A2, A3) | func | ||
) |
Create a Callback with a static function and bound pointer.
obj | Pointer to object to bind to function |
func | Static function to attach |
Definition at line 2739 of file Callback.h.
Callback | ( | const U * | obj, |
R(*)(const T *, A0, A1, A2, A3) | func | ||
) |
Create a Callback with a static function and bound pointer.
obj | Pointer to object to bind to function |
func | Static function to attach |
Definition at line 2753 of file Callback.h.
Callback | ( | volatile U * | obj, |
R(*)(volatile T *, A0, A1, A2, A3) | func | ||
) |
Create a Callback with a static function and bound pointer.
obj | Pointer to object to bind to function |
func | Static function to attach |
Definition at line 2767 of file Callback.h.
Callback | ( | const volatile U * | obj, |
R(*)(const volatile T *, A0, A1, A2, A3) | func | ||
) |
Create a Callback with a static function and bound pointer.
obj | Pointer to object to bind to function |
func | Static function to attach |
Definition at line 2781 of file Callback.h.
~Callback | ( | ) |
Destroy a callback.
Definition at line 2788 of file Callback.h.
void attach | ( | R(*)(A0, A1, A2, A3) | func | ) |
Attach a static function.
func | Static function to attach |
Definition at line 2802 of file Callback.h.
void attach | ( | const Callback< R(A0, A1, A2, A3)> & | func | ) |
Attach a Callback.
func | The Callback to attach |
Definition at line 2815 of file Callback.h.
void attach | ( | U * | obj, |
R(T::*)(A0, A1, A2, A3) | method | ||
) |
Attach a member function.
obj | Pointer to object to invoke member function on |
method | Member function to attach |
Definition at line 2830 of file Callback.h.
void attach | ( | const U * | obj, |
R(T::*)(A0, A1, A2, A3) const | method | ||
) |
Attach a member function.
obj | Pointer to object to invoke member function on |
method | Member function to attach |
Definition at line 2845 of file Callback.h.
void attach | ( | volatile U * | obj, |
R(T::*)(A0, A1, A2, A3) volatile | method | ||
) |
Attach a member function.
obj | Pointer to object to invoke member function on |
method | Member function to attach |
Definition at line 2860 of file Callback.h.
void attach | ( | const volatile U * | obj, |
R(T::*)(A0, A1, A2, A3) const volatile | method | ||
) |
Attach a member function.
obj | Pointer to object to invoke member function on |
method | Member function to attach |
Definition at line 2875 of file Callback.h.
void attach | ( | R(*)(T *, A0, A1, A2, A3) | func, |
U * | arg | ||
) |
Attach a static function with a bound pointer.
func | Static function to attach |
arg | Pointer argument to function |
Definition at line 2890 of file Callback.h.
void attach | ( | R(*)(const T *, A0, A1, A2, A3) | func, |
const U * | arg | ||
) |
Attach a static function with a bound pointer.
func | Static function to attach |
arg | Pointer argument to function |
Definition at line 2905 of file Callback.h.
void attach | ( | R(*)(volatile T *, A0, A1, A2, A3) | func, |
volatile U * | arg | ||
) |
Attach a static function with a bound pointer.
func | Static function to attach |
arg | Pointer argument to function |
Definition at line 2920 of file Callback.h.
void attach | ( | R(*)(const volatile T *, A0, A1, A2, A3) | func, |
const volatile U * | arg | ||
) |
Attach a static function with a bound pointer.
func | Static function to attach |
arg | Pointer argument to function |
Definition at line 2935 of file Callback.h.
void attach | ( | F | f | ) |
Attach a function object.
f | Function object to attach |
Definition at line 2950 of file Callback.h.
void attach | ( | const F | f | ) |
Attach a function object.
f | Function object to attach |
Definition at line 2965 of file Callback.h.
void attach | ( | volatile F | f | ) |
Attach a function object.
f | Function object to attach |
Definition at line 2980 of file Callback.h.
void attach | ( | const volatile F | f | ) |
Attach a function object.
f | Function object to attach |
Definition at line 2995 of file Callback.h.
void attach | ( | U * | obj, |
R(*)(T *, A0, A1, A2, A3) | func | ||
) |
Attach a static function with a bound pointer.
obj | Pointer to object to bind to function |
func | Static function to attach |
Definition at line 3010 of file Callback.h.
void attach | ( | const U * | obj, |
R(*)(const T *, A0, A1, A2, A3) | func | ||
) |
Attach a static function with a bound pointer.
obj | Pointer to object to bind to function |
func | Static function to attach |
Definition at line 3025 of file Callback.h.
void attach | ( | volatile U * | obj, |
R(*)(volatile T *, A0, A1, A2, A3) | func | ||
) |
Attach a static function with a bound pointer.
obj | Pointer to object to bind to function |
func | Static function to attach |
Definition at line 3040 of file Callback.h.
void attach | ( | const volatile U * | obj, |
R(*)(const volatile T *, A0, A1, A2, A3) | func | ||
) |
Attach a static function with a bound pointer.
obj | Pointer to object to bind to function |
func | Static function to attach |
Definition at line 3055 of file Callback.h.
R call | ( | A0 | a0, |
A1 | a1, | ||
A2 | a2, | ||
A3 | a3 | ||
) | const |
Call the attached function.
Definition at line 3075 of file Callback.h.
operator bool | ( | ) | const |
Test if function has been attached.
Definition at line 3090 of file Callback.h.
R operator() | ( | A0 | a0, |
A1 | a1, | ||
A2 | a2, | ||
A3 | a3 | ||
) | const |
Call the attached function.
Definition at line 3083 of file Callback.h.
Assign a callback.
Definition at line 3063 of file Callback.h.
|
static |
Static thunk for passing as C-style function.
func | Callback to call passed as void pointer |
a0 | An argument to be called with function func |
a1 | An argument to be called with function func |
a2 | An argument to be called with function func |
a3 | An argument to be called with function func |
Definition at line 3118 of file Callback.h.
|
friend |
Test for inequality.
Definition at line 3104 of file Callback.h.
|
friend |
Test for equality.
Definition at line 3097 of file Callback.h.