#include <boost/mpl/for_each.hpp>
#include <boost/mpl/transform_view.hpp>
#include <boost/mpl/find_if.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/mpl/pop_front.hpp>
#include <boost/mpl/at.hpp>
#include <boost/mpl/placeholders.hpp>
#include <boost/mpl/max_element.hpp>
#include <boost/mpl/transform.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/add_pointer.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_pointer.hpp>
#include <boost/type_traits/is_member_function_pointer.hpp>
#include <boost/function_types/function_type.hpp>
#include <boost/function_types/function_arity.hpp>
#include <boost/function_types/function_pointer.hpp>
#include <boost/function_types/member_function_pointer.hpp>
#include <boost/function_types/result_type.hpp>
#include <boost/function_types/parameter_types.hpp>
#include <boost/bind.hpp>
#include <boost/any.hpp>
#include <boost/thread/mutex.hpp>
#include <qi/atomic.hpp>
#include <qi/anyvalue.hpp>
#include <ka/typetraits.hpp>
Go to the source code of this file.
|
#define | _QITYPE_DETAIL_ANYFUNCTIONFACTORY_HXX_ |
|
#define | callArg(z, n, _) BOOST_PP_COMMA_IF(n) * (typename boost::remove_reference<P##n>::type*)args[n] |
|
#define | makeCall(n, argstypedecl, argstype, argsdecl, argsues, comma) |
|
#define | STATIC_IF_SAFE static |
|
#define | declType(z, n, _) |
|
#define | callArgBF(z, n, _) |
|
#define | makeCall(n, argstypedecl, argstype, argsdecl, argsues, comma) |
|
#define | makeCall(n, argstypedecl, argstype, argsdecl, argsues, comma) |
|
#define | makeCall_(n, argstypedecl, argstype, argsdecl, argsues, comma) |
|
#define _QITYPE_DETAIL_ANYFUNCTIONFACTORY_HXX_ |
#define callArg |
( |
|
z, |
|
|
|
n, |
|
|
|
_ |
|
) |
| BOOST_PP_COMMA_IF(n) * (typename boost::remove_reference<P##n>::type*)args[n] |
#define callArgBF |
( |
|
z, |
|
|
|
n, |
|
|
|
_ |
|
) |
| |
Value:BOOST_PP_COMMA_IF(n) * (typename boost::remove_reference<P##n>::type*) \
type_##n->ptrFromStorage(&args[n])
Definition at line 294 of file anyfunctionfactory.hxx.
#define declType |
( |
|
z, |
|
|
|
n, |
|
|
|
_ |
|
) |
| |
#define makeCall |
( |
|
n, |
|
|
|
argstypedecl, |
|
|
|
argstype, |
|
|
|
argsdecl, |
|
|
|
argsues, |
|
|
|
comma |
|
) |
| |
Value:template <typename R comma argstypedecl> \
void*
makeCall(R (*f)(argstype),
void** args) \
{ \
detail::AnyReferenceCopy val; \
val(), f(BOOST_PP_REPEAT(n,
callArg, _)); \
return val.rawValue(); \
}
#define makeCall(n, argstypedecl, argstype, argsdecl, argsues, comma)
Definition at line 309 of file anyfunctionfactory.hxx.
#define makeCall |
( |
|
n, |
|
|
|
argstypedecl, |
|
|
|
argstype, |
|
|
|
argsdecl, |
|
|
|
argsues, |
|
|
|
comma |
|
) |
| |
Value:template <typename R comma argstypedecl> \
void*
makeCall(boost::function<R(argstype)> f,
void** args) \
{ \
BOOST_PP_REPEAT(n,
declType, _) detail::AnyReferenceCopy val; \
val(), f(BOOST_PP_REPEAT(n,
callArgBF, _)); \
return val.rawValue(); \
}
#define declType(z, n, _)
#define callArgBF(z, n, _)
#define makeCall(n, argstypedecl, argstype, argsdecl, argsues, comma)
Definition at line 309 of file anyfunctionfactory.hxx.
#define makeCall |
( |
|
n, |
|
|
|
argstypedecl, |
|
|
|
argstype, |
|
|
|
argsdecl, |
|
|
|
argsues, |
|
|
|
comma |
|
) |
| |
Value:template <typename R comma argstypedecl> \
void*
makeCall(R (Class::*f)(argstype),
void* instance,
void** args) \
{ \
detail::AnyReferenceCopy val; \
Class* cptr = *(Class**)instance; \
val(), ((*cptr).*f)(BOOST_PP_REPEAT(n,
callArg, _)); \
return val.rawValue(); \
}
#define makeCall(n, argstypedecl, argstype, argsdecl, argsues, comma)
Definition at line 309 of file anyfunctionfactory.hxx.
#define makeCall_ |
( |
|
n, |
|
|
|
argstypedecl, |
|
|
|
argstype, |
|
|
|
argsdecl, |
|
|
|
argsues, |
|
|
|
comma |
|
) |
| |
Value:template <typename R comma argstypedecl> \
void*
makeCall(R (Class::*f)(argstype),
void** args) \
{ \
return
makeCall(f, args[0], args + 1); \
}
#define makeCall(n, argstypedecl, argstype, argsdecl, argsues, comma)
Definition at line 321 of file anyfunctionfactory.hxx.
#define STATIC_IF_SAFE static |