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

Converts to IOU Issue or STAmount. More...

#include <amount.h>

Collaboration diagram for xrpl::test::jtx::IOU:
Collaboration graph
[legend]

Public Member Functions

 IOU (Account const &account_, xrpl::Currency const &currency_)
 
Issue issue () const
 
Asset asset () const
 
 operator Issue () const
 Implicit conversion to Issue or Asset.
 
 operator PrettyAsset () const
 
template<class T , class = std::enable_if_t< sizeof(T) >= sizeof(int) && std::is_arithmetic<T>::value>
PrettyAmount operator() (T v) const
 
PrettyAmount operator() (epsilon_t) const
 
PrettyAmount operator() (detail::epsilon_multiple) const
 
None operator() (none_t) const
 Returns None-of-Issue.
 

Public Attributes

Account account
 
xrpl::Currency currency
 

Friends

BookSpec operator~ (IOU const &iou)
 

Detailed Description

Converts to IOU Issue or STAmount.

Examples: IOU Converts to the underlying Issue IOU(10) Returns STAmount of 10 of the underlying Issue.

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

Constructor & Destructor Documentation

◆ IOU()

xrpl::test::jtx::IOU::IOU ( Account const &  account_,
xrpl::Currency const &  currency_ 
)

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

Member Function Documentation

◆ issue()

Issue xrpl::test::jtx::IOU::issue ( ) const

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

◆ asset()

Asset xrpl::test::jtx::IOU::asset ( ) const

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

◆ operator Issue()

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

Implicit conversion to Issue or Asset.

This allows passing an IOU value where an Issue or Asset is expected.

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

◆ operator PrettyAsset()

xrpl::test::jtx::IOU::operator PrettyAsset ( ) const

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

◆ operator()() [1/4]

template<class T , class = std::enable_if_t< sizeof(T) >= sizeof(int) && std::is_arithmetic<T>::value>
PrettyAmount xrpl::test::jtx::IOU::operator() ( v) const

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

◆ operator()() [2/4]

PrettyAmount xrpl::test::jtx::IOU::operator() ( epsilon_t  ) const

Definition at line 95 of file amount.cpp.

◆ operator()() [3/4]

PrettyAmount xrpl::test::jtx::IOU::operator() ( detail::epsilon_multiple  m) const

Definition at line 101 of file amount.cpp.

◆ operator()() [4/4]

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

Returns None-of-Issue.

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

Friends And Related Symbol Documentation

◆ operator~

BookSpec operator~ ( IOU const &  iou)
friend

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

Member Data Documentation

◆ account

Account xrpl::test::jtx::IOU::account

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

◆ currency

xrpl::Currency xrpl::test::jtx::IOU::currency

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