xrpld
Loading...
Searching...
No Matches
xrpl::TAmounts< In, Out > Struct Template Reference

Represents a pair of input and output currencies. More...

#include <Quality.h>

Public Member Functions

 TAmounts ()=default
 TAmounts (beast::Zero, beast::Zero)
 TAmounts (In in, Out out)
bool empty () const noexcept
 Returns true if either quantity is not positive.
TAmountsoperator+= (TAmounts const &rhs)
TAmountsoperator-= (TAmounts const &rhs)

Public Attributes

In in {}
Out out {}

Detailed Description

template<class In, class Out>
struct xrpl::TAmounts< In, Out >

Represents a pair of input and output currencies.

The input currency can be converted to the output currency by multiplying by the rate, represented by Quality.

For offers, "in" is always TakerPays and "out" is always TakerGets.

Definition at line 25 of file Quality.h.

Constructor & Destructor Documentation

◆ TAmounts() [1/3]

template<class In, class Out>
xrpl::TAmounts< In, Out >::TAmounts ( )
default

◆ TAmounts() [2/3]

template<class In, class Out>
xrpl::TAmounts< In, Out >::TAmounts ( beast::Zero ,
beast::Zero  )

Definition at line 29 of file Quality.h.

◆ TAmounts() [3/3]

template<class In, class Out>
xrpl::TAmounts< In, Out >::TAmounts ( In in,
Out out )

Definition at line 33 of file Quality.h.

Member Function Documentation

◆ empty()

template<class In, class Out>
bool xrpl::TAmounts< In, Out >::empty ( ) const
nodiscardnoexcept

Returns true if either quantity is not positive.

Definition at line 39 of file Quality.h.

◆ operator+=()

template<class In, class Out>
TAmounts & xrpl::TAmounts< In, Out >::operator+= ( TAmounts< In, Out > const & rhs)

Definition at line 45 of file Quality.h.

◆ operator-=()

template<class In, class Out>
TAmounts & xrpl::TAmounts< In, Out >::operator-= ( TAmounts< In, Out > const & rhs)

Definition at line 53 of file Quality.h.

Member Data Documentation

◆ in

template<class In, class Out>
In xrpl::TAmounts< In, Out >::in {}

Definition at line 60 of file Quality.h.

◆ out

template<class In, class Out>
Out xrpl::TAmounts< In, Out >::out {}

Definition at line 61 of file Quality.h.