rippled
Loading...
Searching...
No Matches
RawView.h
1//------------------------------------------------------------------------------
2/*
3 This file is part of rippled: https://github.com/ripple/rippled
4 Copyright (c) 2012, 2013 Ripple Labs Inc.
5
6 Permission to use, copy, modify, and/or distribute this software for any
7 purpose with or without fee is hereby granted, provided that the above
8 copyright notice and this permission notice appear in all copies.
9
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17*/
18//==============================================================================
19
20#ifndef RIPPLE_LEDGER_RAWVIEW_H_INCLUDED
21#define RIPPLE_LEDGER_RAWVIEW_H_INCLUDED
22
23#include <xrpld/ledger/ReadView.h>
24#include <xrpl/protocol/STLedgerEntry.h>
25#include <xrpl/protocol/Serializer.h>
26#include <cstdint>
27#include <memory>
28#include <utility>
29
30namespace ripple {
31
37{
38public:
39 virtual ~RawView() = default;
40 RawView() = default;
41 RawView(RawView const&) = default;
42 RawView&
43 operator=(RawView const&) = delete;
44
50 virtual void
52
64 virtual void
66
79 virtual void
81
86 virtual void
87 rawDestroyXRP(XRPAmount const& fee) = 0;
88};
89
90//------------------------------------------------------------------------------
91
97class TxsRawView : public RawView
98{
99public:
105 virtual void
107 ReadView::key_type const& key,
109 std::shared_ptr<Serializer const> const& metaData) = 0;
110};
111
112} // namespace ripple
113
114#endif
Interface for ledger entry changes.
Definition: RawView.h:37
virtual void rawInsert(std::shared_ptr< SLE > const &sle)=0
Unconditionally insert a state item.
RawView(RawView const &)=default
virtual ~RawView()=default
RawView()=default
virtual void rawDestroyXRP(XRPAmount const &fee)=0
Destroy XRP.
virtual void rawReplace(std::shared_ptr< SLE > const &sle)=0
Unconditionally replace a state item.
virtual void rawErase(std::shared_ptr< SLE > const &sle)=0
Delete an existing state item.
RawView & operator=(RawView const &)=delete
Interface for changing ledger entries with transactions.
Definition: RawView.h:98
virtual void rawTxInsert(ReadView::key_type const &key, std::shared_ptr< Serializer const > const &txn, std::shared_ptr< Serializer const > const &metaData)=0
Add a transaction to the tx map.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: algorithm.h:26