20 #ifndef RIPPLE_SHAMAP_SHAMAPNODEID_H_INCLUDED
21 #define RIPPLE_SHAMAP_SHAMAPNODEID_H_INCLUDED
23 #include <ripple/basics/CountedObject.h>
24 #include <ripple/basics/base_uint.h>
118 return !(*
this == n);
126 return "NodeID(root)";
158 [[nodiscard]]
unsigned int
SHAMapNodeID getChildNodeID(unsigned int m) const
Tracks the number of instances of an object.
unsigned int selectBranch(SHAMapNodeID const &id, uint256 const &hash)
Returns the branch that would contain the given hash.
std::optional< SHAMapNodeID > deserializeSHAMapNodeID(void const *data, std::size_t size)
Return an object representing a serialized SHAMap Node ID.
bool operator==(SHAMapNodeID const &n) const
Identifies a node inside a SHAMap.
std::ostream & operator<<(std::ostream &os, TOffer< TIn, TOut > const &offer)
bool operator>(SHAMapNodeID const &n) const
SHAMapNodeID & operator=(SHAMapNodeID const &other)=default
bool operator<(SHAMapNodeID const &n) const
Comparison operators.
bool operator!=(SHAMapNodeID const &n) const
bool operator>=(SHAMapNodeID const &n) const
std::string getRawString() const
unsigned int getDepth() const
bool operator<=(SHAMapNodeID const &n) const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
uint256 const & getNodeID() const
static SHAMapNodeID createID(int depth, uint256 const &key)
Create a SHAMapNodeID of a node with the depth of the node and the key of a leaf.