xrpld
Loading...
Searching...
No Matches
xrpl::test::jtx::XrpT Struct Reference

#include <amount.h>

Public Member Functions

 operator Issue () const
 Implicit conversion to Issue.
 operator Asset () const
None operator() (NoneT) const
 Returns None-of-XRP.
template<class T, class = std::enable_if_t<std::is_integral_v<T>>>
PrettyAmount operator() (T v) const
 Returns an amount of XRP as PrettyAmount, which is trivially convertible to STAmount.
PrettyAmount operator() (Number v) const
 Returns an amount of XRP as PrettyAmount, which is trivially convertible to STAmount.
PrettyAmount operator() (double v) const

Static Public Member Functions

static bool integral ()

Friends

BookSpec operator~ (XrpT const &)

Detailed Description

Definition at line 245 of file src/test/jtx/amount.h.

Member Function Documentation

◆ operator Issue()

xrpl::test::jtx::XrpT::operator Issue ( ) const

Implicit conversion to Issue.

This allows passing XRP where an Issue is expected.

Definition at line 252 of file src/test/jtx/amount.h.

◆ operator Asset()

xrpl::test::jtx::XrpT::operator Asset ( ) const

Definition at line 256 of file src/test/jtx/amount.h.

◆ integral()

bool xrpl::test::jtx::XrpT::integral ( )
static

Definition at line 262 of file src/test/jtx/amount.h.

◆ operator()() [1/4]

template<class T, class = std::enable_if_t<std::is_integral_v<T>>>
PrettyAmount xrpl::test::jtx::XrpT::operator() ( T v) const

Returns an amount of XRP as PrettyAmount, which is trivially convertible to STAmount.

Parameters
vThe number of XRP (not drops)

Definition at line 275 of file src/test/jtx/amount.h.

◆ operator()() [2/4]

PrettyAmount xrpl::test::jtx::XrpT::operator() ( Number v) const

Returns an amount of XRP as PrettyAmount, which is trivially convertible to STAmount.

Parameters
vThe Number of XRP (not drops). May be fractional.

Definition at line 287 of file src/test/jtx/amount.h.

◆ operator()() [3/4]

PrettyAmount xrpl::test::jtx::XrpT::operator() ( double v) const

Definition at line 297 of file src/test/jtx/amount.h.

◆ operator()() [4/4]

None xrpl::test::jtx::XrpT::operator() ( NoneT ) const

Returns None-of-XRP.

Definition at line 316 of file src/test/jtx/amount.h.

◆ operator~

BookSpec operator~ ( XrpT const & )
friend

Definition at line 322 of file src/test/jtx/amount.h.