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

Iterates and consumes raw offers in an order book. More...

#include <BookTip.h>

Collaboration diagram for xrpl::BookTip:

Public Member Functions

 BookTip (ApplyView &view, Book const &book)
 Create the iterator.
uint256 const & dir () const noexcept
uint256 const & index () const noexcept
Quality const & quality () const noexcept
SLE::pointer const & entry () const noexcept
bool step (beast::Journal j)
 Erases the current offer and advance to the next offer.

Private Attributes

ApplyViewview_
bool valid_ {false}
uint256 book_
uint256 end_
uint256 dir_
uint256 index_
SLE::pointer entry_
Quality quality_ {}

Detailed Description

Iterates and consumes raw offers in an order book.

Offers are presented from highest quality to lowest quality. This will return all offers present including missing, invalid, unfunded, etc.

Definition at line 15 of file BookTip.h.

Constructor & Destructor Documentation

◆ BookTip()

xrpl::BookTip::BookTip ( ApplyView & view,
Book const & book )

Create the iterator.

Definition at line 13 of file BookTip.cpp.

Member Function Documentation

◆ dir()

uint256 const & xrpl::BookTip::dir ( ) const
nodiscardnoexcept

Definition at line 32 of file BookTip.h.

◆ index()

uint256 const & xrpl::BookTip::index ( ) const
nodiscardnoexcept

Definition at line 38 of file BookTip.h.

◆ quality()

Quality const & xrpl::BookTip::quality ( ) const
nodiscardnoexcept

Definition at line 44 of file BookTip.h.

◆ entry()

SLE::pointer const & xrpl::BookTip::entry ( ) const
nodiscardnoexcept

Definition at line 50 of file BookTip.h.

◆ step()

bool xrpl::BookTip::step ( beast::Journal j)

Erases the current offer and advance to the next offer.

Complexity: Constant

Returns
true if there is a next offer

Definition at line 19 of file BookTip.cpp.

Member Data Documentation

◆ view_

ApplyView& xrpl::BookTip::view_
private

Definition at line 18 of file BookTip.h.

◆ valid_

bool xrpl::BookTip::valid_ {false}
private

Definition at line 19 of file BookTip.h.

◆ book_

uint256 xrpl::BookTip::book_
private

Definition at line 20 of file BookTip.h.

◆ end_

uint256 xrpl::BookTip::end_
private

Definition at line 21 of file BookTip.h.

◆ dir_

uint256 xrpl::BookTip::dir_
private

Definition at line 22 of file BookTip.h.

◆ index_

uint256 xrpl::BookTip::index_
private

Definition at line 23 of file BookTip.h.

◆ entry_

SLE::pointer xrpl::BookTip::entry_
private

Definition at line 24 of file BookTip.h.

◆ quality_

Quality xrpl::BookTip::quality_ {}
private

Definition at line 25 of file BookTip.h.