xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
libxrpl
protocol
Book.cpp
1
#include <xrpl/protocol/Book.h>
2
3
#include <xrpl/protocol/Asset.h>
4
5
#include <
ostream
>
6
#include <
string
>
7
8
namespace
xrpl
{
9
10
bool
11
isConsistent
(
Book
const
& book)
12
{
13
return
isConsistent
(book.in) &&
isConsistent
(book.out) && book.in != book.out;
14
}
15
16
std::string
17
to_string
(
Book
const
& book)
18
{
19
return
to_string
(book.in) +
"->"
+
to_string
(book.out);
20
}
21
22
std::ostream
&
23
operator<<
(
std::ostream
& os,
Book
const
& x)
24
{
25
os <<
to_string
(x);
26
return
os;
27
}
28
29
Book
30
reversed
(
Book
const
& book)
31
{
32
return
Book
(book.out, book.in, book.domain);
33
}
34
35
}
// namespace xrpl
std::ostream
std::string
xrpl::Book
Specifies an order book.
Definition
Book.h:28
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::operator<<
std::ostream & operator<<(std::ostream &out, BaseUInt< Bits, Tag > const &u)
Definition
base_uint.h:672
xrpl::to_string
std::string to_string(BaseUInt< Bits, Tag > const &a)
Definition
base_uint.h:657
xrpl::reversed
Book reversed(Book const &book)
Definition
Book.cpp:30
xrpl::isConsistent
bool isConsistent(Asset const &asset)
Definition
Asset.h:323
ostream
string
Generated by
1.17.0