20 #ifndef RIPPLE_PROTOCOL_BOOK_H_INCLUDED
21 #define RIPPLE_PROTOCOL_BOOK_H_INCLUDED
23 #include <ripple/basics/CountedObject.h>
24 #include <ripple/protocol/Issue.h>
25 #include <boost/utility/base_from_member.hpp>
57 template <
class Hasher>
70 [[nodiscard]]
inline constexpr
bool
73 return (lhs.
in == rhs.
in) && (lhs.
out == rhs.
out);
82 if (
auto const c{lhs.
in <=> rhs.
in}; c != 0)
84 return lhs.
out <=> rhs.
out;
96 :
private boost::base_from_member<std::hash<ripple::Currency>, 0>,
97 private boost::base_from_member<std::hash<ripple::AccountID>, 1>
101 boost::base_from_member<std::hash<ripple::Currency>, 0>;
103 boost::base_from_member<std::hash<ripple::AccountID>, 1>;
106 explicit hash() =
default;
117 result, issuer_hash_type::member(value.
account));
133 explicit hash() =
default;
142 boost::hash_combine(result, m_hasher(value.
out));
156 explicit hash() =
default;
166 explicit hash() =
default;
Tracks the number of instances of an object.
A currency issued by an account.
boost::base_from_member< std::hash< ripple::AccountID >, 1 > issuer_hash_type
bool isConsistent(Book const &book)
constexpr std::strong_ordering operator<=>(base_uint< Bits, Tag > const &lhs, base_uint< Bits, Tag > const &rhs)
std::ostream & operator<<(std::ostream &os, TOffer< TIn, TOut > const &offer)
bool operator==(Manifest const &lhs, Manifest const &rhs)
Book reversed(Book const &book)
value_type operator()(argument_type const &value) const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
boost::base_from_member< std::hash< ripple::Currency >, 0 > currency_hash_type
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.
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
void hash_append(Hasher &h, ValidatorBlobInfo const &blobInfo)
Book(Issue const &in_, Issue const &out_)
value_type operator()(argument_type const &value) const