rippled
Loading...
Searching...
No Matches
ApplyViewImpl.h
1#ifndef XRPL_LEDGER_APPLYVIEWIMPL_H_INCLUDED
2#define XRPL_LEDGER_APPLYVIEWIMPL_H_INCLUDED
3
4#include <xrpl/ledger/OpenView.h>
5#include <xrpl/ledger/detail/ApplyViewBase.h>
6#include <xrpl/protocol/STAmount.h>
7#include <xrpl/protocol/TER.h>
8
9namespace ripple {
10
18{
19public:
20 ApplyViewImpl() = delete;
21 ApplyViewImpl(ApplyViewImpl const&) = delete;
25 operator=(ApplyViewImpl const&) = delete;
26
29
37 apply(
38 OpenView& to,
39 STTx const& tx,
40 TER ter,
41 std::optional<uint256> parentBatchId,
42 bool isDryRun,
44
52 void
53 deliver(STAmount const& amount)
54 {
55 deliver_ = amount;
56 }
57
61 size();
62
65 void
66 visit(
67 OpenView& target,
68 std::function<void(
69 uint256 const& key,
70 bool isDelete,
71 std::shared_ptr<SLE const> const& before,
72 std::shared_ptr<SLE const> const& after)> const& func);
73
74private:
76};
77
78} // namespace ripple
79
80#endif
A generic endpoint for log messages.
Definition Journal.h:41
Editable, discardable view that can build metadata for one tx.
std::optional< TxMeta > apply(OpenView &to, STTx const &tx, TER ter, std::optional< uint256 > parentBatchId, bool isDryRun, beast::Journal j)
Apply the transaction.
std::optional< STAmount > deliver_
void deliver(STAmount const &amount)
Set the amount of currency delivered.
std::size_t size()
Get the number of modified entries.
ApplyViewImpl(ApplyViewImpl const &)=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.
ApplyViewImpl & operator=(ApplyViewImpl const &)=delete
ApplyViewImpl & operator=(ApplyViewImpl &&)=delete
ApplyViewImpl(ApplyViewImpl &&)=default
Writable ledger view that accumulates state and tx changes.
Definition OpenView.h:46
A view into a ledger.
Definition ReadView.h:32
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:6
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
Definition View.cpp:3247