20#ifndef RIPPLE_PROTOCOL_STBITSTRING_H_INCLUDED
21#define RIPPLE_PROTOCOL_STBITSTRING_H_INCLUDED
23#include <xrpl/basics/CountedObject.h>
24#include <xrpl/beast/utility/Zero.h>
25#include <xrpl/protocol/STBase.h>
36 static_assert(Bits > 0,
"Number of bits must be positive");
67 template <
typename Tag>
116 return emplace(n, buf, *
this);
123 return emplace(n, buf, std::move(*
this));
166 return v && (value_ == v->
value_);
174 getFName().isBinary(),
"ripple::STBitString::add : field is binary");
176 getFName().fieldType == getSType(),
177 "ripple::STBitString::add : field type match");
182template <
typename Tag>
206 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
void setValue(base_uint< Bits, Tag > const &v)
value_type const & value() const
bool isEquivalent(const STBase &t) const override
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)