rippled
Loading...
Searching...
No Matches
ApplyViewImpl.h
1#pragma once
2
3#include <xrpl/ledger/OpenView.h>
4#include <xrpl/ledger/detail/ApplyViewBase.h>
5#include <xrpl/protocol/STAmount.h>
6#include <xrpl/protocol/TER.h>
7
8namespace xrpl {
9
17{
18public:
19 ApplyViewImpl() = delete;
20 ApplyViewImpl(ApplyViewImpl const&) = delete;
24 operator=(ApplyViewImpl const&) = delete;
25
28
36 apply(
37 OpenView& to,
38 STTx const& tx,
39 TER ter,
40 std::optional<uint256> parentBatchId,
41 bool isDryRun,
43
51 void
52 deliver(STAmount const& amount)
53 {
54 deliver_ = amount;
55 }
56
60 size();
61
64 void
65 visit(
66 OpenView& target,
67 std::function<void(
68 uint256 const& key,
69 bool isDelete,
70 std::shared_ptr<SLE const> const& before,
71 std::shared_ptr<SLE const> const& after)> const& func);
72
73private:
75};
76
77} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:40
Editable, discardable view that can build metadata for one tx.
ApplyViewImpl(ApplyViewImpl const &)=delete
ApplyViewImpl & operator=(ApplyViewImpl const &)=delete
std::optional< TxMeta > apply(OpenView &to, STTx const &tx, TER ter, std::optional< uint256 > parentBatchId, bool isDryRun, beast::Journal j)
Apply the transaction.
ApplyViewImpl & operator=(ApplyViewImpl &&)=delete
void visit(OpenView &target, std::function< void(uint256 const &key, bool isDelete, std::shared_ptr< SLE const > const &before, std::shared_ptr< SLE const > const &after)> const &func)
Visit modified entries.
std::size_t size()
Get the number of modified entries.
std::optional< STAmount > deliver_
ApplyViewImpl(ApplyViewImpl &&)=default
void deliver(STAmount const &amount)
Set the amount of currency delivered.
Writable ledger view that accumulates state and tx changes.
Definition OpenView.h:45
A view into a ledger.
Definition ReadView.h:31
ApplyFlags flags() const override
Returns the tx apply flags.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
Definition View.cpp:523
ApplyFlags
Definition ApplyView.h:10