rippled
Loading...
Searching...
No Matches
Sandbox.h
1#ifndef XRPL_LEDGER_SANDBOX_H_INCLUDED
2#define XRPL_LEDGER_SANDBOX_H_INCLUDED
3
4#include <xrpl/ledger/RawView.h>
5#include <xrpl/ledger/detail/ApplyViewBase.h>
6
7namespace ripple {
8
16{
17public:
18 Sandbox() = delete;
19 Sandbox(Sandbox const&) = delete;
20 Sandbox&
21 operator=(Sandbox&&) = delete;
22 Sandbox&
23 operator=(Sandbox const&) = delete;
24
25 Sandbox(Sandbox&&) = default;
26
28 {
29 }
30
31 Sandbox(ApplyView const* base) : Sandbox(base, base->flags())
32 {
33 }
34
35 void
37 {
38 items_.apply(to);
39 }
40};
41
42} // namespace ripple
43
44#endif
Writeable view to a ledger, for applying a transaction.
Definition ApplyView.h:124
Interface for ledger entry changes.
Definition RawView.h:15
A view into a ledger.
Definition ReadView.h:32
Discardable, editable view to a ledger.
Definition Sandbox.h:16
Sandbox(ApplyView const *base)
Definition Sandbox.h:31
Sandbox(Sandbox &&)=default
Sandbox & operator=(Sandbox &&)=delete
Sandbox()=delete
Sandbox & operator=(Sandbox const &)=delete
Sandbox(ReadView const *base, ApplyFlags flags)
Definition Sandbox.h:27
Sandbox(Sandbox const &)=delete
void apply(RawView &to)
Definition Sandbox.h:36
void apply(RawView &to) const
detail::ApplyStateTable items_
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