xrpld
Loading...
Searching...
No Matches
xrpl::TrustLineBase Class Reference

Wraps a trust line SLE for convenience. More...

#include <TrustLine.h>

Inheritance diagram for xrpl::TrustLineBase:
Collaboration diagram for xrpl::TrustLineBase:

Public Member Functions

TrustLineBaseoperator= (TrustLineBase const &)=delete
uint256 const & key () const
 Returns the state map key for the ledger entry.
AccountID const & getAccountID () const
AccountID const & getAccountIDPeer () const
bool getAuth () const
bool getAuthPeer () const
bool getNoRipple () const
bool getNoRipplePeer () const
LineDirection getDirection () const
LineDirection getDirectionPeer () const
bool getFreeze () const
 Have we set the freeze flag on our peer.
bool getDeepFreeze () const
 Have we set the deep freeze flag on our peer.
bool getFreezePeer () const
 Has the peer set the freeze flag on us.
bool getDeepFreezePeer () const
 Has the peer set the deep freeze flag on us.
STAmount const & getBalance () const
STAmount const & getLimit () const
STAmount const & getLimitPeer () const
json::Value getJson (int)

Protected Member Functions

 TrustLineBase (SLE::const_ref sle, AccountID const &viewAccount)
 ~TrustLineBase ()=default
 TrustLineBase (TrustLineBase const &)=default
 TrustLineBase (TrustLineBase &&)=default

Protected Attributes

uint256 key_
STAmount const lowLimit_
STAmount const highLimit_
STAmount balance_
std::uint32_t flags_
bool viewLowest_

Detailed Description

Wraps a trust line SLE for convenience.

The complication of trust lines is that there is a "low" account and a "high" account. This wraps the SLE and expresses its data from the perspective of a chosen account on the line.

This wrapper is primarily used in the path finder and there can easily be tens of millions of instances of this class. When modifying this class think carefully about the memory implications.

Definition at line 33 of file TrustLine.h.

Constructor & Destructor Documentation

◆ TrustLineBase() [1/3]

xrpl::TrustLineBase::TrustLineBase ( SLE::const_ref sle,
AccountID const & viewAccount )
protected

Definition at line 17 of file TrustLine.cpp.

◆ ~TrustLineBase()

xrpl::TrustLineBase::~TrustLineBase ( )
protecteddefault

◆ TrustLineBase() [2/3]

xrpl::TrustLineBase::TrustLineBase ( TrustLineBase const & )
protecteddefault

◆ TrustLineBase() [3/3]

xrpl::TrustLineBase::TrustLineBase ( TrustLineBase && )
protecteddefault

Member Function Documentation

◆ operator=()

TrustLineBase & xrpl::TrustLineBase::operator= ( TrustLineBase const & )
delete

◆ key()

uint256 const & xrpl::TrustLineBase::key ( ) const
nodiscard

Returns the state map key for the ledger entry.

Definition at line 51 of file TrustLine.h.

◆ getAccountID()

AccountID const & xrpl::TrustLineBase::getAccountID ( ) const
nodiscard

Definition at line 59 of file TrustLine.h.

◆ getAccountIDPeer()

AccountID const & xrpl::TrustLineBase::getAccountIDPeer ( ) const
nodiscard

Definition at line 65 of file TrustLine.h.

◆ getAuth()

bool xrpl::TrustLineBase::getAuth ( ) const
nodiscard

Definition at line 72 of file TrustLine.h.

◆ getAuthPeer()

bool xrpl::TrustLineBase::getAuthPeer ( ) const
nodiscard

Definition at line 78 of file TrustLine.h.

◆ getNoRipple()

bool xrpl::TrustLineBase::getNoRipple ( ) const
nodiscard

Definition at line 84 of file TrustLine.h.

◆ getNoRipplePeer()

bool xrpl::TrustLineBase::getNoRipplePeer ( ) const
nodiscard

Definition at line 90 of file TrustLine.h.

◆ getDirection()

LineDirection xrpl::TrustLineBase::getDirection ( ) const
nodiscard

Definition at line 96 of file TrustLine.h.

◆ getDirectionPeer()

LineDirection xrpl::TrustLineBase::getDirectionPeer ( ) const
nodiscard

Definition at line 102 of file TrustLine.h.

◆ getFreeze()

bool xrpl::TrustLineBase::getFreeze ( ) const
nodiscard

Have we set the freeze flag on our peer.

Definition at line 109 of file TrustLine.h.

◆ getDeepFreeze()

bool xrpl::TrustLineBase::getDeepFreeze ( ) const
nodiscard

Have we set the deep freeze flag on our peer.

Definition at line 116 of file TrustLine.h.

◆ getFreezePeer()

bool xrpl::TrustLineBase::getFreezePeer ( ) const
nodiscard

Has the peer set the freeze flag on us.

Definition at line 123 of file TrustLine.h.

◆ getDeepFreezePeer()

bool xrpl::TrustLineBase::getDeepFreezePeer ( ) const
nodiscard

Has the peer set the deep freeze flag on us.

Definition at line 130 of file TrustLine.h.

◆ getBalance()

STAmount const & xrpl::TrustLineBase::getBalance ( ) const
nodiscard

Definition at line 136 of file TrustLine.h.

◆ getLimit()

STAmount const & xrpl::TrustLineBase::getLimit ( ) const
nodiscard

Definition at line 142 of file TrustLine.h.

◆ getLimitPeer()

STAmount const & xrpl::TrustLineBase::getLimitPeer ( ) const
nodiscard

Definition at line 148 of file TrustLine.h.

◆ getJson()

json::Value xrpl::TrustLineBase::getJson ( int )

Definition at line 30 of file TrustLine.cpp.

Member Data Documentation

◆ key_

uint256 xrpl::TrustLineBase::key_
protected

Definition at line 157 of file TrustLine.h.

◆ lowLimit_

STAmount const xrpl::TrustLineBase::lowLimit_
protected

Definition at line 159 of file TrustLine.h.

◆ highLimit_

STAmount const xrpl::TrustLineBase::highLimit_
protected

Definition at line 160 of file TrustLine.h.

◆ balance_

STAmount xrpl::TrustLineBase::balance_
protected

Definition at line 162 of file TrustLine.h.

◆ flags_

std::uint32_t xrpl::TrustLineBase::flags_
protected

Definition at line 164 of file TrustLine.h.

◆ viewLowest_

bool xrpl::TrustLineBase::viewLowest_
protected

Definition at line 166 of file TrustLine.h.