rippled
Loading...
Searching...
No Matches
BookTip.h
1//------------------------------------------------------------------------------
2/*
3 This file is part of rippled: https://github.com/ripple/rippled
4 Copyright (c) 2014 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_APP_BOOK_BOOKTIP_H_INCLUDED
21#define RIPPLE_APP_BOOK_BOOKTIP_H_INCLUDED
22
23#include <xrpl/ledger/View.h>
24#include <xrpl/protocol/Indexes.h>
25#include <xrpl/protocol/Quality.h>
26
27namespace ripple {
28
29class Logs;
30
36{
37private:
39 bool m_valid;
45 Quality m_quality;
46
47public:
49 BookTip(ApplyView& view, Book const& book);
50
51 uint256 const&
52 dir() const noexcept
53 {
54 return m_dir;
55 }
56
57 uint256 const&
58 index() const noexcept
59 {
60 return m_index;
61 }
62
63 Quality const&
64 quality() const noexcept
65 {
66 return m_quality;
67 }
68
69 SLE::pointer const&
70 entry() const noexcept
71 {
72 return m_entry;
73 }
74
79 bool
81};
82
83} // namespace ripple
84
85#endif
A generic endpoint for log messages.
Definition Journal.h:60
Writeable view to a ledger, for applying a transaction.
Definition ApplyView.h:143
Iterates and consumes raw offers in an order book.
Definition BookTip.h:36
uint256 m_book
Definition BookTip.h:40
ApplyView & view_
Definition BookTip.h:38
uint256 m_index
Definition BookTip.h:43
bool step(beast::Journal j)
Erases the current offer and advance to the next offer.
Definition BookTip.cpp:33
uint256 m_end
Definition BookTip.h:41
uint256 const & dir() const noexcept
Definition BookTip.h:52
std::shared_ptr< SLE > m_entry
Definition BookTip.h:44
Quality m_quality
Definition BookTip.h:45
Quality const & quality() const noexcept
Definition BookTip.h:64
uint256 m_dir
Definition BookTip.h:42
SLE::pointer const & entry() const noexcept
Definition BookTip.h:70
uint256 const & index() const noexcept
Definition BookTip.h:58
Specifies an order book.
Definition Book.h:36
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25