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

#include <RawStateTable.h>

Collaboration diagram for ripple::detail::RawStateTable:
Collaboration graph
[legend]

Classes

struct  sleAction
 
class  sles_iter_impl
 

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 (std::shared_ptr< SLE > const &sle)
 
void insert (std::shared_ptr< SLE > const &sle)
 
void replace (std::shared_ptr< SLE > const &sle)
 
std::shared_ptr< SLE const > read (ReadView const &base, Keylet const &k) const
 
void destroyXRP (XRPAmount const &fee)
 
std::unique_ptr< ReadView::sles_type::iter_baseslesBegin (ReadView const &base) const
 
std::unique_ptr< ReadView::sles_type::iter_baseslesEnd (ReadView const &base) const
 
std::unique_ptr< ReadView::sles_type::iter_baseslesUpperBound (ReadView const &base, uint256 const &key) const
 

Static Public Attributes

static constexpr size_t initialBufferSize = kilobytes(256)
 

Private Types

enum class  Action { erase , insert , replace }
 
using items_t = std::map< key_type, sleAction, std::less< key_type >, boost::container::pmr::polymorphic_allocator< std::pair< key_type const, sleAction > > >
 

Private Attributes

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

Detailed Description

Definition at line 17 of file RawStateTable.h.

Member Typedef Documentation

◆ key_type

Definition at line 20 of file RawStateTable.h.

◆ items_t

using ripple::detail::RawStateTable::items_t = std::map< key_type, sleAction, std::less<key_type>, boost::container::pmr::polymorphic_allocator< std::pair<key_type const, sleAction> >>
private

Definition at line 105 of file RawStateTable.h.

Member Enumeration Documentation

◆ Action

enum class ripple::detail::RawStateTable::Action
strongprivate
Enumerator
erase 
insert 
replace 

Definition at line 83 of file RawStateTable.h.

Constructor & Destructor Documentation

◆ RawStateTable() [1/3]

ripple::detail::RawStateTable::RawStateTable ( )

Definition at line 26 of file RawStateTable.h.

◆ RawStateTable() [2/3]

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

Definition at line 32 of file RawStateTable.h.

◆ RawStateTable() [3/3]

ripple::detail::RawStateTable::RawStateTable ( RawStateTable &&  )
default

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ apply()

void ripple::detail::RawStateTable::apply ( RawView to) const

Definition at line 145 of file RawStateTable.cpp.

◆ exists()

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

Definition at line 167 of file RawStateTable.cpp.

◆ succ()

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

Definition at line 188 of file RawStateTable.cpp.

◆ erase()

void ripple::detail::RawStateTable::erase ( std::shared_ptr< SLE > const &  sle)

Definition at line 223 of file RawStateTable.cpp.

◆ insert()

void ripple::detail::RawStateTable::insert ( std::shared_ptr< SLE > const &  sle)

Definition at line 249 of file RawStateTable.cpp.

◆ replace()

void ripple::detail::RawStateTable::replace ( std::shared_ptr< SLE > const &  sle)

Definition at line 274 of file RawStateTable.cpp.

◆ read()

std::shared_ptr< SLE const > ripple::detail::RawStateTable::read ( ReadView const &  base,
Keylet const &  k 
) const

Definition at line 296 of file RawStateTable.cpp.

◆ destroyXRP()

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

Definition at line 312 of file RawStateTable.cpp.

◆ slesBegin()

std::unique_ptr< ReadView::sles_type::iter_base > ripple::detail::RawStateTable::slesBegin ( ReadView const &  base) const

Definition at line 318 of file RawStateTable.cpp.

◆ slesEnd()

std::unique_ptr< ReadView::sles_type::iter_base > ripple::detail::RawStateTable::slesEnd ( ReadView const &  base) const

Definition at line 325 of file RawStateTable.cpp.

◆ slesUpperBound()

std::unique_ptr< ReadView::sles_type::iter_base > ripple::detail::RawStateTable::slesUpperBound ( ReadView const &  base,
uint256 const &  key 
) const

Definition at line 332 of file RawStateTable.cpp.

Member Data Documentation

◆ initialBufferSize

constexpr size_t ripple::detail::RawStateTable::initialBufferSize = kilobytes(256)
staticconstexpr

Definition at line 24 of file RawStateTable.h.

◆ monotonic_resource_

std::unique_ptr<boost::container::pmr::monotonic_buffer_resource> ripple::detail::RawStateTable::monotonic_resource_
private

Definition at line 114 of file RawStateTable.h.

◆ items_

items_t ripple::detail::RawStateTable::items_
private

Definition at line 115 of file RawStateTable.h.

◆ dropsDestroyed_

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

Definition at line 117 of file RawStateTable.h.