20#ifndef RIPPLE_PROTOCOL_BOOK_H_INCLUDED
21#define RIPPLE_PROTOCOL_BOOK_H_INCLUDED
23#include <xrpl/basics/CountedObject.h>
24#include <xrpl/protocol/Issue.h>
26#include <boost/utility/base_from_member.hpp>
58template <
class Hasher>
71[[nodiscard]]
inline constexpr bool
74 return (lhs.
in == rhs.
in) && (lhs.
out == rhs.
out);
83 if (
auto const c{lhs.
in <=> rhs.
in}; c != 0)
85 return lhs.
out <=> rhs.
out;
97 :
private boost::base_from_member<std::hash<ripple::Currency>, 0>,
98 private boost::base_from_member<std::hash<ripple::AccountID>, 1>
102 boost::base_from_member<std::hash<ripple::Currency>, 0>;
104 boost::base_from_member<std::hash<ripple::AccountID>, 1>;
118 result, issuer_hash_type::member(value.
account));
143 boost::hash_combine(result, m_hasher(value.
out));
Book(Issue const &in_, Issue const &out_)
Tracks the number of instances of an object.
A currency issued by an account.
std::enable_if_t< is_contiguously_hashable< T, Hasher >::value > hash_append(Hasher &h, T const &t) noexcept
Logically concatenate input data to a Hasher.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void hash_append(Hasher &h, Slice const &v)
bool isConsistent(Book const &book)
constexpr std::strong_ordering operator<=>(base_uint< Bits, Tag > const &lhs, base_uint< Bits, Tag > const &rhs)
Book reversed(Book const &book)
std::ostream & operator<<(std::ostream &out, base_uint< Bits, Tag > const &u)
std::string to_string(base_uint< Bits, Tag > const &a)
constexpr bool operator==(base_uint< Bits, Tag > const &lhs, base_uint< Bits, Tag > const &rhs)
value_type operator()(argument_type const &value) const
boost::base_from_member< std::hash< ripple::AccountID >, 1 > issuer_hash_type
value_type operator()(argument_type const &value) const
boost::base_from_member< std::hash< ripple::Currency >, 0 > currency_hash_type