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
25#include <xrpl/protocol/STLedgerEntry.h>
26#include <xrpl/protocol/Serializer.h>
27
28namespace ripple {
29
35{
36public:
37 virtual ~RawView() = default;
38 RawView() = default;
39 RawView(RawView const&) = default;
40 RawView&
41 operator=(RawView const&) = delete;
42
48 virtual void
50
62 virtual void
64
77 virtual void
79
84 virtual void
85 rawDestroyXRP(XRPAmount const& fee) = 0;
86};
87
88//------------------------------------------------------------------------------
89
95class TxsRawView : public RawView
96{
97public:
103 virtual void
105 ReadView::key_type const& key,
107 std::shared_ptr<Serializer const> const& metaData) = 0;
108};
109
110} // namespace ripple
111
112#endif
Interface for ledger entry changes.
Definition: RawView.h:35
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:96
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:25