1#include <xrpl/protocol/STBase.h>
3#include <xrpl/beast/utility/instrumentation.h>
4#include <xrpl/json/json_value.h>
5#include <xrpl/protocol/SField.h>
6#include <xrpl/protocol/Serializer.h>
21 XRPL_ASSERT(
fName_,
"xrpl::STBase::STBase : field is set");
56 return emplace(n, buf, std::move(*
this));
62 return STI_NOTPRESENT;
101 UNREACHABLE(
"xrpl::STBase::add : not implemented");
108 XRPL_ASSERT(
getSType() == STI_NOTPRESENT,
"xrpl::STBase::isEquivalent : type not present");
109 return t.
getSType() == STI_NOTPRESENT;
122 XRPL_ASSERT(
fName_,
"xrpl::STBase::setFName : field is set");
134 XRPL_ASSERT(
fName_->isBinary(),
"xrpl::STBase::addFieldID : field is binary");
A type which can be exported to a well known binary format.
SField const & getFName() const
static STBase * emplace(std::size_t n, void *buf, T &&val)
virtual bool isEquivalent(STBase const &t) const
virtual std::string getFullText() const
STBase & operator=(STBase const &t)
bool operator!=(STBase const &t) const
virtual STBase * copy(std::size_t n, void *buf) const
virtual SerializedTypeID getSType() const
void setFName(SField const &n)
A STBase is a field.
virtual bool isDefault() const
bool operator==(STBase const &t) const
virtual json::Value getJson(JsonOptions=JsonOptions::Values::None) const
virtual STBase * move(std::size_t n, void *buf)
virtual std::string getText() const
void addFieldID(Serializer &s) const
virtual void add(Serializer &s) 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, BaseUInt< Bits, Tag > const &u)
Note, should be treated as flags that can be | and &.