7 #ifndef _QITYPE_DETAIL_FUNCTIONSIGNATURE_HXX_
8 #define _QITYPE_DETAIL_FUNCTIONSIGNATURE_HXX_
10 #include <boost/thread/mutex.hpp>
21 val += qi::typeOf<T>()->signature().toString();
28 struct RawFunctionSignature
32 using ResultType =
typename boost::function_types::result_type<T>::type;
33 return typeOf<ResultType>()->signature();
37 std::string signature;
39 using ArgsType =
typename boost::function_types::parameter_types<T>::type;
41 boost::mpl::transform_view<ArgsType,
44 boost::remove_reference<boost::mpl::_1>
54 template<
typename R,
typename F,
typename B>
55 struct RawFunctionSignature<boost::_bi::bind_t<R, F, B> >
60 return typeOf<ResultType>()->signature();
65 std::string signature;
69 boost::mpl::transform_view<ArgsType,
72 boost::remove_reference<boost::mpl::_1>
78 return Signature(signature);
87 using ResultType =
typename boost::function_types::result_type<T>::type;
88 return typeOf<ResultType>()->signature();
93 using RetType =
typename boost::function_types::result_type<T>::type;
94 using MemArgsType =
typename boost::function_types::parameter_types<T>::type;
95 using ArgsType =
typename boost::mpl::pop_front<MemArgsType>::type;
96 using EffectiveType =
typename boost::mpl::push_front<ArgsType, RetType>::type;
97 using type =
typename boost::function_types::function_type<EffectiveType>::type;
98 return RawFunctionSignature<type>::makeSignature();
105 using Backend =
typename boost::mpl::if_<
106 typename boost::function_types::is_member_pointer<T>,
108 RawFunctionSignature<T>
123 struct FunctionSignature<boost::function<T> >:
public FunctionSignature<T> {};
125 template<
typename T>
inline
130 using ArgsType =
typename boost::function_types::parameter_types<T>::type;
131 boost::mpl::for_each<
132 boost::mpl::transform_view<ArgsType,
139 template<
typename T>
inline
150 #endif // _QITYPE_DETAIL_FUNCTIONSIGNATURE_HXX_
static qi::Signature makeSignature()
static qi::Signature sigreturn()
signature_function_arg_apply(std::string *val)
qi::Signature functionArgumentsSignature()
typename boost::mpl::if_< typename boost::function_types::is_member_pointer< T >, MemberFunctionSignature< T >, RawFunctionSignature< T > >::type Backend
static qi::Signature makeSigreturn()
static qi::Signature signature()
qi::Signature _functionArgumentsSignature()
Various macros for qi. (deprecated, export API, disallow copy, ..) <includename>qi/macro.hpp</includename> .
#define QI_ONCE(code)
Execute code once, parallel calls are blocked until code finishes.