1#ifndef XRPL_PROTOCOL_STISSUE_H_INCLUDED
2#define XRPL_PROTOCOL_STISSUE_H_INCLUDED
4#include <xrpl/basics/CountedObject.h>
5#include <xrpl/protocol/Asset.h>
6#include <xrpl/protocol/SField.h>
7#include <xrpl/protocol/STBase.h>
8#include <xrpl/protocol/Serializer.h>
25 template <AssetType A>
33 template <Val
idIssueType TIss>
37 template <Val
idIssueType TIss>
42 value() const noexcept;
67 friend constexpr
std::weak_ordering
73 friend constexpr
std::weak_ordering
78 copy(
std::
size_t n,
void* buf) const override;
80 move(
std::
size_t n,
void* buf) override;
90 Throw<std::runtime_error>(
91 "Invalid asset: currency and account native mismatch");
97template <Val
idIssueType TIss>
104template <Val
idIssueType TIss>
109 Throw<std::runtime_error>(
"Asset doesn't hold the requested issue");
123 Throw<std::runtime_error>(
124 "Invalid asset: currency and account native mismatch");
150 return lhs.
asset_ <=> rhs;
constexpr TIss const & get() const
constexpr bool holds() const
Tracks the number of instances of an object.
A currency issued by an account.
A type which can be exported to a well known binary format.
STIssue & operator=(STIssue const &rhs)=default
void add(Serializer &s) const override
friend constexpr bool operator==(STIssue const &lhs, STIssue const &rhs)
friend constexpr std::weak_ordering operator<=>(STIssue const &lhs, STIssue const &rhs)
value_type const & value() const noexcept
friend class detail::STVar
STBase * copy(std::size_t n, void *buf) const override
Json::Value getJson(JsonOptions) const override
bool isEquivalent(STBase const &t) const override
bool isDefault() const override
STIssue(STIssue const &rhs)=default
void setIssue(Asset const &issue)
STBase * move(std::size_t n, void *buf) override
SerializedTypeID getSType() const override
std::string getText() const override
JSON (JavaScript Object Notation).
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Issue const & xrpIssue()
Returns an asset specifier that represents XRP.
bool isConsistent(Book const &book)
Issue issueFromJson(Json::Value const &v)
Note, should be treated as flags that can be | and &.