20#include <xrpl/beast/utility/instrumentation.h>
21#include <xrpl/json/json_value.h>
22#include <xrpl/protocol/SField.h>
23#include <xrpl/protocol/STBase.h>
24#include <xrpl/protocol/Serializer.h>
39 XRPL_ASSERT(
fName,
"ripple::STBase::STBase : field is set");
71 return emplace(n, buf, std::move(*
this));
77 return STI_NOTPRESENT;
116 UNREACHABLE(
"ripple::STBase::add : not implemented");
125 "ripple::STBase::isEquivalent : type not present");
126 return t.
getSType() == STI_NOTPRESENT;
139 XRPL_ASSERT(
fName,
"ripple::STBase::setFName : field is set");
152 fName->
isBinary(),
"ripple::STBase::addFieldID : field is binary");
std::string const fieldName
SerializedTypeID const fieldType
A type which can be exported to a well known binary format.
void setFName(SField const &n)
A STBase is a field.
virtual STBase * move(std::size_t n, void *buf)
virtual bool isEquivalent(STBase const &t) const
virtual SerializedTypeID getSType() const
virtual std::string getText() const
STBase & operator=(STBase const &t)
SField const & getFName() const
bool operator==(STBase const &t) const
bool operator!=(STBase const &t) const
static STBase * emplace(std::size_t n, void *buf, T &&val)
virtual Json::Value getJson(JsonOptions=JsonOptions::none) const
void addFieldID(Serializer &s) const
virtual std::string getFullText() const
virtual void add(Serializer &s) const
virtual STBase * copy(std::size_t n, void *buf) const
virtual bool isDefault() const
int addFieldID(int type, int name)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::ostream & operator<<(std::ostream &out, base_uint< Bits, Tag > const &u)
Note, should be treated as flags that can be | and &.