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(OpenView& to, STTx const& tx, TER ter, std::optional<uint256> parentBatchId, bool isDryRun, beast::Journal j);
37
45 void
46 deliver(STAmount const& amount)
47 {
48 deliver_ = amount;
49 }
50
54 size();
55
58 void
59 visit(
60 OpenView& target,
61 std::function<void(
62 uint256 const& key,
63 bool isDelete,
64 std::shared_ptr<SLE const> const& before,
65 std::shared_ptr<SLE const> const& after)> const& func);
66
67private:
69};
70
71} // 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:3436
ApplyFlags
Definition ApplyView.h:10