xrpld
Loading...
Searching...
No Matches
xrpl::detail::RawStateTable Class Reference

#include <RawStateTable.h>

Collaboration diagram for xrpl::detail::RawStateTable:

Classes

struct  SleAction
class  SlesIterImpl

Public Types

using key_type = ReadView::key_type

Public Member Functions

 RawStateTable ()
 RawStateTable (RawStateTable const &rhs)
 RawStateTable (RawStateTable &&)=default
RawStateTableoperator= (RawStateTable &&)=delete
RawStateTableoperator= (RawStateTable const &)=delete
void apply (RawView &to) const
bool exists (ReadView const &base, Keylet const &k) const
std::optional< key_typesucc (ReadView const &base, key_type const &key, std::optional< key_type > const &last) const
void erase (SLE::ref sle)
void insert (SLE::ref sle)
void replace (SLE::ref sle)
SLE::const_pointer read (ReadView const &base, Keylet const &k) const
void destroyXRP (XRPAmount const &fee)
std::unique_ptr< ReadView::SlesType::iter_baseslesBegin (ReadView const &base) const
std::unique_ptr< ReadView::SlesType::iter_baseslesEnd (ReadView const &base) const
std::unique_ptr< ReadView::SlesType::iter_baseslesUpperBound (ReadView const &base, uint256 const &key) const

Static Public Attributes

static constexpr size_t kInitialBufferSize = kilobytes(256)

Private Types

enum class  Action { Erase , Insert , Replace }
using items_t

Private Attributes

std::unique_ptr< boost::container::pmr::monotonic_buffer_resource > monotonicResource_
items_t items_
XRPAmount dropsDestroyed_ {0}

Detailed Description

Definition at line 15 of file RawStateTable.h.

Member Typedef Documentation

◆ key_type

◆ items_t

Initial value:
boost::container::pmr::polymorphic_allocator<std::pair<key_type const, SleAction>>>
ReadView::key_type key_type

Definition at line 97 of file RawStateTable.h.

Member Enumeration Documentation

◆ Action

enum class xrpl::detail::RawStateTable::Action
strongprivate
Enumerator
Erase 
Insert 
Replace 

Definition at line 76 of file RawStateTable.h.

Constructor & Destructor Documentation

◆ RawStateTable() [1/3]

xrpl::detail::RawStateTable::RawStateTable ( )

Definition at line 24 of file RawStateTable.h.

◆ RawStateTable() [2/3]

xrpl::detail::RawStateTable::RawStateTable ( RawStateTable const & rhs)

Definition at line 29 of file RawStateTable.h.

◆ RawStateTable() [3/3]

xrpl::detail::RawStateTable::RawStateTable ( RawStateTable && )
default

Member Function Documentation

◆ operator=() [1/2]

RawStateTable & xrpl::detail::RawStateTable::operator= ( RawStateTable && )
delete

◆ operator=() [2/2]

RawStateTable & xrpl::detail::RawStateTable::operator= ( RawStateTable const & )
delete

◆ apply()

void xrpl::detail::RawStateTable::apply ( RawView & to) const

Definition at line 170 of file RawStateTable.cpp.

◆ exists()

bool xrpl::detail::RawStateTable::exists ( ReadView const & base,
Keylet const & k ) const
nodiscard

Definition at line 192 of file RawStateTable.cpp.

◆ succ()

auto xrpl::detail::RawStateTable::succ ( ReadView const & base,
key_type const & key,
std::optional< key_type > const & last ) const
nodiscard

Definition at line 211 of file RawStateTable.cpp.

◆ erase()

void xrpl::detail::RawStateTable::erase ( SLE::ref sle)

Definition at line 244 of file RawStateTable.cpp.

◆ insert()

void xrpl::detail::RawStateTable::insert ( SLE::ref sle)

Definition at line 270 of file RawStateTable.cpp.

◆ replace()

void xrpl::detail::RawStateTable::replace ( SLE::ref sle)

Definition at line 295 of file RawStateTable.cpp.

◆ read()

SLE::const_pointer xrpl::detail::RawStateTable::read ( ReadView const & base,
Keylet const & k ) const
nodiscard

Definition at line 317 of file RawStateTable.cpp.

◆ destroyXRP()

void xrpl::detail::RawStateTable::destroyXRP ( XRPAmount const & fee)

Definition at line 333 of file RawStateTable.cpp.

◆ slesBegin()

std::unique_ptr< ReadView::SlesType::iter_base > xrpl::detail::RawStateTable::slesBegin ( ReadView const & base) const
nodiscard

Definition at line 339 of file RawStateTable.cpp.

◆ slesEnd()

std::unique_ptr< ReadView::SlesType::iter_base > xrpl::detail::RawStateTable::slesEnd ( ReadView const & base) const
nodiscard

Definition at line 346 of file RawStateTable.cpp.

◆ slesUpperBound()

std::unique_ptr< ReadView::SlesType::iter_base > xrpl::detail::RawStateTable::slesUpperBound ( ReadView const & base,
uint256 const & key ) const
nodiscard

Definition at line 353 of file RawStateTable.cpp.

Member Data Documentation

◆ kInitialBufferSize

size_t xrpl::detail::RawStateTable::kInitialBufferSize = kilobytes(256)
staticconstexpr

Definition at line 22 of file RawStateTable.h.

◆ monotonicResource_

std::unique_ptr<boost::container::pmr::monotonic_buffer_resource> xrpl::detail::RawStateTable::monotonicResource_
private

Definition at line 104 of file RawStateTable.h.

◆ items_

items_t xrpl::detail::RawStateTable::items_
private

Definition at line 105 of file RawStateTable.h.

◆ dropsDestroyed_

XRPAmount xrpl::detail::RawStateTable::dropsDestroyed_ {0}
private

Definition at line 107 of file RawStateTable.h.