20 #include <ripple/ledger/BookDirs.h>
21 #include <ripple/ledger/View.h>
22 #include <ripple/protocol/Indexes.h>
30 , key_(view_->succ(root_, next_quality_).value_or(
beast::zero))
32 assert(
root_ != beast::zero);
33 if (
key_ != beast::zero)
48 if (
key_ != beast::zero)
70 BookDirs::const_iterator::operator==
73 if (view_ ==
nullptr || other.view_ ==
nullptr)
76 assert(view_ == other.view_ && root_ == other.root_);
77 return entry_ == other.entry_ &&
78 cur_key_ == other.cur_key_ &&
79 index_ == other.index_;
85 assert(
index_ != beast::zero);
114 cache_ = boost::none;
121 assert(
index_ != beast::zero);
reference operator*() const
bool cdirNext(ReadView const &view, uint256 const &uRootIndex, std::shared_ptr< SLE const > &sleNode, unsigned int &uDirEntry, uint256 &uEntryIndex, beast::Journal j)
uint256 getBookBase(Book const &book)
uint256 getQualityNext(uint256 const &uBase)
static Sink & getNullSink()
Returns a Sink which does nothing.
const_iterator & operator++()
BookDirs(ReadView const &, Book const &)
const_iterator end() const
A generic endpoint for log messages.
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
boost::optional< value_type > cache_
value_type const & reference
static const offer_t offer
virtual boost::optional< key_type > succ(key_type const &key, boost::optional< key_type > const &last=boost::none) const =0
Return the key of the next state item.
std::shared_ptr< SLE const > sle_
const uint256 next_quality_
bool cdirFirst(ReadView const &view, uint256 const &uRootIndex, std::shared_ptr< SLE const > &sleNode, unsigned int &uDirEntry, uint256 &uEntryIndex, beast::Journal j)
const_iterator begin() const