Files
rippled/include/xrpl/ledger/Sandbox.h
Bart 34ef577604 refactor: Replace include guards by '#pragma once' (#6322)
This change replaces all include guards in the `src/` and `include/` directories by `#pragma once`.
2026-02-04 09:50:21 -05:00

42 lines
776 B
C++

#pragma once
#include <xrpl/ledger/RawView.h>
#include <xrpl/ledger/detail/ApplyViewBase.h>
namespace xrpl {
/** Discardable, editable view to a ledger.
The sandbox inherits the flags of the base.
@note Presented as ApplyView to clients.
*/
class Sandbox : public detail::ApplyViewBase
{
public:
Sandbox() = delete;
Sandbox(Sandbox const&) = delete;
Sandbox&
operator=(Sandbox&&) = delete;
Sandbox&
operator=(Sandbox const&) = delete;
Sandbox(Sandbox&&) = default;
Sandbox(ReadView const* base, ApplyFlags flags) : ApplyViewBase(base, flags)
{
}
Sandbox(ApplyView const* base) : Sandbox(base, base->flags())
{
}
void
apply(RawView& to)
{
items_.apply(to);
}
};
} // namespace xrpl