c++-gtk-utils
Public Types | Public Member Functions
Cgu::Callback::Callback2_static< unref, BoundArg1, BoundArg2, FreeArgs > Class Template Reference

#include <callback.h>

Inheritance diagram for Cgu::Callback::Callback2_static< unref, BoundArg1, BoundArg2, FreeArgs >:
Cgu::Callback::CallbackArg< FreeArgs...>

List of all members.

Public Types

typedef void(* Func )(BoundArg1, BoundArg2, FreeArgs...)

Public Member Functions

void dispatch (typename Cgu::Param< FreeArgs >::ParamType...free_args) const
template<class Arg1 , class Arg2 >
 Callback2_static (Func func_, Arg1 &&arg1_, Arg2 &&arg2_)
- Public Member Functions inherited from Cgu::Callback::CallbackArg< FreeArgs...>
 CallbackArg ()
virtual ~CallbackArg ()

Member Typedef Documentation

template<bool unref, class BoundArg1 , class BoundArg2 , class... FreeArgs>
typedef void(* Cgu::Callback::Callback2_static< unref, BoundArg1, BoundArg2, FreeArgs >::Func)(BoundArg1, BoundArg2, FreeArgs...)

Constructor & Destructor Documentation

template<bool unref, class BoundArg1 , class BoundArg2 , class... FreeArgs>
template<class Arg1 , class Arg2 >
Cgu::Callback::Callback2_static< unref, BoundArg1, BoundArg2, FreeArgs >::Callback2_static ( Func  func_,
Arg1 &&  arg1_,
Arg2 &&  arg2_ 
)
inline

Member Function Documentation

template<bool unref, class BoundArg1 , class BoundArg2 , class... FreeArgs>
void Cgu::Callback::Callback2_static< unref, BoundArg1, BoundArg2, FreeArgs >::dispatch ( typename Cgu::Param< FreeArgs >::ParamType...  args) const
inlinevirtual

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 the free or a 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:
argsThe unbound arguments to be passed to the referenced function or class method, if any.
Note:
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.

Implements Cgu::Callback::CallbackArg< FreeArgs...>.


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