diff options
Diffstat (limited to 'src/rpc/util.h')
-rw-r--r-- | src/rpc/util.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/rpc/util.h b/src/rpc/util.h index 55ae2fa363..b1ab64247c 100644 --- a/src/rpc/util.h +++ b/src/rpc/util.h @@ -9,8 +9,6 @@ #include <script/standard.h> #include <univalue.h> -#include <boost/variant/static_visitor.hpp> - #include <string> #include <vector> @@ -45,15 +43,16 @@ struct RPCArg { const Type m_type; const std::vector<RPCArg> m_inner; //!< Only used for arrays or dicts const bool m_optional; + const std::string m_oneline_description; //!< Should be empty unless it is supposed to override the auto-generated summary line - RPCArg(const std::string& name, const Type& type, const bool optional) - : m_name{name}, m_type{type}, m_optional{optional} + RPCArg(const std::string& name, const Type& type, const bool optional, const std::string& oneline_description = "") + : m_name{name}, m_type{type}, m_optional{optional}, m_oneline_description{oneline_description} { assert(type != Type::ARR && type != Type::OBJ); } - RPCArg(const std::string& name, const Type& type, const std::vector<RPCArg>& inner, const bool optional) - : m_name{name}, m_type{type}, m_inner{inner}, m_optional{optional} + RPCArg(const std::string& name, const Type& type, const std::vector<RPCArg>& inner, const bool optional, const std::string& oneline_description = "") + : m_name{name}, m_type{type}, m_inner{inner}, m_optional{optional}, m_oneline_description{oneline_description} { assert(type == Type::ARR || type == Type::OBJ); } @@ -67,8 +66,8 @@ private: class RPCHelpMan { public: - RPCHelpMan(const std::string& name, const std::vector<RPCArg>& args) - : m_name{name}, m_args{args} + RPCHelpMan(const std::string& name, const std::string& description, const std::vector<RPCArg>& args) + : m_name{name}, m_description{description}, m_args{args} { } @@ -76,6 +75,7 @@ public: private: const std::string m_name; + const std::string m_description; const std::vector<RPCArg> m_args; }; |