rippled
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ripple::TrustLineBase Class Reference

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

#include <TrustLine.h>

Inheritance diagram for ripple::TrustLineBase:
Inheritance graph
[legend]
Collaboration diagram for ripple::TrustLineBase:
Collaboration graph
[legend]

Public Member Functions

uint256 const & key () const
 Returns the state map key for the ledger entry. More...
 
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. More...
 
bool getDeepFreeze () const
 Have we set the deep freeze flag on our peer. More...
 
bool getFreezePeer () const
 Has the peer set the freeze flag on us. More...
 
bool getDeepFreezePeer () const
 Has the peer set the deep freeze flag on us. More...
 
STAmount const & getBalance () const
 
STAmount const & getLimit () const
 
STAmount const & getLimitPeer () const
 
Json::Value getJson (int)
 

Protected Member Functions

 TrustLineBase (std::shared_ptr< SLE const > const &sle, AccountID const &viewAccount)
 
 ~TrustLineBase ()=default
 
 TrustLineBase (TrustLineBase const &)=default
 
TrustLineBaseoperator= (TrustLineBase const &)=delete
 
 TrustLineBase (TrustLineBase &&)=default
 

Protected Attributes

uint256 key_
 
STAmount const mLowLimit
 
STAmount const mHighLimit
 
STAmount mBalance
 
std::uint32_t mFlags
 
bool mViewLowest
 

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 54 of file TrustLine.h.

Constructor & Destructor Documentation

◆ TrustLineBase() [1/3]

ripple::TrustLineBase::TrustLineBase ( std::shared_ptr< SLE const > const &  sle,
AccountID const &  viewAccount 
)
protected

Definition at line 28 of file TrustLine.cpp.

◆ ~TrustLineBase()

ripple::TrustLineBase::~TrustLineBase ( )
protecteddefault

◆ TrustLineBase() [2/3]

ripple::TrustLineBase::TrustLineBase ( TrustLineBase const &  )
protecteddefault

◆ TrustLineBase() [3/3]

ripple::TrustLineBase::TrustLineBase ( TrustLineBase &&  )
protecteddefault

Member Function Documentation

◆ operator=()

TrustLineBase & ripple::TrustLineBase::operator= ( TrustLineBase const &  )
protecteddelete

◆ key()

uint256 const & ripple::TrustLineBase::key ( ) const

Returns the state map key for the ledger entry.

Definition at line 72 of file TrustLine.h.

◆ getAccountID()

AccountID const & ripple::TrustLineBase::getAccountID ( ) const

Definition at line 80 of file TrustLine.h.

◆ getAccountIDPeer()

AccountID const & ripple::TrustLineBase::getAccountIDPeer ( ) const

Definition at line 86 of file TrustLine.h.

◆ getAuth()

bool ripple::TrustLineBase::getAuth ( ) const

Definition at line 93 of file TrustLine.h.

◆ getAuthPeer()

bool ripple::TrustLineBase::getAuthPeer ( ) const

Definition at line 99 of file TrustLine.h.

◆ getNoRipple()

bool ripple::TrustLineBase::getNoRipple ( ) const

Definition at line 105 of file TrustLine.h.

◆ getNoRipplePeer()

bool ripple::TrustLineBase::getNoRipplePeer ( ) const

Definition at line 111 of file TrustLine.h.

◆ getDirection()

LineDirection ripple::TrustLineBase::getDirection ( ) const

Definition at line 117 of file TrustLine.h.

◆ getDirectionPeer()

LineDirection ripple::TrustLineBase::getDirectionPeer ( ) const

Definition at line 124 of file TrustLine.h.

◆ getFreeze()

bool ripple::TrustLineBase::getFreeze ( ) const

Have we set the freeze flag on our peer.

Definition at line 132 of file TrustLine.h.

◆ getDeepFreeze()

bool ripple::TrustLineBase::getDeepFreeze ( ) const

Have we set the deep freeze flag on our peer.

Definition at line 139 of file TrustLine.h.

◆ getFreezePeer()

bool ripple::TrustLineBase::getFreezePeer ( ) const

Has the peer set the freeze flag on us.

Definition at line 146 of file TrustLine.h.

◆ getDeepFreezePeer()

bool ripple::TrustLineBase::getDeepFreezePeer ( ) const

Has the peer set the deep freeze flag on us.

Definition at line 153 of file TrustLine.h.

◆ getBalance()

STAmount const & ripple::TrustLineBase::getBalance ( ) const

Definition at line 159 of file TrustLine.h.

◆ getLimit()

STAmount const & ripple::TrustLineBase::getLimit ( ) const

Definition at line 165 of file TrustLine.h.

◆ getLimitPeer()

STAmount const & ripple::TrustLineBase::getLimitPeer ( ) const

Definition at line 171 of file TrustLine.h.

◆ getJson()

Json::Value ripple::TrustLineBase::getJson ( int  )

Definition at line 43 of file TrustLine.cpp.

Member Data Documentation

◆ key_

uint256 ripple::TrustLineBase::key_
protected

Definition at line 180 of file TrustLine.h.

◆ mLowLimit

STAmount const ripple::TrustLineBase::mLowLimit
protected

Definition at line 182 of file TrustLine.h.

◆ mHighLimit

STAmount const ripple::TrustLineBase::mHighLimit
protected

Definition at line 183 of file TrustLine.h.

◆ mBalance

STAmount ripple::TrustLineBase::mBalance
protected

Definition at line 185 of file TrustLine.h.

◆ mFlags

std::uint32_t ripple::TrustLineBase::mFlags
protected

Definition at line 187 of file TrustLine.h.

◆ mViewLowest

bool ripple::TrustLineBase::mViewLowest
protected

Definition at line 189 of file TrustLine.h.