rippled
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
ripple::Dir Class Reference

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

#include <Dir.h>

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

Classes

class  const_iterator
 

Public Types

using value_type = std::shared_ptr< SLE const >
 

Public Member Functions

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

Private Attributes

ReadView const * view_ = nullptr
 
Keylet root_
 
std::shared_ptr< SLE const > 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 40 of file Dir.h.

Member Typedef Documentation

◆ value_type

Definition at line 50 of file Dir.h.

Constructor & Destructor Documentation

◆ Dir()

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

Definition at line 26 of file Dir.cpp.

Member Function Documentation

◆ begin()

auto ripple::Dir::begin ( ) const

Definition at line 34 of file Dir.cpp.

◆ end()

auto ripple::Dir::end ( ) const

Definition at line 52 of file Dir.cpp.

Member Data Documentation

◆ view_

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

Definition at line 43 of file Dir.h.

◆ root_

Keylet ripple::Dir::root_
private

Definition at line 44 of file Dir.h.

◆ sle_

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

Definition at line 45 of file Dir.h.

◆ indexes_

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

Definition at line 46 of file Dir.h.