| 322 | |
| 323 | template<class Signature> |
| 324 | inline std::string make_function_declaration(const char *name, const char *arguments) |
| 325 | { |
| 326 | typedef typename |
| 327 | boost::function_traits<Signature>::result_type result_type; |
| 328 | typedef typename |
| 329 | boost::function_types::parameter_types<Signature>::type parameter_types; |
| 330 | typedef typename |
| 331 | mpl::size<parameter_types>::type arity_type; |
| 332 | |
| 333 | std::stringstream s; |
| 334 | s << "inline " << type_name<result_type>() << " " << name; |
| 335 | s << "("; |
| 336 | |
| 337 | if(arity_type::value > 0){ |
| 338 | signature_argument_inserter i(s, arguments, arity_type::value); |
| 339 | mpl::for_each< |
| 340 | typename mpl::transform<parameter_types, boost::add_pointer<mpl::_1> |
| 341 | >::type>(i); |
| 342 | } |
| 343 | |
| 344 | s << ")"; |
| 345 | return s.str(); |
| 346 | } |
| 347 | |
| 348 | struct argument_list_inserter |
| 349 | { |
nothing calls this directly
no outgoing calls
no test coverage detected