25 #include <boost/algorithm/string/join.hpp>
33 template <
typename... Args>
struct types_to_string_list_helper;
35 template <
typename First,
typename... Args>
struct types_to_string_list_helper<First, Args...>
37 std::list<std::string> operator()()
const
39 std::list<std::string> argsList = types_to_string_list_helper<Args...>()();
40 argsList.push_front(fc::get_typename<
typename std::decay<First>::type>::name());
45 template <>
struct types_to_string_list_helper<>
47 std::list<std::string> operator()()
const
49 return std::list<std::string>();
53 template <
typename... Args> std::list<std::string> types_to_string_list()
55 return types_to_string_list_helper<Args...>()();
63 template <
typename R,
typename... Args>
void operator()(
const char* name, std::function<R(Args...)>& memb)
67 std::ostringstream ss;
68 ss << std::setw(40) << std::left << fc::get_typename<R>::name() <<
" " << name <<
"(";
69 ss << boost::algorithm::join(types_to_string_list<Args...>(),
", ");
79 fc::api<wallet_api> tmp;
83 std::inserter(method_descriptions, method_descriptions.end()));
std::vector< method_description > method_descriptions
void operator()(const char *name, std::function< R(Args...)> &memb)
std::string brief_description