rippled
Public Types | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
ripple::detail::ApplyStateTable Class Reference
Collaboration diagram for ripple::detail::ApplyStateTable:
Collaboration graph
[legend]

Public Types

using key_type = ReadView::key_type
 

Public Member Functions

 ApplyStateTable ()=default
 
 ApplyStateTable (ApplyStateTable &&)=default
 
 ApplyStateTable (ApplyStateTable const &)=delete
 
ApplyStateTableoperator= (ApplyStateTable &&)=delete
 
ApplyStateTableoperator= (ApplyStateTable const &)=delete
 
void apply (RawView &to) const
 
void apply (OpenView &to, STTx const &tx, TER ter, std::optional< STAmount > const &deliver, beast::Journal j)
 
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
 
std::shared_ptr< SLE const > read (ReadView const &base, Keylet const &k) const
 
std::shared_ptr< SLEpeek (ReadView const &base, Keylet const &k)
 
std::size_t size () const
 
void visit (ReadView const &base, std::function< void(uint256 const &key, bool isDelete, std::shared_ptr< SLE const > const &before, std::shared_ptr< SLE const > const &after)> const &func) const
 
void erase (ReadView const &base, std::shared_ptr< SLE > const &sle)
 
void rawErase (ReadView const &base, std::shared_ptr< SLE > const &sle)
 
void insert (ReadView const &base, std::shared_ptr< SLE > const &sle)
 
void update (ReadView const &base, std::shared_ptr< SLE > const &sle)
 
void replace (ReadView const &base, std::shared_ptr< SLE > const &sle)
 
void destroyXRP (XRPAmount const &fee)
 
XRPAmount const & dropsDestroyed () const
 

Private Types

enum  Action { Action::cache, Action::erase, Action::insert, Action::modify }
 
using items_t = std::map< key_type, std::pair< Action, std::shared_ptr< SLE > >>
 
using Mods = hash_map< key_type, std::shared_ptr< SLE > >
 

Private Member Functions

std::shared_ptr< SLEgetForMod (ReadView const &base, key_type const &key, Mods &mods, beast::Journal j)
 
void threadTx (ReadView const &base, TxMeta &meta, AccountID const &to, Mods &mods, beast::Journal j)
 
void threadOwners (ReadView const &base, TxMeta &meta, std::shared_ptr< SLE const > const &sle, Mods &mods, beast::Journal j)
 

Static Private Member Functions

static void threadItem (TxMeta &meta, std::shared_ptr< SLE > const &to)
 

Private Attributes

items_t items_
 
XRPAmount dropsDestroyed_ {0}
 

Detailed Description

Definition at line 36 of file ApplyStateTable.h.

Member Typedef Documentation

◆ key_type

Definition at line 39 of file ApplyStateTable.h.

◆ items_t

Definition at line 49 of file ApplyStateTable.h.

◆ Mods

Definition at line 128 of file ApplyStateTable.h.

Member Enumeration Documentation

◆ Action

Enumerator
cache 
erase 
insert 
modify 

Definition at line 42 of file ApplyStateTable.h.

Constructor & Destructor Documentation

◆ ApplyStateTable() [1/3]

ripple::detail::ApplyStateTable::ApplyStateTable ( )
default

◆ ApplyStateTable() [2/3]

ripple::detail::ApplyStateTable::ApplyStateTable ( ApplyStateTable &&  )
default

◆ ApplyStateTable() [3/3]

ripple::detail::ApplyStateTable::ApplyStateTable ( ApplyStateTable const &  )
delete

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ apply() [1/2]

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

Definition at line 31 of file ApplyStateTable.cpp.

◆ apply() [2/2]

void ripple::detail::ApplyStateTable::apply ( OpenView to,
STTx const &  tx,
TER  ter,
std::optional< STAmount > const &  deliver,
beast::Journal  j 
)

Definition at line 113 of file ApplyStateTable.cpp.

◆ exists()

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

Definition at line 268 of file ApplyStateTable.cpp.

◆ succ()

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

Definition at line 290 of file ApplyStateTable.cpp.

◆ read()

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

Definition at line 325 of file ApplyStateTable.cpp.

◆ peek()

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

Definition at line 347 of file ApplyStateTable.cpp.

◆ size()

std::size_t ripple::detail::ApplyStateTable::size ( ) const

Definition at line 55 of file ApplyStateTable.cpp.

◆ visit()

void ripple::detail::ApplyStateTable::visit ( ReadView const &  base,
std::function< void(uint256 const &key, bool isDelete, std::shared_ptr< SLE const > const &before, std::shared_ptr< SLE const > const &after)> const &  func 
) const

Definition at line 74 of file ApplyStateTable.cpp.

◆ erase()

void ripple::detail::ApplyStateTable::erase ( ReadView const &  base,
std::shared_ptr< SLE > const &  sle 
)

Definition at line 381 of file ApplyStateTable.cpp.

◆ rawErase()

void ripple::detail::ApplyStateTable::rawErase ( ReadView const &  base,
std::shared_ptr< SLE > const &  sle 
)

Definition at line 405 of file ApplyStateTable.cpp.

◆ insert()

void ripple::detail::ApplyStateTable::insert ( ReadView const &  base,
std::shared_ptr< SLE > const &  sle 
)

Definition at line 432 of file ApplyStateTable.cpp.

◆ update()

void ripple::detail::ApplyStateTable::update ( ReadView const &  base,
std::shared_ptr< SLE > const &  sle 
)

Definition at line 491 of file ApplyStateTable.cpp.

◆ replace()

void ripple::detail::ApplyStateTable::replace ( ReadView const &  base,
std::shared_ptr< SLE > const &  sle 
)

Definition at line 462 of file ApplyStateTable.cpp.

◆ destroyXRP()

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

Definition at line 514 of file ApplyStateTable.cpp.

◆ dropsDestroyed()

XRPAmount const& ripple::detail::ApplyStateTable::dropsDestroyed ( ) const

Definition at line 122 of file ApplyStateTable.h.

◆ threadItem()

void ripple::detail::ApplyStateTable::threadItem ( TxMeta meta,
std::shared_ptr< SLE > const &  to 
)
staticprivate

Definition at line 523 of file ApplyStateTable.cpp.

◆ getForMod()

std::shared_ptr< SLE > ripple::detail::ApplyStateTable::getForMod ( ReadView const &  base,
key_type const &  key,
Mods mods,
beast::Journal  j 
)
private

Definition at line 548 of file ApplyStateTable.cpp.

◆ threadTx()

void ripple::detail::ApplyStateTable::threadTx ( ReadView const &  base,
TxMeta meta,
AccountID const &  to,
Mods mods,
beast::Journal  j 
)
private

Definition at line 597 of file ApplyStateTable.cpp.

◆ threadOwners()

void ripple::detail::ApplyStateTable::threadOwners ( ReadView const &  base,
TxMeta meta,
std::shared_ptr< SLE const > const &  sle,
Mods mods,
beast::Journal  j 
)
private

Definition at line 617 of file ApplyStateTable.cpp.

Member Data Documentation

◆ items_

items_t ripple::detail::ApplyStateTable::items_
private

Definition at line 51 of file ApplyStateTable.h.

◆ dropsDestroyed_

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

Definition at line 52 of file ApplyStateTable.h.