1#ifndef XRPL_TEST_JTX_AMOUNT_H_INCLUDED 
    2#define XRPL_TEST_JTX_AMOUNT_H_INCLUDED 
    4#include <test/jtx/Account.h> 
    5#include <test/jtx/tags.h> 
    7#include <xrpl/basics/contract.h> 
    8#include <xrpl/protocol/Issue.h> 
    9#include <xrpl/protocol/STAmount.h> 
   10#include <xrpl/protocol/Units.h> 
   89        : 
amount_((v > 0) ? v : -v, v < 0)
 
 
 
  167    template <
typename A>
 
  195    template <std::
integral T>
 
 
  251    template <
class T, 
class = std::enable_if_t<std::is_
integral_v<T>>>
 
  267            if (
double(d) / c != v)
 
  268                Throw<std::domain_error>(
"unrepresentable");
 
  272        if (
double(d) / c != v)
 
  273            Throw<std::domain_error>(
"unrepresentable");
 
 
 
  305template <
class Integer, 
class = std::enable_if_t<std::is_
integral_v<Integer>>>
 
  478    operator()(T v) 
const 
 
  499        Throw<std::logic_error>(
"MPT is not supported");
 
 
 
A currency issued by an account.
 
static rounding_mode getround()
 
void setIssuer(AccountID const &uIssuer)
 
int signum() const noexcept
 
constexpr value_type drops() const
Returns the number of drops.
 
Immutable cryptographic account descriptor.
 
AccountID id() const
Returns the Account ID.
 
std::string const & name() const
Return the name.
 
Converts to IOU Issue or STAmount.
 
ripple::Currency currency
 
IOU(Account const &account_, ripple::Currency const ¤cy_)
 
friend BookSpec operator~(IOU const &iou)
 
None operator()(none_t) const
Returns None-of-Issue.
 
PrettyAmount operator()(T v) const
 
Converts to MPT Issue or STAmount.
 
friend BookSpec operator~(MPT const &mpt)
 
PrettyAmount operator()(epsilon_t) const
 
MPT(std::string const &n, ripple::MPTID const &issuanceID_)
 
ripple::MPTIssue mptIssue() const
Explicit conversion to MPTIssue or asset.
 
None operator()(none_t) const
Returns None-of-Issue.
 
ripple::MPTID const & mpt() const
 
PrettyAmount operator()(detail::epsilon_multiple) const
 
PrettyAmount drops(Integer i)
Returns an XRP PrettyAmount, which is trivially convertible to STAmount.
 
std::ostream & operator<<(std::ostream &os, PrettyAmount const &amount)
 
constexpr XRPAmount dropsPerXRP
 
bool operator!=(PrettyAmount const &lhs, PrettyAmount const &rhs)
 
static epsilon_t const epsilon
 
any_t const any
Returns an amount representing "any issuer".
 
bool operator==(Account const &lhs, Account const &rhs) noexcept
 
XRP_t const XRP
Converts to XRP Issue or STAmount.
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
Issue const & xrpIssue()
Returns an asset specifier that represents XRP.
 
AccountID const & xrpAccount()
Compute AccountID from public key.
 
Currency const & noCurrency()
A placeholder for empty currencies.
 
Json::Value to_json(Asset const &asset)
 
Currency const & xrpCurrency()
XRP currency.
 
STAmount amountFromString(Asset const &asset, std::string const &amount)
 
Amount specifier with an option for any issuer.
 
void to(AccountID const &id)
 
AnyAmount(STAmount const &amount)
 
AnyAmount(STAmount const &amount, any_t const *)
 
AnyAmount & operator=(AnyAmount const &)=default
 
AnyAmount(AnyAmount const &)=default
 
ripple::Currency currency
 
BookSpec(AccountID const &account_, ripple::Currency const ¤cy_)
 
Represents an XRP or IOU quantity This customizes the string conversion and supports XRP conversions ...
 
PrettyAmount(PrettyAmount const &)=default
 
STAmount const & value() const
 
PrettyAmount(XRPAmount v)
drops
 
PrettyAmount(STAmount const &amount, std::string const &name)
 
PrettyAmount(T v, std::enable_if_t< sizeof(T) >=sizeof(int) &&std::is_integral_v< T > &&std::is_signed_v< T > > *=nullptr)
drops
 
std::string const & name() const
 
PrettyAmount(T v, std::enable_if_t< sizeof(T) >=sizeof(int) &&std::is_unsigned_v< T > > *=nullptr)
drops
 
PrettyAmount & operator=(PrettyAmount const &)=default
 
PrettyAmount operator()(Number v, Number::rounding_mode rounding=Number::getround()) const
 
Asset const & raw() const
 
PrettyAmount operator()(T v, Number::rounding_mode rounding=Number::getround()) const
 
None operator()(none_t) const
 
PrettyAsset(A const &asset, std::uint32_t scale=1)
 
PrettyAsset(Asset const &asset, std::uint32_t scale=1)
 
friend BookSpec operator~(XRP_t const &)
 
None operator()(none_t) const
Returns None-of-XRP.
 
PrettyAmount operator()(double v) const
 
PrettyAmount operator()(T v) const
Returns an amount of XRP as PrettyAmount, which is trivially convertable to STAmount.
 
AnyAmount operator()(STAmount const &sta) const
 
detail::epsilon_multiple operator()(std::size_t n) const