rippled
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
xrpl::test::jtx::XRP_t Struct Reference

#include <amount.h>

Public Member Functions

 operator Issue () const
 Implicit conversion to Issue.
 
bool integral () const
 
None operator() (none_t) 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
 

Friends

BookSpec operator~ (XRP_t const &)
 

Detailed Description

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

Member Function Documentation

◆ operator Issue()

xrpl::test::jtx::XRP_t::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.

◆ integral()

bool xrpl::test::jtx::XRP_t::integral ( ) const

Definition at line 258 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::XRP_t::operator() ( 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 271 of file src/test/jtx/amount.h.

◆ operator()() [2/4]

PrettyAmount xrpl::test::jtx::XRP_t::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 283 of file src/test/jtx/amount.h.

◆ operator()() [3/4]

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

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

◆ operator()() [4/4]

None xrpl::test::jtx::XRP_t::operator() ( none_t  ) const

Returns None-of-XRP.

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

Friends And Related Symbol Documentation

◆ operator~

BookSpec operator~ ( XRP_t const &  )
friend

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