mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Improved human readable JSON-RPC error messages
This commit is contained in:
@@ -53,18 +53,18 @@ public:
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Defines the fields and their attributes within a SerializedObject.
|
||||
|
||||
Each subclass of SerializedObject will provide its own template
|
||||
describing the available fields and their metadata attributes.
|
||||
*/
|
||||
class SOTemplate
|
||||
{
|
||||
public:
|
||||
/** Create an empty template.
|
||||
typedef std::unique_ptr <SOElement const> value_type;
|
||||
typedef std::vector <value_type> list_type;
|
||||
|
||||
/** Create an empty template.
|
||||
After creating the template, call @ref push_back with the
|
||||
desired fields.
|
||||
|
||||
@see push_back
|
||||
*/
|
||||
SOTemplate ();
|
||||
@@ -72,21 +72,19 @@ public:
|
||||
// VFALCO NOTE Why do we even bother with the 'private' keyword if
|
||||
// this function is present?
|
||||
//
|
||||
std::vector <SOElement const*> const& peek () const
|
||||
list_type const& peek () const
|
||||
{
|
||||
return mTypes;
|
||||
}
|
||||
|
||||
/** Add an element to the template.
|
||||
*/
|
||||
/** Add an element to the template. */
|
||||
void push_back (SOElement const& r);
|
||||
|
||||
/** Retrieve the position of a named field.
|
||||
*/
|
||||
/** Retrieve the position of a named field. */
|
||||
int getIndex (SField::ref) const;
|
||||
|
||||
private:
|
||||
std::vector <SOElement const*> mTypes;
|
||||
list_type mTypes;
|
||||
|
||||
std::vector <int> mIndex; // field num -> index
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user