20 #include <ripple/app/main/Application.h>
21 #include <ripple/app/paths/TrustLine.h>
22 #include <ripple/protocol/STAmount.h>
34 , mBalance(sle->getFieldAmount(
sfBalance))
35 , mFlags(sle->getFieldU32(
sfFlags))
36 , mViewLowest(mLowLimit.getIssuer() == viewAccount)
73 [&items, &accountID, &direction](
75 auto ret = T::makeItem(accountID, sleCur);
94 return detail::getTrustLineItems<PathFindTrustLine>(
95 accountID, view, direction);
122 return detail::getTrustLineItems<RPCTrustLine>(accountID, view);
const SF_UINT32 sfHighQualityIn
std::vector< T > getTrustLineItems(AccountID const &accountID, ReadView const &view, LineDirection direction=LineDirection::outgoing)
LineDirection
Describes how an account was found in a path, and how to find the next set of paths.
TrustLineBase(std::shared_ptr< SLE const > const &sle, AccountID const &viewAccount)
static std::optional< PathFindTrustLine > makeItem(AccountID const &accountID, std::shared_ptr< SLE const > const &sle)
AccountID const & getIssuer() const
const SF_UINT32 sfLowQualityOut
const SF_AMOUNT sfLowLimit
const STAmount mHighLimit
@ objectValue
object value (collection of name/value pairs).
const SF_UINT32 sfLowQualityIn
const SF_AMOUNT sfHighLimit
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
static std::optional< RPCTrustLine > makeItem(AccountID const &accountID, std::shared_ptr< SLE const > const &sle)
const SF_AMOUNT sfBalance
const SF_UINT32 sfHighQualityOut
T shrink_to_fit(T... args)
void forEachItem(ReadView const &view, Keylet const &root, std::function< void(std::shared_ptr< SLE const > const &)> const &f)
Iterate all items in the given directory.
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
@ ltRIPPLE_STATE
A ledger object which describes a bidirectional trust line.
static std::vector< PathFindTrustLine > getItems(AccountID const &accountID, ReadView const &view, LineDirection direction)
Wraps a trust line SLE for convenience.
static std::vector< RPCTrustLine > getItems(AccountID const &accountID, ReadView const &view)