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

Public Member Functions

 DirectIPaymentStep (StrandContext const &ctx, AccountID const &src, AccountID const &dst, Currency const &c)
std::uint32_t quality (ReadView const &sb, QualityDirection qDir) const
std::pair< IOUAmount, DebtDirectionmaxFlow (ReadView const &sb, IOUAmount const &desired) const
TER check (StrandContext const &ctx, SLE::const_ref sleSrc) const
std::string logString () const override
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)

Static Public Member Functions

static bool verifyPrevStepDebtDirection (DebtDirection)
static bool verifyDstQualityIn (std::uint32_t dstQIn)

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_
bool const isLast_
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 231 of file DirectStep.cpp.

Constructor & Destructor Documentation

◆ DirectIPaymentStep()

xrpl::DirectIPaymentStep::DirectIPaymentStep ( StrandContext const & ctx,
AccountID const & src,
AccountID const & dst,
Currency const & c )

Definition at line 234 of file DirectStep.cpp.

Member Function Documentation

◆ verifyPrevStepDebtDirection()

bool xrpl::DirectIPaymentStep::verifyPrevStepDebtDirection ( DebtDirection )
static

Definition at line 246 of file DirectStep.cpp.

◆ verifyDstQualityIn()

bool xrpl::DirectIPaymentStep::verifyDstQualityIn ( std::uint32_t dstQIn)
static

Definition at line 253 of file DirectStep.cpp.

◆ quality()

std::uint32_t xrpl::DirectIPaymentStep::quality ( ReadView const & sb,
QualityDirection qDir ) const
nodiscard

Definition at line 342 of file DirectStep.cpp.

◆ maxFlow()

std::pair< IOUAmount, DebtDirection > xrpl::DirectIPaymentStep::maxFlow ( ReadView const & sb,
IOUAmount const & desired ) const
nodiscard

Definition at line 391 of file DirectStep.cpp.

◆ check() [1/2]

TER xrpl::DirectIPaymentStep::check ( StrandContext const & ctx,
SLE::const_ref sleSrc ) const
nodiscard

Definition at line 418 of file DirectStep.cpp.

◆ logString()

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

Definition at line 275 of file DirectStep.cpp.

◆ maxPaymentFlow()

std::pair< IOUAmount, DebtDirection > xrpl::DirectStepI< DirectIPaymentStep >::maxPaymentFlow ( ReadView const & sb) const
nodiscardprotectedinherited

Definition at line 74 of file DirectStep.cpp.

◆ qualitiesSrcRedeems()

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

Definition at line 78 of file DirectStep.cpp.

◆ qualitiesSrcIssues()

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

Definition at line 82 of file DirectStep.cpp.

◆ qualities()

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

Definition at line 86 of file DirectStep.cpp.

◆ src()

AccountID const & xrpl::DirectStepI< DirectIPaymentStep >::src ( ) const
nodiscardinherited

Definition at line 105 of file DirectStep.cpp.

◆ dst()

AccountID const & xrpl::DirectStepI< DirectIPaymentStep >::dst ( ) const
nodiscardinherited

Definition at line 110 of file DirectStep.cpp.

◆ currency()

Currency const & xrpl::DirectStepI< DirectIPaymentStep >::currency ( ) const
nodiscardinherited

Definition at line 115 of file DirectStep.cpp.

◆ cachedIn()

std::optional< EitherAmount > xrpl::DirectStepI< DirectIPaymentStep >::cachedIn ( ) const
nodiscardoverrideinherited

Definition at line 121 of file DirectStep.cpp.

◆ cachedOut()

std::optional< EitherAmount > xrpl::DirectStepI< DirectIPaymentStep >::cachedOut ( ) const
nodiscardoverrideinherited

Definition at line 129 of file DirectStep.cpp.

◆ directStepSrcAcct()

std::optional< AccountID > xrpl::DirectStepI< DirectIPaymentStep >::directStepSrcAcct ( ) const
nodiscardoverrideinherited

Definition at line 137 of file DirectStep.cpp.

◆ directStepAccts()

std::optional< std::pair< AccountID, AccountID > > xrpl::DirectStepI< DirectIPaymentStep >::directStepAccts ( ) const
nodiscardoverrideinherited

Definition at line 143 of file DirectStep.cpp.

◆ debtDirection()

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

Definition at line 149 of file DirectStep.cpp.

◆ lineQualityIn()

std::uint32_t xrpl::DirectStepI< DirectIPaymentStep >::lineQualityIn ( ReadView const & v) const
nodiscardoverrideinherited

Definition at line 152 of file DirectStep.cpp.

◆ qualityUpperBound()

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

Definition at line 155 of file DirectStep.cpp.

◆ revImp()

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

Definition at line 158 of file DirectStep.cpp.

◆ fwdImp()

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

Definition at line 165 of file DirectStep.cpp.

◆ validFwd()

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

Definition at line 172 of file DirectStep.cpp.

◆ check() [2/2]

TER xrpl::DirectStepI< DirectIPaymentStep >::check ( StrandContext const & ctx) const
nodiscardinherited

Definition at line 177 of file DirectStep.cpp.

◆ setCacheLimiting()

void xrpl::DirectStepI< DirectIPaymentStep >::setCacheLimiting ( IOUAmount const & fwdIn,
IOUAmount const & fwdSrcToDst,
IOUAmount const & fwdOut,
DebtDirection srcDebtDir )
inherited

Definition at line 180 of file DirectStep.cpp.

◆ logStringImpl()

std::string xrpl::DirectStepI< DirectIPaymentStep >::logStringImpl ( char const * name) const
protectedinherited

Definition at line 200 of file DirectStep.cpp.

◆ equal()

bool xrpl::DirectStepI< DirectIPaymentStep >::equal ( Step const & rhs) const
nodiscardoverrideprivateinherited

Definition at line 210 of file DirectStep.cpp.

Member Data Documentation

◆ src_

AccountID xrpl::DirectStepI< DirectIPaymentStep >::src_
protectedinherited

Definition at line 41 of file DirectStep.cpp.

◆ dst_

AccountID xrpl::DirectStepI< DirectIPaymentStep >::dst_
protectedinherited

Definition at line 42 of file DirectStep.cpp.

◆ currency_

Currency xrpl::DirectStepI< DirectIPaymentStep >::currency_
protectedinherited

Definition at line 43 of file DirectStep.cpp.

◆ prevStep_

Step const* const xrpl::DirectStepI< DirectIPaymentStep >::prevStep_
protectedinherited

Definition at line 46 of file DirectStep.cpp.

◆ isLast_

bool const xrpl::DirectStepI< DirectIPaymentStep >::isLast_
protectedinherited

Definition at line 47 of file DirectStep.cpp.

◆ j_

beast::Journal const xrpl::DirectStepI< DirectIPaymentStep >::j_
protectedinherited

Definition at line 48 of file DirectStep.cpp.

◆ cache_

std::optional<Cache> xrpl::DirectStepI< DirectIPaymentStep >::cache_
protectedinherited

Definition at line 67 of file DirectStep.cpp.

◆ TDerived

Definition at line 219 of file DirectStep.cpp.