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>
92 return emplace(n, buf, std::move(*
this));
99 D* ptr =
dynamic_cast<D*
> (
this);
101 Throw<std::bad_cast> ();
109 D
const * ptr =
dynamic_cast<D const*
> (
this);
111 Throw<std::bad_cast> ();
165 return new U(std::forward<T>(val));
166 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
void addFieldID(Serializer &s) const
D const & downcast() const
virtual STBase * move(std::size_t n, void *buf)
std::ostream & operator<<(std::ostream &os, TOffer< TIn, TOut > const &offer)
static STBase * emplace(std::size_t n, void *buf, T &&val)
virtual STBase * copy(std::size_t n, void *buf) const
virtual bool isDefault() const
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 Json::Value getJson(JsonOptions) const