20 #ifndef RIPPLE_PATH_IMPL_AMOUNTSPEC_H_INCLUDED
21 #define RIPPLE_PATH_IMPL_AMOUNTSPEC_H_INCLUDED
23 #include <ripple/basics/IOUAmount.h>
24 #include <ripple/basics/XRPAmount.h>
25 #include <ripple/protocol/STAmount.h>
52 stream <<
"/(" << *amt.
currency <<
")";
54 stream <<
"/" << *amt.
issuer <<
"";
77 #if defined(__GNUC__) && !defined(__clang__)
78 #pragma GCC diagnostic push
80 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
88 #if defined(__GNUC__) && !defined(__clang__)
89 #pragma GCC diagnostic pop
120 static_assert(
sizeof(T) == -1,
"Must used specialized function");
144 static_assert(
sizeof(T) == -1,
"Must used specialized function");
149 inline IOUAmount
const&
157 inline XRPAmount
const&
XRPAmount & get< XRPAmount >(EitherAmount &amt)
EitherAmount toEitherAmount(STAmount const &amt)
Issue const & issue() const
std::uint64_t mantissa() const noexcept
friend std::ostream & operator<<(std::ostream &stream, AmountSpec const &amt)
std::optional< AccountID > issuer
Floating point representation of amounts with high dynamic range.
IOUAmount & get< IOUAmount >(EitherAmount &amt)
EitherAmount(XRPAmount const &a)
int exponent() const noexcept
AmountSpec toAmountSpec(STAmount const &amt)
EitherAmount(AmountSpec const &a)
bool isXRP(AccountID const &c)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
EitherAmount(IOUAmount const &a)
friend std::ostream & operator<<(std::ostream &stream, EitherAmount const &amt)
bool negative() const noexcept
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
std::optional< Currency > currency
T & get(EitherAmount &amt)