xrpld
Loading...
Searching...
No Matches
xrpl::DirectStepI< TDerived > Class Template Reference
Inheritance diagram for xrpl::DirectStepI< TDerived >:
Collaboration diagram for xrpl::DirectStepI< TDerived >:

Classes

struct  Cache

Public Member Functions

AccountID const & src () const
AccountID const & dst () const
Currency const & currency () const
std::optional< EitherAmountcachedIn () const override
std::optional< EitherAmountcachedOut () const override
std::optional< AccountIDdirectStepSrcAcct () const override
std::optional< std::pair< AccountID, AccountID > > directStepAccts () const override
DebtDirection debtDirection (ReadView const &sb, StrandDirection dir) const override
std::uint32_t lineQualityIn (ReadView const &v) const override
std::pair< std::optional< Quality >, DebtDirectionqualityUpperBound (ReadView const &v, DebtDirection dir) const override
std::pair< IOUAmount, IOUAmountrevImp (PaymentSandbox &sb, ApplyView &afView, boost::container::flat_set< uint256 > &ofrsToRm, IOUAmount const &out)
std::pair< IOUAmount, IOUAmountfwdImp (PaymentSandbox &sb, ApplyView &afView, boost::container::flat_set< uint256 > &ofrsToRm, IOUAmount const &in)
std::pair< bool, EitherAmountvalidFwd (PaymentSandbox &sb, ApplyView &afView, EitherAmount const &in) override
TER check (StrandContext const &ctx) const
void setCacheLimiting (IOUAmount const &fwdIn, IOUAmount const &fwdSrcToDst, IOUAmount const &fwdOut, DebtDirection srcDebtDir)

Protected Member Functions

std::pair< IOUAmount, DebtDirectionmaxPaymentFlow (ReadView const &sb) const
std::pair< std::uint32_t, std::uint32_tqualitiesSrcRedeems (ReadView const &sb) const
std::pair< std::uint32_t, std::uint32_tqualitiesSrcIssues (ReadView const &sb, DebtDirection prevStepDebtDirection) const
std::pair< std::uint32_t, std::uint32_tqualities (ReadView const &sb, DebtDirection srcDebtDir, StrandDirection strandDir) const
std::string logStringImpl (char const *name) const

Protected Attributes

AccountID src_
AccountID dst_
Currency currency_
Step const *const prevStep_ = nullptr
bool const isLast_
beast::Journal const j_
std::optional< Cachecache_

Private Member Functions

 DirectStepI (StrandContext const &ctx, AccountID const &src, AccountID const &dst, Currency const &c)
bool equal (Step const &rhs) const override

Private Attributes

friend TDerived

Friends

bool operator== (DirectStepI const &lhs, DirectStepI const &rhs)
bool operator!= (DirectStepI const &lhs, DirectStepI const &rhs)

Detailed Description

template<class TDerived>
class xrpl::DirectStepI< TDerived >

Definition at line 38 of file DirectStep.cpp.

Constructor & Destructor Documentation

◆ DirectStepI()

template<class TDerived>
xrpl::DirectStepI< TDerived >::DirectStepI ( StrandContext const & ctx,
AccountID const & src,
AccountID const & dst,
Currency const & c )
private

Definition at line 89 of file DirectStep.cpp.

Member Function Documentation

◆ maxPaymentFlow()

template<class TDerived>
std::pair< IOUAmount, DebtDirection > xrpl::DirectStepI< TDerived >::maxPaymentFlow ( ReadView const & sb) const
nodiscardprotected

Definition at line 478 of file DirectStep.cpp.

◆ qualitiesSrcRedeems()

template<class TDerived>
std::pair< std::uint32_t, std::uint32_t > xrpl::DirectStepI< TDerived >::qualitiesSrcRedeems ( ReadView const & sb) const
nodiscardprotected

Definition at line 738 of file DirectStep.cpp.

◆ qualitiesSrcIssues()

template<class TDerived>
std::pair< std::uint32_t, std::uint32_t > xrpl::DirectStepI< TDerived >::qualitiesSrcIssues ( ReadView const & sb,
DebtDirection prevStepDebtDirection ) const
nodiscardprotected

Definition at line 754 of file DirectStep.cpp.

◆ qualities()

template<class TDerived>
std::pair< std::uint32_t, std::uint32_t > xrpl::DirectStepI< TDerived >::qualities ( ReadView const & sb,
DebtDirection srcDebtDir,
StrandDirection strandDir ) const
nodiscardprotected

Definition at line 776 of file DirectStep.cpp.

◆ src()

template<class TDerived>
AccountID const & xrpl::DirectStepI< TDerived >::src ( ) const
nodiscard

Definition at line 105 of file DirectStep.cpp.

◆ dst()

template<class TDerived>
AccountID const & xrpl::DirectStepI< TDerived >::dst ( ) const
nodiscard

Definition at line 110 of file DirectStep.cpp.

◆ currency()

template<class TDerived>
Currency const & xrpl::DirectStepI< TDerived >::currency ( ) const
nodiscard

Definition at line 115 of file DirectStep.cpp.

◆ cachedIn()

template<class TDerived>
std::optional< EitherAmount > xrpl::DirectStepI< TDerived >::cachedIn ( ) const
nodiscardoverride

Definition at line 121 of file DirectStep.cpp.

