Header providing templated functions to automate the process of calling a C++ member function (specifically the function call operator) from a facility that accepts a C function pointer and an opaque "userdata" pointer. More...
#include <boost/preprocessor/cat.hpp>#include <boost/preprocessor/if.hpp>#include <boost/preprocessor/enum.hpp>#include <boost/preprocessor/enum_params.hpp>#include <boost/preprocessor/repeat.hpp>#include <boost/preprocessor/facilities/empty.hpp>#include <boost/function_types/function_arity.hpp>#include <boost/function_types/result_type.hpp>#include <boost/function_types/parameter_types.hpp>#include <boost/type_traits/is_void.hpp>#include <boost/type_traits/is_same.hpp>#include <boost/type_traits/is_pointer.hpp>#include <boost/type_traits/is_function.hpp>#include <boost/type_traits/remove_cv.hpp>#include <boost/type_traits/remove_reference.hpp>#include <boost/type_traits/remove_pointer.hpp>#include <boost/mpl/at.hpp>#include <boost/mpl/int.hpp>#include <boost/mpl/next_prior.hpp>#include <boost/static_assert.hpp>Go to the source code of this file.
Classes | |
| struct | osvr::util::this_last_t |
| Tag type indicating the last parameter of the function contains the "this" pointer. More... | |
| struct | osvr::util::this_first_t |
| Tag type indicating the first parameter of the function contains the "this" pointer. More... | |
| struct | osvr::util::GenericCaller< FunctionPtr, FunctionObjectType, ThisLocation > |
| Struct containing a single static function member named "call" that serves as a converter from a function call with an opaque userdata pointer to a functor call using the userdata pointer as "this". More... | |
Namespaces | |
| osvr | |
| The main namespace for all C++ elements of the framework, internal and external. | |
| osvr::util | |
| The Util library: Functionality not necessarily coupled to any particular core library, serving more as a common base layer behind all systems. | |
Functions | |
| template<typename FunctionPtr , typename FunctionObjectType , typename ThisLocation > | |
| FunctionPtr | osvr::util::getCaller () |
| Get a generic functor caller: a pointer to a function that will call an object of your specific function object type, expecting the function object address passed as a void * as a parameter. More... | |
| template<typename FunctionPtr , typename FunctionObjectType , typename ThisLocation > | |
| FunctionPtr | osvr::util::getCaller (ThisLocation const &) |
| Get a generic functor caller. Specify the location of "this" through the argument: results in automatic type deduction for ThisLocation. More... | |
| template<typename FunctionPtr , typename FunctionObjectType , typename ThisLocation > | |
| FunctionPtr | osvr::util::getCaller (FunctionObjectType const *, ThisLocation const &) |
| Get a generic functor caller. Pass a pointer to a function object and specify the location of "this" through the argument: results in automatic type deduction for FunctionObjectType and ThisLocation. More... | |
Variables | |
| BOOST_CONSTEXPR_OR_CONST this_last_t | this_last = {} |
| Pass as an argument to a getCaller() overload to indicate the last parameter of the function contains the "this" pointer. More... | |
| BOOST_CONSTEXPR_OR_CONST this_first_t | this_first = {} |
| Pass as an argument to a getCaller() overload to indicate the first parameter of the function contains the "this" pointer. More... | |
Header providing templated functions to automate the process of calling a C++ member function (specifically the function call operator) from a facility that accepts a C function pointer and an opaque "userdata" pointer.
Definition in file GenericCaller.h.
| BOOST_CONSTEXPR_OR_CONST this_last_t this_last = {} |
Pass as an argument to a getCaller() overload to indicate the last parameter of the function contains the "this" pointer.
()
Definition at line 86 of file GenericCaller.h.
| BOOST_CONSTEXPR_OR_CONST this_first_t this_first = {} |
Pass as an argument to a getCaller() overload to indicate the first parameter of the function contains the "this" pointer.
()
Definition at line 90 of file GenericCaller.h.