rippled
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
ripple::DirectStepI< TDerived > Class Template Reference
Inheritance diagram for ripple::DirectStepI< TDerived >:
Inheritance graph
[legend]
Collaboration diagram for ripple::DirectStepI< TDerived >:
Collaboration graph
[legend]

Classes

struct  Cache
 

Public Member Functions

 DirectStepI (StrandContext const &ctx, AccountID const &src, AccountID const &dst, Currency const &c)
 
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
 
const bool isLast_
 
const beast::Journal j_
 
std::optional< Cachecache_
 

Private Member Functions

bool equal (Step const &rhs) const override
 

Friends

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

Detailed Description

template<class TDerived>
class ripple::DirectStepI< TDerived >

Definition at line 37 of file DirectStep.cpp.

Constructor & Destructor Documentation

◆ DirectStepI()

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

Definition at line 92 of file DirectStep.cpp.

Member Function Documentation

◆ maxPaymentFlow()

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

Definition at line 474 of file DirectStep.cpp.

◆ qualitiesSrcRedeems()

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

Definition at line 764 of file DirectStep.cpp.

◆ qualitiesSrcIssues()

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

Definition at line 781 of file DirectStep.cpp.

◆ qualities()

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

Definition at line 804 of file DirectStep.cpp.

◆ src()

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

Definition at line 107 of file DirectStep.cpp.

◆ dst()

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

Definition at line 112 of file DirectStep.cpp.

◆ currency()

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

Definition at line 117 of file DirectStep.cpp.

◆ cachedIn()

template<class TDerived >
std::optional<EitherAmount> ripple::DirectStepI< TDerived >::cachedIn ( ) const
override

Definition at line 123 of file DirectStep.cpp.

◆ cachedOut()

template<class TDerived >
std::optional<EitherAmount> ripple::DirectStepI< TDerived >::cachedOut ( ) const
override

Definition at line 131 of file DirectStep.cpp.

◆ directStepSrcAcct()

template<class TDerived >
std::optional<AccountID> ripple::DirectStepI< TDerived >::directStepSrcAcct ( ) const
override

Definition at line 139 of file DirectStep.cpp.

◆ directStepAccts()

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

Definition at line 145 of file DirectStep.cpp.

◆ debtDirection()

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

Definition at line 490 of file DirectStep.cpp.

◆ lineQualityIn()

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

Definition at line 826 of file DirectStep.cpp.

◆ qualityUpperBound()

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

Definition at line 834 of file DirectStep.cpp.

◆ revImp()

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

Definition at line 504 of file DirectStep.cpp.

◆ fwdImp()

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

Definition at line 630 of file DirectStep.cpp.

◆ validFwd()

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

Definition at line 710 of file DirectStep.cpp.

◆ check()

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

Definition at line 875 of file DirectStep.cpp.

◆ setCacheLimiting()

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

Definition at line 588 of file DirectStep.cpp.

◆ logStringImpl()

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

Definition at line 204 of file DirectStep.cpp.

◆ equal()

template<class TDerived >
bool ripple::DirectStepI< TDerived >::equal ( Step const &  rhs) const
overrideprivate

Definition at line 214 of file DirectStep.cpp.

Friends And Related Function Documentation

◆ operator==

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

Definition at line 190 of file DirectStep.cpp.

◆ operator!=

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

Definition at line 197 of file DirectStep.cpp.

Member Data Documentation

◆ src_

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

Definition at line 40 of file DirectStep.cpp.

◆ dst_

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

Definition at line 41 of file DirectStep.cpp.

◆ currency_

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

Definition at line 42 of file DirectStep.cpp.

◆ prevStep_

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

Definition at line 45 of file DirectStep.cpp.

◆ isLast_

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

Definition at line 46 of file DirectStep.cpp.

◆ j_

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

Definition at line 47 of file DirectStep.cpp.

◆ cache_

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

Definition at line 66 of file DirectStep.cpp.