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

Converts to IOU Issue or STAmount. More...

#include <amount.h>

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

Public Member Functions

 IOU (Account const &account_, ripple::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
 
ripple::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 348 of file src/test/jtx/amount.h.

Constructor & Destructor Documentation

◆ IOU()

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

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

Member Function Documentation

◆ issue()

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

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

◆ asset()

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

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

◆ operator Issue()

ripple::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 375 of file src/test/jtx/amount.h.

◆ operator PrettyAsset()

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

Definition at line 379 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 ripple::test::jtx::IOU::operator() ( v) const

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

◆ operator()() [2/4]

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

Definition at line 95 of file amount.cpp.

◆ operator()() [3/4]

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

Definition at line 101 of file amount.cpp.

◆ operator()() [4/4]

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

Returns None-of-Issue.

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

Friends And Related Symbol Documentation

◆ operator~

BookSpec operator~ ( IOU const &  iou)
friend

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

Member Data Documentation

◆ account

Account ripple::test::jtx::IOU::account

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

◆ currency

ripple::Currency ripple::test::jtx::IOU::currency

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