20 #ifndef RIPPLE_PROTOCOL_STBITSTRING_H_INCLUDED
21 #define RIPPLE_PROTOCOL_STBITSTRING_H_INCLUDED
23 #include <ripple/beast/utility/Zero.h>
24 #include <ripple/protocol/STBase.h>
33 class STBitString final :
public STBase
35 static_assert(Bits > 0,
"Number of bits must be positive");
66 template <
typename Tag>
114 return emplace(n, buf, *
this);
121 return emplace(n, buf, std::move(*
this));
157 return v && (value_ == v->value_);
164 assert(getFName().isBinary());
165 assert(getFName().fieldType == getSType());
170 template <
typename Tag>
194 return value_ == beast::zero;
value_type const & value() const
void setValue(base_uint< Bits, Tag > const &v)
STBase * copy(std::size_t n, void *buf) const override
STBase * move(std::size_t n, void *buf) override
void add(Serializer &s) const override
base_uint< Bits > value_type
bool isDefault() const override
SerializedTypeID getSType() const override
bool isEquivalent(const STBase &t) const override
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
int addBitString(base_uint< Bits, Tag > const &v)
std::string getText() const override
A type which can be exported to a well known binary format.
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.