1#include <xrpl/protocol/STVector256.h>
3#include <xrpl/basics/base_uint.h>
4#include <xrpl/basics/contract.h>
5#include <xrpl/beast/utility/instrumentation.h>
6#include <xrpl/json/json_value.h>
7#include <xrpl/protocol/SField.h>
8#include <xrpl/protocol/STBase.h>
9#include <xrpl/protocol/Serializer.h>
24 Throw<std::runtime_error>(
25 "Bad serialization for STVector256: " + std::to_string(slice.size()));
45 return emplace(n, buf, std::move(*
this));
63 XRPL_ASSERT(
getFName().isBinary(),
"xrpl::STVector256::add : field is binary");
64 XRPL_ASSERT(
getFName().fieldType == STI_VECTOR256,
"xrpl::STVector256::add : valid field type");
80 for (
auto const& vEntry :
value_)
Value & append(Value const &value)
Append value to array at the end.
static BaseUInt fromRaw(Container const &c)
static constexpr std::size_t size()
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)
json::Value getJson(JsonOptions) const override
void add(Serializer &s) const override
bool isEquivalent(STBase const &t) const override
STBase * move(std::size_t n, void *buf) override
std::vector< uint256 > value_
SerializedTypeID getSType() const override
bool isDefault() const override
STBase * copy(std::size_t n, void *buf) const override
Slice getSlice(std::size_t bytes)
int addVL(Blob const &vector)
std::size_t size() const noexcept
Returns the number of bytes in the storage.
@ Array
array value (ordered list)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string to_string(BaseUInt< Bits, Tag > const &a)
Note, should be treated as flags that can be | and &.