xrpld
Loading...
Searching...
No Matches
xrpl::MPTEndpointOfferCrossingStep Class Reference
Inheritance diagram for xrpl::MPTEndpointOfferCrossingStep:
Collaboration diagram for xrpl::MPTEndpointOfferCrossingStep:

Public Member Functions

 MPTEndpointOfferCrossingStep (StrandContext const &ctx, AccountID const &src, AccountID const &dst, MPTID const &mpt)
std::string logString () const override
TER checkCreateMPT (ApplyView &view, DebtDirection srcDebtDir)
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)

Static Public Member Functions

static bool verifyPrevStepDebtDirection (DebtDirection prevStepDir)
static TER check (StrandContext const &ctx, SLE::const_ref sleSrc)

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_
bool const isLast_
bool const isDirectBetweenHolders_
beast::Journal const j_
std::optional< Cache > cache_

Private Member Functions

bool equal (Step const &rhs) const override

Private Attributes

friend TDerived

Detailed Description

Definition at line 284 of file MPTEndpointStep.cpp.

Constructor & Destructor Documentation

◆ MPTEndpointOfferCrossingStep()

xrpl::MPTEndpointOfferCrossingStep::MPTEndpointOfferCrossingStep ( StrandContext const & ctx,
AccountID const & src,
AccountID const & dst,
MPTID const & mpt )

Definition at line 290 of file MPTEndpointStep.cpp.

Member Function Documentation

◆ verifyPrevStepDebtDirection()

bool xrpl::MPTEndpointOfferCrossingStep::verifyPrevStepDebtDirection ( DebtDirection prevStepDir)
static

Definition at line 300 of file MPTEndpointStep.cpp.

◆ check() [1/2]

TER xrpl::MPTEndpointOfferCrossingStep::check ( StrandContext const & ctx,
SLE::const_ref sleSrc )
static

Definition at line 395 of file MPTEndpointStep.cpp.

◆ logString()

std::string xrpl::MPTEndpointOfferCrossingStep::logString ( ) const
nodiscardoverride

Definition at line 318 of file MPTEndpointStep.cpp.

◆ checkCreateMPT()

TER xrpl::MPTEndpointOfferCrossingStep::checkCreateMPT ( ApplyView & view,
xrpl::DebtDirection srcDebtDir )

Definition at line 404 of file MPTEndpointStep.cpp.

◆ maxPaymentFlow()

std::pair< MPTAmount, DebtDirection > xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::maxPaymentFlow ( ReadView const & sb) const
nodiscardprotectedinherited

Definition at line 75 of file MPTEndpointStep.cpp.

◆ qualitiesSrcRedeems()

std::pair< std::uint32_t, std::uint32_t > xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::qualitiesSrcRedeems ( ReadView const & sb) const
nodiscardprotectedinherited

Definition at line 79 of file MPTEndpointStep.cpp.

◆ qualitiesSrcIssues()

std::pair< std::uint32_t, std::uint32_t > xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::qualitiesSrcIssues ( ReadView const & sb,
DebtDirection prevStepDebtDirection ) const
nodiscardprotectedinherited

Definition at line 83 of file MPTEndpointStep.cpp.

◆ qualities()

std::pair< std::uint32_t, std::uint32_t > xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::qualities ( ReadView const & sb,
DebtDirection srcDebtDir,
StrandDirection strandDir ) const
nodiscardprotectedinherited

Definition at line 87 of file MPTEndpointStep.cpp.

◆ resetCache()

void xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::resetCache ( xrpl::DebtDirection dir)
protectedinherited

Definition at line 90 of file MPTEndpointStep.cpp.

◆ src()

AccountID const & xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::src ( ) const
nodiscardinherited

Definition at line 116 of file MPTEndpointStep.cpp.

◆ dst()

AccountID const & xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::dst ( ) const
nodiscardinherited

Definition at line 121 of file MPTEndpointStep.cpp.

