Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/util.h
Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | RPCArg(const std::string &name, const Type &type, const bool opt, | ||||
: m_name{name}, m_type{type}, m_inner{inner}, m_optional{opt}, | : m_name{name}, m_type{type}, m_inner{inner}, m_optional{opt}, | ||||
m_default_value{default_val}, m_description{description}, | m_default_value{default_val}, m_description{description}, | ||||
m_oneline_description{oneline_description}, m_type_str{type_str} { | m_oneline_description{oneline_description}, m_type_str{type_str} { | ||||
CHECK_NONFATAL(type == Type::ARR || type == Type::OBJ); | CHECK_NONFATAL(type == Type::ARR || type == Type::OBJ); | ||||
} | } | ||||
/** | /** | ||||
* Return the type string of the argument. | * Return the type string of the argument. | ||||
* Set oneline to allow it to be overrided by a custom oneline type string | * Set oneline to allow it to be overridden by a custom oneline type string | ||||
* (m_oneline_description). | * (m_oneline_description). | ||||
*/ | */ | ||||
std::string ToString(bool oneline) const; | std::string ToString(bool oneline) const; | ||||
/** | /** | ||||
* Return the type string of the argument when it is in an object (dict). | * Return the type string of the argument when it is in an object (dict). | ||||
* Set oneline to get the oneline representation (less whitespace) | * Set oneline to get the oneline representation (less whitespace) | ||||
*/ | */ | ||||
std::string ToStringObj(bool oneline) const; | std::string ToStringObj(bool oneline) const; | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |