7 #ifndef _QITYPE_DETAILS_FUNCTIONSIGNATURE_HXX_
8 #define _QITYPE_DETAILS_FUNCTIONSIGNATURE_HXX_
10 #include <boost/thread/mutex.hpp>
21 val += qi::typeOf<T>()->signature().toString();
28 struct RawFunctionSignature
32 typedef typename boost::function_types::result_type<T>::type ResultType;
33 return typeOf<ResultType>()->signature();
37 std::string signature;
39 typedef typename boost::function_types::parameter_types<T>::type ArgsType;
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 typedef typename boost::function_types::result_type<T>::type ResultType;
88 return typeOf<ResultType>()->signature();
93 typedef typename boost::function_types::result_type<T>::type RetType;
94 typedef typename boost::function_types::parameter_types<T>::type MemArgsType;
95 typedef typename boost::mpl::pop_front< MemArgsType >::type ArgsType;
96 typedef typename boost::mpl::push_front<ArgsType, RetType>::type EffectiveType;
97 typedef typename boost::function_types::function_type<EffectiveType>::type type;
98 return RawFunctionSignature<type>::makeSignature();
105 typedef 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 typedef typename boost::function_types::parameter_types<T>::type ArgsType;
131 boost::mpl::for_each<
132 boost::mpl::transform_view<ArgsType,
139 template<
typename T>
inline
150 #endif // _QITYPE_DETAILS_FUNCTIONSIGNATURE_HXX_
static qi::Signature makeSignature()
static qi::Signature sigreturn()
signature_function_arg_apply(std::string *val)
qi::Signature functionArgumentsSignature()
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> .
boost::mpl::if_< typename boost::function_types::is_member_pointer< T >, MemberFunctionSignature< T >, RawFunctionSignature< T > >::type Backend
#define QI_ONCE(code)
Execute code once, parallel calls are blocked until code finishes.