20#ifndef RIPPLE_PROTOCOL_STBASE_H_INCLUDED
21#define RIPPLE_PROTOCOL_STBASE_H_INCLUDED
23#include <xrpl/basics/contract.h>
24#include <xrpl/protocol/SField.h>
25#include <xrpl/protocol/Serializer.h>
56 [[nodiscard]]
constexpr explicit
61 [[nodiscard]]
constexpr explicit
62 operator bool() const noexcept
66 [[nodiscard]]
constexpr auto friend
68 [[nodiscard]]
constexpr auto friend
75 return {lh.
value | rh.value};
82 return {lh.
value & rh.value};
95 requires requires(T
const& t) {
215 D* ptr =
dynamic_cast<D*
>(
this);
217 Throw<std::bad_cast>();
225 D
const* ptr =
dynamic_cast<D const*
>(
this);
227 Throw<std::bad_cast>();
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 ~STBase()=default
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
D const & downcast() 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
STBase(STBase const &)=default
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)
Json::Value to_json(Asset const &asset)
Note, should be treated as flags that can be | and &.
constexpr JsonOptions friend operator~(JsonOptions v) noexcept
Returns JsonOptions binary negation, can be used with & (above) for set difference e....
constexpr JsonOptions friend operator|(JsonOptions lh, JsonOptions rh) noexcept
Returns JsonOptions union of lh and rh.
constexpr JsonOptions(underlying_t v) noexcept
constexpr auto friend operator==(JsonOptions lh, JsonOptions rh) noexcept -> bool=default
unsigned int underlying_t
constexpr JsonOptions friend operator&(JsonOptions lh, JsonOptions rh) noexcept
Returns JsonOptions intersection of lh and rh.
constexpr auto friend operator!=(JsonOptions lh, JsonOptions rh) noexcept -> bool=default