1#include <xrpl/protocol/STAccount.h>
3#include <xrpl/basics/Buffer.h>
4#include <xrpl/basics/base_uint.h>
5#include <xrpl/basics/contract.h>
6#include <xrpl/beast/utility/Zero.h>
7#include <xrpl/beast/utility/instrumentation.h>
8#include <xrpl/protocol/AccountID.h>
9#include <xrpl/protocol/SField.h>
10#include <xrpl/protocol/STBase.h>
11#include <xrpl/protocol/Serializer.h>
62 return emplace(n, buf, std::move(*
this));
74 XRPL_ASSERT(
getFName().isBinary(),
"xrpl::STAccount::add : field is binary");
75 XRPL_ASSERT(
getFName().fieldType == STI_ACCOUNT,
"xrpl::STAccount::add : valid field type");
87 auto const*
const tPtr =
dynamic_cast<STAccount const*
>(&t);
88 return (tPtr !=
nullptr) && (
default_ == tPtr->default_) && (
value_ == tPtr->value_);
static constexpr std::size_t kBytes
Like std::vector<char> but better.
bool empty() const noexcept
std::size_t size() const noexcept
Returns the number of bytes in the buffer.
std::uint8_t const * data() const noexcept
Return a pointer to beginning of the storage.
bool isDefault() const override
bool isEquivalent(STBase const &t) const override
void add(Serializer &s) const override
STBase * move(std::size_t n, void *buf) override
SerializedTypeID getSType() const override
STBase * copy(std::size_t n, void *buf) const override
std::string getText() const override
AccountID const & value() const noexcept
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)
int addVL(Blob const &vector)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
XRPL_NO_SANITIZE_ADDRESS void Throw(Args &&... args)