◆ cachedOut()

template<class TDerived>
std::optional< EitherAmount > xrpl::DirectStepI< TDerived >::cachedOut ( ) const
nodiscardoverride

Definition at line 129 of file DirectStep.cpp.

◆ directStepSrcAcct()

template<class TDerived>
std::optional< AccountID > xrpl::DirectStepI< TDerived >::directStepSrcAcct ( ) const
nodiscardoverride

Definition at line 137 of file DirectStep.cpp.

◆ directStepAccts()

template<class TDerived>
std::optional< std::pair< AccountID, AccountID > > xrpl::DirectStepI< TDerived >::directStepAccts ( ) const
nodiscardoverride

Definition at line 143 of file DirectStep.cpp.

◆ debtDirection()

template<class TDerived>
DebtDirection xrpl::DirectStepI< TDerived >::debtDirection ( ReadView const & sb,
StrandDirection dir ) const
nodiscardoverride

Definition at line 492 of file DirectStep.cpp.

◆ lineQualityIn()

template<class TDerived>
std::uint32_t xrpl::DirectStepI< TDerived >::lineQualityIn ( ReadView const & v) const
nodiscardoverride

Definition at line 796 of file DirectStep.cpp.

◆ qualityUpperBound()

template<class TDerived>
std::pair< std::optional< Quality >, DebtDirection > xrpl::DirectStepI< TDerived >::qualityUpperBound ( ReadView const & v,
DebtDirection dir ) const
nodiscardoverride

Definition at line 804 of file DirectStep.cpp.

◆ revImp()

template<class TDerived>
std::pair< IOUAmount, IOUAmount > xrpl::DirectStepI< TDerived >::revImp ( PaymentSandbox & sb,
ApplyView & afView,
boost::container::flat_set< uint256 > & ofrsToRm,
IOUAmount const & out )

Definition at line 503 of file DirectStep.cpp.

◆ fwdImp()

template<class TDerived>
std::pair< IOUAmount, IOUAmount > xrpl::DirectStepI< TDerived >::fwdImp ( PaymentSandbox & sb,
ApplyView & afView,
boost::container::flat_set< uint256 > & ofrsToRm,
IOUAmount const & in )

Definition at line 617 of file DirectStep.cpp.

◆ validFwd()

template<class TDerived>
std::pair< bool, EitherAmount > xrpl::DirectStepI< TDerived >::validFwd ( PaymentSandbox & sb,
ApplyView & afView,
EitherAmount const & in )
override

Definition at line 686 of file DirectStep.cpp.

◆ check()

template<class TDerived>
TER xrpl::DirectStepI< TDerived >::check ( StrandContext const & ctx) const
nodiscard

Definition at line 823 of file DirectStep.cpp.

◆ setCacheLimiting()

template<class TDerived>
void xrpl::DirectStepI< TDerived >::setCacheLimiting ( IOUAmount const & fwdIn,
IOUAmount const & fwdSrcToDst,
IOUAmount const & fwdOut,
DebtDirection srcDebtDir )

Definition at line 575 of file DirectStep.cpp.

◆ logStringImpl()

template<class TDerived>
std::string xrpl::DirectStepI< TDerived >::logStringImpl ( char const * name) const
protected

Definition at line 200 of file DirectStep.cpp.

◆ equal()

template<class TDerived>
bool xrpl::DirectStepI< TDerived >::equal ( Step const & rhs) const
nodiscardoverrideprivate

Definition at line 210 of file DirectStep.cpp.

◆ operator==

template<class TDerived>
bool operator== ( DirectStepI< TDerived > const & lhs,
DirectStepI< TDerived > const & rhs )
friend

Definition at line 187 of file DirectStep.cpp.

◆ operator!=

template<class TDerived>
bool operator!= ( DirectStepI< TDerived > const & lhs,
DirectStepI< TDerived > const & rhs )
friend

Definition at line 193 of file DirectStep.cpp.

Member Data Documentation

◆ src_

template<class TDerived>
AccountID xrpl::DirectStepI< TDerived >::src_
protected

Definition at line 41 of file DirectStep.cpp.

◆ dst_

template<class TDerived>
AccountID xrpl::DirectStepI< TDerived >::dst_
protected

Definition at line 42 of file DirectStep.cpp.

◆ currency_

template<class TDerived>
Currency xrpl::DirectStepI< TDerived >::currency_
protected

Definition at line 43 of file DirectStep.cpp.

◆ prevStep_

template<class TDerived>
Step const* const xrpl::DirectStepI< TDerived >::prevStep_ = nullptr
protected

Definition at line 46 of file DirectStep.cpp.

◆ isLast_

template<class TDerived>
bool const xrpl::DirectStepI< TDerived >::isLast_
protected

Definition at line 47 of file DirectStep.cpp.

◆ j_

template<class TDerived>
beast::Journal const xrpl::DirectStepI< TDerived >::j_
protected

Definition at line 48 of file DirectStep.cpp.

◆ cache_

template<class TDerived>
std::optional<Cache> xrpl::DirectStepI< TDerived >::cache_
protected

Definition at line 67 of file DirectStep.cpp.

◆ TDerived

template<class TDerived>
friend xrpl::DirectStepI< TDerived >::TDerived
private

Definition at line 219 of file DirectStep.cpp.