|
rippled
|
#include <Offer.h>


Public Member Functions | |
| TOffer ()=default | |
| TOffer (SLE::pointer const &entry, Quality quality) | |
| Quality | quality () const noexcept |
| Returns the quality of the offer. | |
| AccountID const & | owner () const |
| Returns the account id of the offer's owner. | |
| TAmounts< TIn, TOut > const & | amount () const |
| Returns the in and out amounts. | |
| bool | fully_consumed () const |
Returns true if no more funds can flow through this offer. | |
| void | consume (ApplyView &view, TAmounts< TIn, TOut > const &consumed) |
| Adjusts the offer to indicate that we consumed some (or all) of it. | |
| std::string | id () const |
| std::optional< uint256 > | key () const |
| Issue const & | issueIn () const |
| Issue const & | issueOut () const |
| TAmounts< TIn, TOut > | limitOut (TAmounts< TIn, TOut > const &offerAmount, TOut const &limit, bool roundUp) const |
| TAmounts< TIn, TOut > | limitIn (TAmounts< TIn, TOut > const &offerAmount, TIn const &limit, bool roundUp) const |
| bool | isFunded () const |
| bool | checkInvariant (TAmounts< TIn, TOut > const &consumed, beast::Journal j) const |
| Check any required invariant. | |
| TOffer (SLE::pointer const &entry, Quality quality) | |
| Issue const & | issueIn () const |
| Issue const & | issueOut () const |
Static Public Member Functions | |
| template<typename... Args> | |
| static TER | send (Args &&... args) |
| static std::pair< std::uint32_t, std::uint32_t > | adjustRates (std::uint32_t ofrInRate, std::uint32_t ofrOutRate) |
Private Member Functions | |
| void | setFieldAmounts () |
| void | setFieldAmounts () |
| void | setFieldAmounts () |
| void | setFieldAmounts () |
| void | setFieldAmounts () |
Private Attributes | |
| SLE::pointer | m_entry |
| Quality | m_quality {} |
| AccountID | m_account |
| TAmounts< TIn, TOut > | m_amounts {} |
| Issue | issIn_ |
| Issue | issOut_ |
Definition at line 31 of file tx/paths/Offer.h.
|
default |
| xrpl::TOffer< TIn, TOut >::TOffer | ( | SLE::pointer const & | entry, |
| Quality | quality | ||
| ) |
Definition at line 173 of file tx/paths/Offer.h.
| xrpl::TOffer< STAmount, STAmount >::TOffer | ( | SLE::pointer const & | entry, |
| Quality | quality | ||
| ) |
Definition at line 185 of file tx/paths/Offer.h.
|
private |
Definition at line 195 of file tx/paths/Offer.h.
|
noexcept |
Returns the quality of the offer.
Conceptually, the quality is the ratio of output to input currency. The implementation calculates it as the ratio of input to output currency (so it sorts ascending). The quality is computed at the time the offer is placed, and never changes for the lifetime of the offer. This is an important business rule that maintains accuracy when an offer is partially filled; Subsequent partial fills will use the original quality.
Definition at line 57 of file tx/paths/Offer.h.
| AccountID const & xrpl::TOffer< TIn, TOut >::owner | ( | ) | const |
Returns the account id of the offer's owner.
Definition at line 64 of file tx/paths/Offer.h.
| TAmounts< TIn, TOut > const & xrpl::TOffer< TIn, TOut >::amount | ( | ) | const |
Returns the in and out amounts.
Some or all of the out amount may be unfunded.
Definition at line 73 of file tx/paths/Offer.h.
| bool xrpl::TOffer< TIn, TOut >::fully_consumed | ( | ) | const |
Returns true if no more funds can flow through this offer.
Definition at line 80 of file tx/paths/Offer.h.
| void xrpl::TOffer< TIn, TOut >::consume | ( | ApplyView & | view, |
| TAmounts< TIn, TOut > const & | consumed | ||
| ) |
Adjusts the offer to indicate that we consumed some (or all) of it.
Definition at line 91 of file tx/paths/Offer.h.
| std::string xrpl::TOffer< TIn, TOut >::id | ( | ) | const |
Definition at line 105 of file tx/paths/Offer.h.
| std::optional< uint256 > xrpl::TOffer< TIn, TOut >::key | ( | ) | const |
Definition at line 111 of file tx/paths/Offer.h.
| Issue const & xrpl::TOffer< TIn, TOut >::issueIn | ( | ) | const |
Definition at line 273 of file tx/paths/Offer.h.
| Issue const & xrpl::TOffer< TIn, TOut >::issueOut | ( | ) | const |
Definition at line 287 of file tx/paths/Offer.h.
| TAmounts< TIn, TOut > xrpl::TOffer< TIn, TOut >::limitOut | ( | TAmounts< TIn, TOut > const & | offerAmount, |
| TOut const & | limit, | ||
| bool | roundUp | ||
| ) | const |
Definition at line 208 of file tx/paths/Offer.h.
| TAmounts< TIn, TOut > xrpl::TOffer< TIn, TOut >::limitIn | ( | TAmounts< TIn, TOut > const & | offerAmount, |
| TIn const & | limit, | ||
| bool | roundUp | ||
| ) | const |
Definition at line 218 of file tx/paths/Offer.h.
|
static |
Definition at line 234 of file tx/paths/Offer.h.
| bool xrpl::TOffer< TIn, TOut >::isFunded | ( | ) | const |
Definition at line 132 of file tx/paths/Offer.h.
|
static |
Definition at line 139 of file tx/paths/Offer.h.
| bool xrpl::TOffer< TIn, TOut >::checkInvariant | ( | TAmounts< TIn, TOut > const & | consumed, |
| beast::Journal | j | ||
| ) | const |
Check any required invariant.
Limit order book offer always returns true.
Definition at line 149 of file tx/paths/Offer.h.
|
private |
Definition at line 241 of file tx/paths/Offer.h.
|
private |
Definition at line 249 of file tx/paths/Offer.h.
|
private |
Definition at line 257 of file tx/paths/Offer.h.
|
private |
Definition at line 265 of file tx/paths/Offer.h.
| Issue const & xrpl::TOffer< STAmount, STAmount >::issueIn | ( | ) | const |
Definition at line 280 of file tx/paths/Offer.h.
| Issue const & xrpl::TOffer< STAmount, STAmount >::issueOut | ( | ) | const |
Definition at line 294 of file tx/paths/Offer.h.
|
private |
Definition at line 34 of file tx/paths/Offer.h.
|
private |
Definition at line 35 of file tx/paths/Offer.h.
|
private |
Definition at line 36 of file tx/paths/Offer.h.
|
private |
Definition at line 38 of file tx/paths/Offer.h.
|
protectedinherited |
Definition at line 19 of file tx/paths/Offer.h.
|
protectedinherited |
Definition at line 20 of file tx/paths/Offer.h.