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

Classes

struct  Cache

Public Member Functions

AccountID const & src () const
AccountID const & dst () const
MPTID const & mptID () 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< MPTAmount, MPTAmountrevImp (PaymentSandbox &sb, ApplyView &afView, boost::container::flat_set< uint256 > &ofrsToRm, MPTAmount const &out)
std::pair< MPTAmount, MPTAmountfwdImp (PaymentSandbox &sb, ApplyView &afView, boost::container::flat_set< uint256 > &ofrsToRm, MPTAmount const &in)
std::pair< bool, EitherAmountvalidFwd (PaymentSandbox &sb, ApplyView &afView, EitherAmount const &in) override
TER check (StrandContext const &ctx) const
void setCacheLimiting (MPTAmount const &fwdIn, MPTAmount const &fwdSrcToDst, MPTAmount const &fwdOut, DebtDirection srcDebtDir)

Protected Member Functions

std::pair< MPTAmount, 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
void resetCache (DebtDirection dir)
std::string logStringImpl (char const *name) const

Protected Attributes

AccountID const src_
AccountID const dst_
MPTIssue const mptIssue_
Step const *const prevStep_ = nullptr
bool const isLast_
bool const isDirectBetweenHolders_ = false
beast::Journal const j_
std::optional< Cachecache_

Private Member Functions

 MPTEndpointStep (StrandContext const &ctx, AccountID const &src, AccountID const &dst, MPTID const &mpt)
bool equal (Step const &rhs) const override

Private Attributes

friend TDerived

Friends

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

Detailed Description

template<class TDerived>
class xrpl::MPTEndpointStep< TDerived >

Definition at line 36 of file MPTEndpointStep.cpp.

Constructor & Destructor Documentation

◆ MPTEndpointStep()

template<class TDerived>
xrpl::MPTEndpointStep< TDerived >::MPTEndpointStep ( StrandContext const & ctx,
AccountID const & src,
AccountID const & dst,
MPTID const & mpt )
private

Definition at line 93 of file MPTEndpointStep.cpp.

Member Function Documentation

◆ maxPaymentFlow()

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

Definition at line 427 of file MPTEndpointStep.cpp.

◆ qualitiesSrcRedeems()

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

Definition at line 735 of file MPTEndpointStep.cpp.

◆ qualitiesSrcIssues()

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

Definition at line 751 of file MPTEndpointStep.cpp.

◆ qualities()

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

Definition at line 772 of file MPTEndpointStep.cpp.

◆ resetCache()

template<class TDerived>
void xrpl::MPTEndpointStep< TDerived >::resetCache ( xrpl::DebtDirection dir)
protected

Definition at line 903 of file MPTEndpointStep.cpp.

◆ src()

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

Definition at line 116 of file MPTEndpointStep.cpp.

◆ dst()

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

Definition at line 121 of file MPTEndpointStep.cpp.

◆ mptID()

template<class TDerived>
MPTID const & xrpl::MPTEndpointStep< TDerived >::mptID ( ) const
nodiscard

Definition at line 126 of file MPTEndpointStep.cpp.

◆ cachedIn()

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

Definition at line 132 of file MPTEndpointStep.cpp.

◆ cachedOut()

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

Definition at line 140 of file MPTEndpointStep.cpp.

◆ directStepSrcAcct()

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

Definition at line 148 of file MPTEndpointStep.cpp.

◆ directStepAccts()

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

Definition at line 154 of file MPTEndpointStep.cpp.

◆ debtDirection()

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

Definition at line 458 of file MPTEndpointStep.cpp.

◆ lineQualityIn()

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

Definition at line 792 of file MPTEndpointStep.cpp.

◆ qualityUpperBound()

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

Definition at line 800 of file MPTEndpointStep.cpp.

◆ revImp()

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

Definition at line 468 of file MPTEndpointStep.cpp.

◆ fwdImp()

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

Definition at line 598 of file MPTEndpointStep.cpp.

◆ validFwd()

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

Definition at line 684 of file MPTEndpointStep.cpp.

◆ check()

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

Definition at line 820 of file MPTEndpointStep.cpp.

◆ setCacheLimiting()

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

Definition at line 556 of file MPTEndpointStep.cpp.

◆ logStringImpl()

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

Definition at line 211 of file MPTEndpointStep.cpp.

◆ equal()

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

Definition at line 221 of file MPTEndpointStep.cpp.

◆ operator==

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

Definition at line 198 of file MPTEndpointStep.cpp.

◆ operator!=

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

Definition at line 204 of file MPTEndpointStep.cpp.

Member Data Documentation

◆ src_

template<class TDerived>
AccountID const xrpl::MPTEndpointStep< TDerived >::src_
protected

Definition at line 39 of file MPTEndpointStep.cpp.

◆ dst_

template<class TDerived>
AccountID const xrpl::MPTEndpointStep< TDerived >::dst_
protected

Definition at line 40 of file MPTEndpointStep.cpp.

◆ mptIssue_

template<class TDerived>
MPTIssue const xrpl::MPTEndpointStep< TDerived >::mptIssue_
protected

Definition at line 41 of file MPTEndpointStep.cpp.

◆ prevStep_

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

Definition at line 44 of file MPTEndpointStep.cpp.

◆ isLast_

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

Definition at line 45 of file MPTEndpointStep.cpp.

◆ isDirectBetweenHolders_

template<class TDerived>
bool const xrpl::MPTEndpointStep< TDerived >::isDirectBetweenHolders_ = false
protected

Definition at line 48 of file MPTEndpointStep.cpp.

◆ j_

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

Definition at line 49 of file MPTEndpointStep.cpp.

◆ cache_

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

Definition at line 68 of file MPTEndpointStep.cpp.

◆ TDerived

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

Definition at line 230 of file MPTEndpointStep.cpp.