20 #include <ripple/basics/contract.h>
21 #include <ripple/ledger/detail/ApplyViewBase.h>
27 : flags_(flags), base_(base)
67 return items_.succ(*base_, key, last);
92 return base_->slesUpperBound(key);
116 return base_->txRead(key);
virtual LedgerInfo const & info() const =0
Returns information about the ledger.
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.
A pair of SHAMap key and LedgerEntryType.
void rawReplace(std::shared_ptr< SLE > const &sle) override
Unconditionally replace a state item.
std::unique_ptr< txs_type::iter_base > txsBegin() const override
void insert(ReadView const &base, std::shared_ptr< SLE > const &sle)
tx_type txRead(key_type const &key) const override
Read a transaction from the tx map.
bool exists(Keylet const &k) const override
Determine if a state item exists.
virtual Fees const & fees() const =0
Returns the fees for the base ledger.
void update(std::shared_ptr< SLE > const &sle) override
Indicate changes to a peeked SLE.
virtual std::unique_ptr< txs_type::iter_base > txsEnd() const =0
bool exists(ReadView const &base, Keylet const &k) const
virtual bool txExists(key_type const &key) const =0
Returns true if a tx exists in the tx map.
virtual std::unique_ptr< sles_type::iter_base > slesBegin() const =0
Fees const & fees() const override
Returns the fees for the base ledger.
detail::ApplyStateTable items_
void destroyXRP(XRPAmount const &fee)
void replace(ReadView const &base, std::shared_ptr< SLE > const &sle)
virtual std::unique_ptr< txs_type::iter_base > txsBegin() const =0
std::unique_ptr< txs_type::iter_base > txsEnd() const override
bool open() const override
Returns true if this reflects an open ledger.
Reflects the fee settings for a particular ledger.
LedgerInfo const & info() const override
Returns information about the ledger.
std::unique_ptr< sles_type::iter_base > slesEnd() const override
virtual std::unique_ptr< sles_type::iter_base > slesEnd() const =0
void erase(ReadView const &base, std::shared_ptr< SLE > const &sle)
std::unique_ptr< sles_type::iter_base > slesBegin() const override
void rawErase(std::shared_ptr< SLE > const &sle) override
Delete an existing state item.
std::shared_ptr< SLE const > read(ReadView const &base, Keylet const &k) const
void rawErase(ReadView const &base, std::shared_ptr< SLE > const &sle)
void insert(std::shared_ptr< SLE > const &sle) override
Insert a new state SLE.
void erase(std::shared_ptr< SLE > const &sle) override
Remove a peeked SLE.
ApplyFlags flags() const override
Returns the tx apply flags.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
virtual Rules const & rules() const =0
Returns the tx processing rules.
void update(ReadView const &base, std::shared_ptr< SLE > const &sle)
Rules controlling protocol behavior.
std::shared_ptr< SLE const > read(Keylet const &k) const override
Return the state item associated with a key.
std::shared_ptr< SLE > peek(Keylet const &k) override
Prepare to modify the SLE associated with key.
Information about the notional ledger backing the view.
Rules const & rules() const override
Returns the tx processing rules.
bool txExists(key_type const &key) const override
Returns true if a tx exists in the tx map.
std::shared_ptr< SLE > peek(ReadView const &base, Keylet const &k)
virtual bool open() const =0
Returns true if this reflects an open ledger.
void rawInsert(std::shared_ptr< SLE > const &sle) override
Unconditionally insert a state item.
std::unique_ptr< sles_type::iter_base > slesUpperBound(uint256 const &key) const override
void rawDestroyXRP(XRPAmount const &feeDrops) override
Destroy XRP.