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 Definition: RunLoopManager.h:42
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
CallbackWrapper(FunctionPtrType f, void *userData)
Constructor from function pointer and user data pointer.
Definition: CallbackWrapper.h:48
boost::function_traits< FunctionType >::result_type ReturnType
Return type of the function (computed)
Definition: CallbackWrapper.h:57
A class template turning a callback with some number of arguments, with a userdata pointer last...
Definition: CallbackWrapper.h:45
ReturnType operator()(Args &&... args) const
Function call operator with non-void return.
Definition: CallbackWrapper.h:61
boost::remove_pointer< FunctionPtrType >::type FunctionType
Function type (remove pointer - computed)
Definition: CallbackWrapper.h:53