20#ifndef RIPPLE_PROTOCOL_STISSUE_H_INCLUDED
21#define RIPPLE_PROTOCOL_STISSUE_H_INCLUDED
23#include <xrpl/basics/CountedObject.h>
24#include <xrpl/protocol/Asset.h>
25#include <xrpl/protocol/SField.h>
26#include <xrpl/protocol/STBase.h>
27#include <xrpl/protocol/Serializer.h>
44 template <AssetType A>
52 template <Val
idIssueType TIss>
56 template <Val
idIssueType TIss>
61 value() const noexcept;
86 friend constexpr
std::weak_ordering
92 friend constexpr
std::weak_ordering
97 copy(
std::
size_t n,
void* buf) const override;
99 move(
std::
size_t n,
void* buf) override;
109 Throw<std::runtime_error>(
110 "Invalid asset: currency and account native mismatch");
116template <Val
idIssueType TIss>
123template <Val
idIssueType TIss>
128 Throw<std::runtime_error>(
"Asset doesn't hold the requested issue");
142 Throw<std::runtime_error>(
143 "Invalid asset: currency and account native mismatch");
169 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 &.