3#include <xrpl/basics/CountedObject.h>
4#include <xrpl/beast/utility/Zero.h>
5#include <xrpl/protocol/STBase.h>
16 static_assert(Bits > 0,
"Number of bits must be positive");
47 template <
typename Tag>
102 return emplace(n, buf, std::move(*
this));
152 XRPL_ASSERT(
getFName().isBinary(),
"xrpl::STBitString::add : field is binary");
153 XRPL_ASSERT(
getFName().fieldType ==
getSType(),
"xrpl::STBitString::add : field type match");
158template <
typename Tag>
183 return value_ == beast::kZero;
Integers of any length that is a multiple of 32-bits.
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)
STBitString(SerialIter &sit, SField const &name)
std::string getText() const override
BaseUInt< Bits > value_type
void setValue(BaseUInt< Bits, Tag > const &v)
bool isDefault() const override
void add(Serializer &s) const override
STBase * copy(std::size_t n, void *buf) const override
SerializedTypeID getSType() const override
STBitString(value_type const &v)
STBase * move(std::size_t n, void *buf) override
STBitString(SField const &n)
STBitString(SField const &n, value_type const &v)
bool isEquivalent(STBase const &t) const override
value_type const & value() const
int addBitString(BaseUInt< Bits, Tag > const &v)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
STBitString< 128 > STUInt128
STBitString< 160 > STUInt160
std::string to_string(BaseUInt< Bits, Tag > const &a)
STBitString< 192 > STUInt192
STBitString< 256 > STUInt256