#include <callback.h>
|
typedef void(T::* | MemFunc) (BoundArg1, BoundArg2, FreeArg) |
|
◆ MemFunc
template<bool unref, class T , class BoundArg1 , class BoundArg2 , class FreeArg >
◆ CallbackArg2_()
template<bool unref, class T , class BoundArg1 , class BoundArg2 , class FreeArg >
◆ dispatch()
template<bool unref, class T , class BoundArg1 , class BoundArg2 , class FreeArg >
This will execute the referenced function or class method encapsulated by this class. It will only throw if the dispatched function or class method throws, or if the copy constructor of a free or bound argument throws and it is not a reference argument. It is thread safe if the referenced function or class method is thread safe.
- Parameters
-
arg | The argument to be passed to the referenced function or class method, if any. |
- Note
- 1. We use dispatch() to execute the callback, because the callback would normally be invoked through a base class pointer. To invoke it through operator()(), use the FunctorArg wrapper class.
-
2. This function is specialised for Callback::Callback (ie Callback::CallbackArg<void>) to take no argument, and for Callback::CallbackArg<TypeTuple<T1, T2> > and Callback::CallbackArg<TypeTuple<T1, T2, T3> > to take two and three arguments respectively.
Implements Cgu::Callback::CallbackArg< FreeArg >.
The documentation for this class was generated from the following file: