xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
ledger
ApplyViewImpl.h
1
#pragma once
2
3
#include <xrpl/basics/base_uint.h>
4
#include <xrpl/beast/utility/Journal.h>
5
#include <xrpl/ledger/ApplyView.h>
6
#include <xrpl/ledger/OpenView.h>
7
#include <xrpl/ledger/ReadView.h>
8
#include <xrpl/ledger/detail/ApplyViewBase.h>
9
#include <xrpl/protocol/STAmount.h>
10
#include <xrpl/protocol/STLedgerEntry.h>
11
#include <xrpl/protocol/STTx.h>
12
#include <xrpl/protocol/TER.h>
13
#include <xrpl/protocol/TxMeta.h>
14
15
#include <
cstddef
>
16
#include <
functional
>
17
#include <
optional
>
18
19
namespace
xrpl
{
20
28
class
ApplyViewImpl
final :
public
detail::ApplyViewBase
29
{
30
public
:
31
ApplyViewImpl
() =
delete
;
32
ApplyViewImpl
(
ApplyViewImpl
const
&) =
delete
;
33
ApplyViewImpl
&
34
operator=
(
ApplyViewImpl
&&) =
delete
;
35
ApplyViewImpl
&
36
operator=
(
ApplyViewImpl
const
&) =
delete
;
37
38
ApplyViewImpl
(
ApplyViewImpl
&&) =
default
;
39
ApplyViewImpl
(
ReadView
const
* base,
ApplyFlags
flags
);
40
48
std::optional<TxMeta>
49
apply
(
50
OpenView
& to,
51
STTx
const
& tx,
52
TER
ter,
53
std::optional<UInt256>
parentBatchId,
54
bool
isDryRun,
55
beast::Journal
j);
56
65
void
66
deliver
(
STAmount
const
& amount)
67
{
68
deliver_
= amount;
69
}
70
74
std::size_t
75
size
();
76
80
void
81
visit
(
82
OpenView
& target,
83
std::function
<
void
(
84
UInt256
const
& key,
85
bool
isDelete,
86
SLE::ConstRef
before,
87
SLE::ConstRef
after
)>
const
& func);
88
89
private
:
90
std::optional<STAmount>
deliver_
;
91
};
92
93
}
// namespace xrpl
beast::Journal
A generic endpoint for log messages.
Definition
Journal.h:44
xrpl::ApplyViewImpl::ApplyViewImpl
ApplyViewImpl(ApplyViewImpl const &)=delete
xrpl::ApplyViewImpl::ApplyViewImpl
ApplyViewImpl()=delete
xrpl::ApplyViewImpl::operator=
ApplyViewImpl & operator=(ApplyViewImpl const &)=delete
xrpl::ApplyViewImpl::operator=
ApplyViewImpl & operator=(ApplyViewImpl &&)=delete
xrpl::ApplyViewImpl::size
std::size_t size()
Get the number of modified entries.
Definition
ApplyViewImpl.cpp:37
xrpl::ApplyViewImpl::deliver_
std::optional< STAmount > deliver_
Definition
ApplyViewImpl.h:90
xrpl::ApplyViewImpl::apply
std::optional< TxMeta > apply(OpenView &to, STTx const &tx, TER ter, std::optional< UInt256 > parentBatchId, bool isDryRun, beast::Journal j)
Apply the transaction.
Definition
ApplyViewImpl.cpp:25
xrpl::ApplyViewImpl::ApplyViewImpl
ApplyViewImpl(ApplyViewImpl &&)=default
xrpl::ApplyViewImpl::visit
void visit(OpenView &target, std::function< void(UInt256 const &key, bool isDelete, SLE::ConstRef before, SLE::ConstRef after)> const &func)
Visit modified entries.
Definition
ApplyViewImpl.cpp:43
xrpl::ApplyViewImpl::deliver
void deliver(STAmount const &amount)
Set the amount of currency delivered.
Definition
ApplyViewImpl.h:66
xrpl::OpenView
Writable ledger view that accumulates state and tx changes.
Definition
OpenView.h:59
xrpl::ReadView
A view into a ledger.
Definition
ReadView.h:41
xrpl::STAmount
Definition
STAmount.h:46
xrpl::STLedgerEntry::ConstRef
std::shared_ptr< STLedgerEntry const > const & ConstRef
Definition
STLedgerEntry.h:37
xrpl::STTx
Definition
STTx.h:43
xrpl::detail::ApplyViewBase
Definition
ApplyViewBase.h:21
xrpl::detail::ApplyViewBase::flags
ApplyFlags flags() const override
Returns the tx apply flags.
Definition
ApplyViewBase.cpp:112
cstddef
std::function
functional
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::UInt256
BaseUInt< 256 > UInt256
Definition
base_uint.h:580
xrpl::after
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
Definition
View.cpp:644
xrpl::ApplyFlags
ApplyFlags
Definition
ApplyView.h:27
xrpl::TER
TERSubset< CanCvtToTER > TER
Definition
TER.h:654
optional
std::size_t
Generated by
1.17.0