1#ifndef XRPL_PROTOCOL_STBITSTRING_H_INCLUDED
2#define XRPL_PROTOCOL_STBITSTRING_H_INCLUDED
4#include <xrpl/basics/CountedObject.h>
5#include <xrpl/beast/utility/Zero.h>
6#include <xrpl/protocol/STBase.h>
17 static_assert(Bits > 0,
"Number of bits must be positive");
48 template <
typename Tag>
97 return emplace(n, buf, *
this);
104 return emplace(n, buf, std::move(*
this));
147 return v && (value_ == v->
value_);
155 getFName().isBinary(),
"ripple::STBitString::add : field is binary");
157 getFName().fieldType == getSType(),
158 "ripple::STBitString::add : field type match");
163template <
typename Tag>
187 return value_ == beast::zero;
Tracks the number of instances of an object.
A type which can be exported to a well known binary format.
bool isDefault() const override
STBase * move(std::size_t n, void *buf) override
std::string getText() const override
SerializedTypeID getSType() const override
STBase * copy(std::size_t n, void *buf) const override
bool isEquivalent(STBase const &t) const override
void setValue(base_uint< Bits, Tag > const &v)
value_type const & value() const
base_uint< Bits > value_type
void add(Serializer &s) const override
int addBitString(base_uint< Bits, Tag > const &v)
Integers of any length that is a multiple of 32-bits.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string to_string(base_uint< Bits, Tag > const &a)