26 #ifndef INCLUDED_CallbackWrapper_h_GUID_6169ADE2_5BA1_4A81_47C9_9E492F6405ED
27 #define INCLUDED_CallbackWrapper_h_GUID_6169ADE2_5BA1_4A81_47C9_9E492F6405ED
33 #include <boost/type_traits/function_traits.hpp>
34 #include <boost/type_traits/remove_pointer.hpp>
37 #include <type_traits>
49 : m_f(f), m_ud(userData) {}
53 typename boost::remove_pointer<FunctionPtrType>::type
FunctionType;
56 typedef typename boost::function_traits<FunctionType>::result_type
60 template <
typename... Args>
62 return (*m_f)(std::forward<Args>(args)..., m_ud);
71 #endif // INCLUDED_CallbackWrapper_h_GUID_6169ADE2_5BA1_4A81_47C9_9E492F6405ED
ReturnType operator()(Args &&...args) const
Function call operator with non-void return.
The main namespace for all C++ elements of the framework, internal and external.
CallbackWrapper(FunctionPtrType f, void *userData)
Constructor from function pointer and user data pointer.
boost::function_traits< FunctionType >::result_type ReturnType
Return type of the function (computed)
A class template turning a callback with some number of arguments, with a userdata pointer last...
boost::remove_pointer< FunctionPtrType >::type FunctionType
Function type (remove pointer - computed)