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 <xrpl/ledger/ReadView.h>
24#include <xrpl/protocol/STLedgerEntry.h>
25#include <xrpl/protocol/Serializer.h>
26
27namespace ripple {
28
34{
35public:
36 virtual ~RawView() = default;
37 RawView() = default;
38 RawView(RawView const&) = default;
39 RawView&
40 operator=(RawView const&) = delete;
41
47 virtual void
49
61 virtual void
63
76 virtual void
78
83 virtual void
84 rawDestroyXRP(XRPAmount const& fee) = 0;
85};
86
87//------------------------------------------------------------------------------
88
94class TxsRawView : public RawView
95{
96public:
102 virtual void
104 ReadView::key_type const& key,
106 std::shared_ptr<Serializer const> const& metaData) = 0;
107};
108
109} // namespace ripple
110
111#endif
Interface for ledger entry changes.
Definition RawView.h:34
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:95
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