20 #ifndef RIPPLE_PROTOCOL_STBASE_H_INCLUDED
21 #define RIPPLE_PROTOCOL_STBASE_H_INCLUDED
23 #include <ripple/basics/contract.h>
24 #include <ripple/protocol/SField.h>
25 #include <ripple/protocol/Serializer.h>
147 D* ptr =
dynamic_cast<D*
>(
this);
149 Throw<std::bad_cast>();
157 D
const* ptr =
dynamic_cast<D const*
>(
this);
159 Throw<std::bad_cast>();
169 return new U(std::forward<T>(val));
170 return new (buf) U(std::forward<T>(val));
STBase & operator=(const STBase &t)
virtual SerializedTypeID getSType() const
virtual bool isEquivalent(STBase const &t) const
virtual void add(Serializer &s) const
virtual STBase * copy(std::size_t n, void *buf) const
void addFieldID(Serializer &s) const
std::ostream & operator<<(std::ostream &os, TOffer< TIn, TOut > const &offer)
virtual bool isDefault() const
static STBase * emplace(std::size_t n, void *buf, T &&val)
void setFName(SField const &n)
A STBase is a field.
virtual std::string getText() const
virtual std::string getFullText() const
SField const & getFName() const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
virtual ~STBase()=default
A type which can be exported to a well known binary format.
bool operator!=(const STBase &t) const
bool operator==(const STBase &t) const
virtual STBase * move(std::size_t n, void *buf)
virtual Json::Value getJson(JsonOptions) const