1#ifndef XRPL_LEDGER_APPLYVIEWBASE_H_INCLUDED
2#define XRPL_LEDGER_APPLYVIEWBASE_H_INCLUDED
4#include <xrpl/ledger/ApplyView.h>
5#include <xrpl/ledger/ReadView.h>
6#include <xrpl/ledger/detail/ApplyStateTable.h>
7#include <xrpl/protocol/XRPAmount.h>
28 open()
const override;
31 info()
const override;
34 fees()
const override;
37 rules()
const override;
74 flags()
const override;
Writeable view to a ledger, for applying a transaction.
Interface for ledger entry changes.
Rules controlling protocol behavior.
ApplyViewBase(ApplyViewBase &&)=default
Fees const & fees() const override
Returns the fees for the base ledger.
void erase(std::shared_ptr< SLE > const &sle) override
Remove a peeked SLE.
void rawDestroyXRP(XRPAmount const &feeDrops) override
Destroy XRP.
std::unique_ptr< txs_type::iter_base > txsEnd() const override
bool open() const override
Returns true if this reflects an open ledger.
void update(std::shared_ptr< SLE > const &sle) override
Indicate changes to a peeked SLE.
ApplyViewBase & operator=(ApplyViewBase &&)=delete
void insert(std::shared_ptr< SLE > const &sle) override
Insert a new state SLE.
std::unique_ptr< sles_type::iter_base > slesEnd() const override
LedgerInfo const & info() const override
Returns information about the ledger.
detail::ApplyStateTable items_
void rawReplace(std::shared_ptr< SLE > const &sle) override
Unconditionally replace a state item.
void rawErase(std::shared_ptr< SLE > const &sle) override
Delete an existing state item.
tx_type txRead(key_type const &key) const override
Read a transaction from the tx map.
ApplyViewBase(ApplyViewBase const &)=delete
std::unique_ptr< sles_type::iter_base > slesBegin() const override
std::unique_ptr< txs_type::iter_base > txsBegin() const override
void rawInsert(std::shared_ptr< SLE > const &sle) override
Unconditionally insert a state item.
ApplyViewBase & operator=(ApplyViewBase const &)=delete
bool exists(Keylet const &k) const override
Determine if a state item exists.
std::optional< key_type > succ(key_type const &key, std::optional< key_type > const &last=std::nullopt) const override
Return the key of the next state item.
ApplyFlags flags() const override
Returns the tx apply flags.
bool txExists(key_type const &key) const override
Returns true if a tx exists in the tx map.
std::shared_ptr< SLE const > read(Keylet const &k) const override
Return the state item associated with a key.
std::unique_ptr< sles_type::iter_base > slesUpperBound(uint256 const &key) const override
Rules const & rules() const override
Returns the tx processing rules.
std::shared_ptr< SLE > peek(Keylet const &k) override
Prepare to modify the SLE associated with key.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Reflects the fee settings for a particular ledger.
A pair of SHAMap key and LedgerEntryType.