◆ mptID()

MPTID const & xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::mptID ( ) const
nodiscardinherited

Definition at line 126 of file MPTEndpointStep.cpp.

◆ cachedIn()

std::optional< EitherAmount > xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::cachedIn ( ) const
nodiscardoverrideinherited

Definition at line 132 of file MPTEndpointStep.cpp.

◆ cachedOut()

std::optional< EitherAmount > xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::cachedOut ( ) const
nodiscardoverrideinherited

Definition at line 140 of file MPTEndpointStep.cpp.

◆ directStepSrcAcct()

std::optional< AccountID > xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::directStepSrcAcct ( ) const
nodiscardoverrideinherited

Definition at line 148 of file MPTEndpointStep.cpp.

◆ directStepAccts()

std::optional< std::pair< AccountID, AccountID > > xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::directStepAccts ( ) const
nodiscardoverrideinherited

Definition at line 154 of file MPTEndpointStep.cpp.

◆ debtDirection()

DebtDirection xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::debtDirection ( ReadView const & sb,
StrandDirection dir ) const
nodiscardoverrideinherited

Definition at line 160 of file MPTEndpointStep.cpp.

◆ lineQualityIn()

std::uint32_t xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::lineQualityIn ( ReadView const & v) const
nodiscardoverrideinherited

Definition at line 163 of file MPTEndpointStep.cpp.

◆ qualityUpperBound()

std::pair< std::optional< Quality >, DebtDirection > xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::qualityUpperBound ( ReadView const & v,
DebtDirection dir ) const
nodiscardoverrideinherited

Definition at line 166 of file MPTEndpointStep.cpp.

◆ revImp()

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

Definition at line 169 of file MPTEndpointStep.cpp.

◆ fwdImp()

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

Definition at line 176 of file MPTEndpointStep.cpp.

◆ validFwd()

std::pair< bool, EitherAmount > xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::validFwd ( PaymentSandbox & sb,
ApplyView & afView,
EitherAmount const & in )
overrideinherited

Definition at line 183 of file MPTEndpointStep.cpp.

◆ check() [2/2]

TER xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::check ( StrandContext const & ctx) const
nodiscardinherited

Definition at line 188 of file MPTEndpointStep.cpp.

◆ setCacheLimiting()

void xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::setCacheLimiting ( MPTAmount const & fwdIn,
MPTAmount const & fwdSrcToDst,
MPTAmount const & fwdOut,
DebtDirection srcDebtDir )
inherited

Definition at line 191 of file MPTEndpointStep.cpp.

◆ logStringImpl()

std::string xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::logStringImpl ( char const * name) const
protectedinherited

Definition at line 211 of file MPTEndpointStep.cpp.

◆ equal()

bool xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::equal ( Step const & rhs) const
nodiscardoverrideprivateinherited

Definition at line 221 of file MPTEndpointStep.cpp.

Member Data Documentation

◆ src_

Definition at line 39 of file MPTEndpointStep.cpp.

◆ dst_

Definition at line 40 of file MPTEndpointStep.cpp.

◆ mptIssue_

MPTIssue const xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::mptIssue_
protectedinherited

Definition at line 41 of file MPTEndpointStep.cpp.

◆ prevStep_

Step const* const xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::prevStep_
protectedinherited

Definition at line 44 of file MPTEndpointStep.cpp.

◆ isLast_

bool const xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::isLast_
protectedinherited

Definition at line 45 of file MPTEndpointStep.cpp.

◆ isDirectBetweenHolders_

bool const xrpl::MPTEndpointStep< MPTEndpointOfferCrossingStep >::isDirectBetweenHolders_
protectedinherited

Definition at line 48 of file MPTEndpointStep.cpp.

◆ j_

Definition at line 49 of file MPTEndpointStep.cpp.

◆ cache_

Definition at line 68 of file MPTEndpointStep.cpp.

◆ TDerived