xrpld
Loading...
Searching...
No Matches
xrpl::test::jtx::IOU Class Reference

Converts to IOU Issue or STAmount. More...

#include <amount.h>

Collaboration diagram for xrpl::test::jtx::IOU:

Public Member Functions

 IOU (Account account, xrpl::Currency const &currency)
Issue issue () const
Asset asset () const
bool integral () const
 operator Issue () const
 Implicit conversion to Issue or Asset.
 operator Asset () const
 operator PrettyAsset () const
template<class T>
PrettyAmount operator() (T v) const
PrettyAmount operator() (EpsilonT) const
PrettyAmount operator() (detail::EpsilonMultiple) const
None operator() (NoneT) 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 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
nodiscard

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

◆ asset()

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

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

◆ integral()

bool xrpl::test::jtx::IOU::integral ( ) const
nodiscard

Definition at line 404 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 414 of file src/test/jtx/amount.h.

◆ operator Asset()

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

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

◆ operator PrettyAsset()

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

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

◆ operator()() [1/4]

template<class T>
PrettyAmount xrpl::test::jtx::IOU::operator() ( T v) const

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

◆ operator()() [2/4]

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

Definition at line 95 of file amount.cpp.

◆ operator()() [3/4]

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

Definition at line 101 of file amount.cpp.

◆ operator()() [4/4]

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

Returns None-of-Issue.

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

◆ operator~

BookSpec operator~ ( IOU const & iou)
friend

Definition at line 454 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.