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

A class that simplifies iterating ledger directory pages. More...

#include <Dir.h>

Collaboration diagram for xrpl::Dir:

Classes

class  ConstIterator

Public Types

using value_type = SLE::const_pointer

Public Member Functions

 Dir (ReadView const &, Keylet const &)
ConstIterator begin () const
ConstIterator end () const

Private Attributes

ReadView const * view_ = nullptr
Keylet root_
SLE::const_pointer sle_
STVector256 const * indexes_ = nullptr

Detailed Description

A class that simplifies iterating ledger directory pages.

The Dir class provides a forward iterator for walking through the uint256 values contained in ledger directories.

The Dir class also allows accelerated directory walking by stepping directly from one page to the next using the next_page() member function.

As of July 2024, the Dir class is only being used with NFTokenOffer directories and for unit tests.

Definition at line 20 of file Dir.h.

Member Typedef Documentation

◆ value_type

Definition at line 30 of file Dir.h.

Constructor & Destructor Documentation

◆ Dir()

xrpl::Dir::Dir ( ReadView const & view,
Keylet const & key )

Definition at line 18 of file Dir.cpp.

Member Function Documentation

◆ begin()

auto xrpl::Dir::begin ( ) const
nodiscard

Definition at line 26 of file Dir.cpp.

◆ end()

auto xrpl::Dir::end ( ) const
nodiscard

Definition at line 44 of file Dir.cpp.

Member Data Documentation

◆ view_

ReadView const* xrpl::Dir::view_ = nullptr
private

Definition at line 23 of file Dir.h.

◆ root_

Keylet xrpl::Dir::root_
private

Definition at line 24 of file Dir.h.

◆ sle_

SLE::const_pointer xrpl::Dir::sle_
private

Definition at line 25 of file Dir.h.

◆ indexes_

STVector256 const* xrpl::Dir::indexes_ = nullptr
private

Definition at line 26 of file Dir.h.