20 #ifndef RIPPLE_PROTOCOL_AMOUNTCONVERSION_H_INCLUDED
21 #define RIPPLE_PROTOCOL_AMOUNTCONVERSION_H_INCLUDED
23 #include <ripple/basics/IOUAmount.h>
24 #include <ripple/basics/XRPAmount.h>
25 #include <ripple/protocol/STAmount.h>
32 bool const isNeg = iou.
signum() < 0;
52 bool const isNeg = xrp.
signum() < 0;
66 toAmount(STAmount
const& amt) =
delete;
103 toAmount(IOUAmount
const& amt) =
delete;
114 toAmount(XRPAmount
const& amt) =
delete;
int exponent() const noexcept
A currency issued by an account.
std::uint64_t mantissa() const noexcept
constexpr value_type drops() const
Returns the number of drops.
Issue const & noIssue()
Returns an asset specifier that represents no account and currency.
T toAmount(STAmount const &amt)=delete
Floating point representation of amounts with high dynamic range.
IOUAmount toAmount< IOUAmount >(STAmount const &amt)
int signum() const noexcept
Return the sign of the amount.
int exponent() const noexcept
XRPAmount toAmount< XRPAmount >(STAmount const &amt)
STAmount toSTAmount(IOUAmount const &iou, Issue const &iss)
bool isXRP(AccountID const &c)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::int64_t mantissa() const noexcept
bool negative() const noexcept
STAmount toAmount< STAmount >(STAmount const &amt)
constexpr int signum() const noexcept
Return the sign of the amount.