rippled
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ripple::RippleState Class Reference

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

Collaboration diagram for ripple::RippleState:
Collaboration graph
[legend]

Public Types

using pointer = std::shared_ptr< RippleState >
 

Public Member Functions

 RippleState ()=delete
 
virtual ~RippleState ()=default
 
 RippleState (std::shared_ptr< SLE const > &&sle, AccountID const &viewAccount)
 
uint256 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
 
bool getFreeze () const
 Have we set the freeze flag on our peer. More...
 
bool getFreezePeer () const
 Has the peer set the freeze flag on us. More...
 
STAmount const & getBalance () const
 
STAmount const & getLimit () const
 
STAmount const & getLimitPeer () const
 
Rate const & getQualityIn () const
 
Rate const & getQualityOut () const
 
Json::Value getJson (int)
 

Static Public Member Functions

static RippleState::pointer makeItem (AccountID const &accountID, std::shared_ptr< SLE const > sle)
 

Private Attributes

std::shared_ptr< SLE const > sle_
 
bool mViewLowest
 
std::uint32_t mFlags
 
STAmount const & mLowLimit
 
STAmount const & mHighLimit
 
AccountID const & mLowID
 
AccountID const & mHighID
 
Rate lowQualityIn_
 
Rate lowQualityOut_
 
Rate highQualityIn_
 
Rate highQualityOut_
 
STAmount mBalance
 

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.

Definition at line 39 of file RippleState.h.

Member Typedef Documentation

◆ pointer

Definition at line 43 of file RippleState.h.

Constructor & Destructor Documentation

◆ RippleState() [1/2]

ripple::RippleState::RippleState ( )
delete

◆ ~RippleState()

virtual ripple::RippleState::~RippleState ( )
virtualdefault

◆ RippleState() [2/2]

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

Definition at line 40 of file RippleState.cpp.

Member Function Documentation

◆ makeItem()

RippleState::pointer ripple::RippleState::makeItem ( AccountID const &  accountID,
std::shared_ptr< SLE const >  sle 
)
static

Definition at line 29 of file RippleState.cpp.

◆ key()

uint256 ripple::RippleState::key ( ) const

Returns the state map key for the ledger entry.

Definition at line 60 of file RippleState.h.

◆ getAccountID()

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

Definition at line 67 of file RippleState.h.

◆ getAccountIDPeer()

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

Definition at line 72 of file RippleState.h.

◆ getAuth()

bool ripple::RippleState::getAuth ( ) const

Definition at line 78 of file RippleState.h.

◆ getAuthPeer()

bool ripple::RippleState::getAuthPeer ( ) const

Definition at line 83 of file RippleState.h.

◆ getNoRipple()

bool ripple::RippleState::getNoRipple ( ) const

Definition at line 88 of file RippleState.h.

◆ getNoRipplePeer()

bool ripple::RippleState::getNoRipplePeer ( ) const

Definition at line 93 of file RippleState.h.

◆ getFreeze()

bool ripple::RippleState::getFreeze ( ) const

Have we set the freeze flag on our peer.

Definition at line 99 of file RippleState.h.

◆ getFreezePeer()

bool ripple::RippleState::getFreezePeer ( ) const

Has the peer set the freeze flag on us.

Definition at line 105 of file RippleState.h.

◆ getBalance()

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

Definition at line 110 of file RippleState.h.

◆ getLimit()

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

Definition at line 115 of file RippleState.h.

◆ getLimitPeer()

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

Definition at line 120 of file RippleState.h.

◆ getQualityIn()

Rate const& ripple::RippleState::getQualityIn ( ) const

Definition at line 126 of file RippleState.h.

◆ getQualityOut()

Rate const& ripple::RippleState::getQualityOut ( ) const

Definition at line 132 of file RippleState.h.

◆ getJson()

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

Definition at line 61 of file RippleState.cpp.

Member Data Documentation

◆ sle_

std::shared_ptr<SLE const> ripple::RippleState::sle_
private

Definition at line 140 of file RippleState.h.

◆ mViewLowest

bool ripple::RippleState::mViewLowest
private

Definition at line 142 of file RippleState.h.

◆ mFlags

std::uint32_t ripple::RippleState::mFlags
private

Definition at line 144 of file RippleState.h.

◆ mLowLimit

STAmount const& ripple::RippleState::mLowLimit
private

Definition at line 146 of file RippleState.h.

◆ mHighLimit

STAmount const& ripple::RippleState::mHighLimit
private

Definition at line 147 of file RippleState.h.

◆ mLowID

AccountID const& ripple::RippleState::mLowID
private

Definition at line 149 of file RippleState.h.

◆ mHighID

AccountID const& ripple::RippleState::mHighID
private

Definition at line 150 of file RippleState.h.

◆ lowQualityIn_

Rate ripple::RippleState::lowQualityIn_
private

Definition at line 152 of file RippleState.h.

◆ lowQualityOut_

Rate ripple::RippleState::lowQualityOut_
private

Definition at line 153 of file RippleState.h.

◆ highQualityIn_

Rate ripple::RippleState::highQualityIn_
private

Definition at line 154 of file RippleState.h.

◆ highQualityOut_

Rate ripple::RippleState::highQualityOut_
private

Definition at line 155 of file RippleState.h.

◆ mBalance

STAmount ripple::RippleState::mBalance
private

Definition at line 157 of file RippleState.h.