21 #include <ripple/ledger/BookDirs.h>
22 #include <ripple/ledger/View.h>
23 #include <ripple/protocol/Indexes.h>
31 , key_(view_->succ(root_, next_quality_).value_or(
beast::zero))
33 assert(
root_ != beast::zero);
34 if (
key_ != beast::zero)
47 if (
key_ != beast::zero)
70 if (
view_ ==
nullptr || other.
view_ ==
nullptr)
81 assert(
index_ != beast::zero);
109 cache_ = std::nullopt;
116 assert(
index_ != beast::zero);
bool cdirNext(ReadView const &view, uint256 const &root, std::shared_ptr< SLE const > &page, unsigned int &index, uint256 &entry)
Returns the next entry in the directory, advancing the index.
reference operator*() const
uint256 getBookBase(Book const &book)
Keylet offer(AccountID const &id, std::uint32_t seq) noexcept
An offer from an account.
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.
bool operator==(const_iterator const &other) const
virtual std::optional< key_type > succ(key_type const &key, std::optional< key_type > const &last=std::nullopt) const =0
Return the key of the next state item.
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.
value_type const & reference
bool cdirFirst(ReadView const &view, uint256 const &root, std::shared_ptr< SLE const > &page, unsigned int &index, uint256 &entry)
Returns the first entry in the directory, advancing the index.
std::shared_ptr< SLE const > sle_
const uint256 next_quality_
const_iterator begin() const