rippled
Classes | Public Types | Public Member Functions | Static Public Attributes | Private Types | Private Attributes | List of all members
ripple::detail::RawStateTable Class Reference
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  Action { Action::erase, Action::insert, Action::replace }
 
using items_t = std::map< key_type, sleAction, std::less< key_type >, boost::container::pmr::polymorphic_allocator< std::pair< const key_type, 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 36 of file RawStateTable.h.

Member Typedef Documentation

◆ key_type

Definition at line 39 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<const key_type, sleAction> >>
private

Definition at line 129 of file RawStateTable.h.

Member Enumeration Documentation

◆ Action

Enumerator
erase 
insert 
replace 

Definition at line 102 of file RawStateTable.h.

Constructor & Destructor Documentation

◆ RawStateTable() [1/3]

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

Definition at line 45 of file RawStateTable.h.

◆ RawStateTable() [2/3]

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

Definition at line 51 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 158 of file RawStateTable.cpp.

◆ exists()

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

Definition at line 180 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 199 of file RawStateTable.cpp.

◆ erase()

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

Definition at line 234 of file RawStateTable.cpp.

◆ insert()

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

Definition at line 260 of file RawStateTable.cpp.

◆ replace()

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

Definition at line 285 of file RawStateTable.cpp.

◆ read()

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

Definition at line 307 of file RawStateTable.cpp.

◆ destroyXRP()

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

Definition at line 323 of file RawStateTable.cpp.

◆ slesBegin()

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

Definition at line 329 of file RawStateTable.cpp.

◆ slesEnd()

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

Definition at line 336 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 343 of file RawStateTable.cpp.

Member Data Documentation

◆ initialBufferSize

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

Definition at line 43 of file RawStateTable.h.

◆ monotonic_resource_

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

Definition at line 133 of file RawStateTable.h.

◆ items_

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

Definition at line 134 of file RawStateTable.h.

◆ dropsDestroyed_

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

Definition at line 136 of file RawStateTable.h.