rippled
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
ripple::SHAMapNodeID Class Reference

Identifies a node inside a SHAMap. More...

Inheritance diagram for ripple::SHAMapNodeID:
Inheritance graph
[legend]
Collaboration diagram for ripple::SHAMapNodeID:
Collaboration graph
[legend]

Public Member Functions

 SHAMapNodeID ()=default
 
 SHAMapNodeID (SHAMapNodeID const &other)=default
 
 SHAMapNodeID (unsigned int depth, uint256 const &hash)
 
SHAMapNodeIDoperator= (SHAMapNodeID const &other)=default
 
bool isRoot () const
 
std::string getRawString () const
 
unsigned int getDepth () const
 
uint256 const & getNodeID () const
 
SHAMapNodeID getChildNodeID (unsigned int m) const
 
bool operator< (SHAMapNodeID const &n) const
 Comparison operators. More...
 
bool operator> (SHAMapNodeID const &n) const
 
bool operator<= (SHAMapNodeID const &n) const
 
bool operator>= (SHAMapNodeID const &n) const
 
bool operator== (SHAMapNodeID const &n) const
 
bool operator!= (SHAMapNodeID const &n) const
 

Static Public Member Functions

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. More...
 

Static Private Member Functions

static auto & getCounter () noexcept
 

Private Attributes

uint256 id_
 
unsigned int depth_ = 0
 

Detailed Description

Identifies a node inside a SHAMap.

Definition at line 33 of file SHAMapNodeID.h.

Constructor & Destructor Documentation

◆ SHAMapNodeID() [1/3]

ripple::SHAMapNodeID::SHAMapNodeID ( )
default

◆ SHAMapNodeID() [2/3]

ripple::SHAMapNodeID::SHAMapNodeID ( SHAMapNodeID const &  other)
default

◆ SHAMapNodeID() [3/3]

ripple::SHAMapNodeID::SHAMapNodeID ( unsigned int  depth,
uint256 const &  hash 
)

Definition at line 57 of file SHAMapNodeID.cpp.

Member Function Documentation

◆ operator=()

SHAMapNodeID& ripple::SHAMapNodeID::operator= ( SHAMapNodeID const &  other)
default

◆ isRoot()

bool ripple::SHAMapNodeID::isRoot ( ) const

Definition at line 48 of file SHAMapNodeID.h.

◆ getRawString()

std::string ripple::SHAMapNodeID::getRawString ( ) const

Definition at line 65 of file SHAMapNodeID.cpp.

◆ getDepth()

unsigned int ripple::SHAMapNodeID::getDepth ( ) const

Definition at line 58 of file SHAMapNodeID.h.

◆ getNodeID()

uint256 const& ripple::SHAMapNodeID::getNodeID ( ) const

Definition at line 64 of file SHAMapNodeID.h.

◆ getChildNodeID()

SHAMapNodeID ripple::SHAMapNodeID::getChildNodeID ( unsigned int  m) const

Definition at line 74 of file SHAMapNodeID.cpp.

◆ createID()

SHAMapNodeID ripple::SHAMapNodeID::createID ( int  depth,
uint256 const &  key 
)
static

Create a SHAMapNodeID of a node with the depth of the node and the key of a leaf.

Parameters
depththe depth of the node
keythe key of a leaf
Returns
SHAMapNodeID of the node

Definition at line 136 of file SHAMapNodeID.cpp.

◆ operator<()

bool ripple::SHAMapNodeID::operator< ( SHAMapNodeID const &  n) const

Comparison operators.

Definition at line 86 of file SHAMapNodeID.h.

◆ operator>()

bool ripple::SHAMapNodeID::operator> ( SHAMapNodeID const &  n) const

Definition at line 92 of file SHAMapNodeID.h.

◆ operator<=()

bool ripple::SHAMapNodeID::operator<= ( SHAMapNodeID const &  n) const

Definition at line 98 of file SHAMapNodeID.h.

◆ operator>=()

bool ripple::SHAMapNodeID::operator>= ( SHAMapNodeID const &  n) const

Definition at line 104 of file SHAMapNodeID.h.

◆ operator==()

bool ripple::SHAMapNodeID::operator== ( SHAMapNodeID const &  n) const

Definition at line 110 of file SHAMapNodeID.h.

◆ operator!=()

bool ripple::SHAMapNodeID::operator!= ( SHAMapNodeID const &  n) const

Definition at line 116 of file SHAMapNodeID.h.

◆ getCounter()

static auto& ripple::CountedObject< SHAMapNodeID >::getCounter
staticprivatenoexceptinherited

Definition at line 128 of file CountedObject.h.

Member Data Documentation

◆ id_

uint256 ripple::SHAMapNodeID::id_
private

Definition at line 36 of file SHAMapNodeID.h.

◆ depth_

unsigned int ripple::SHAMapNodeID::depth_ = 0
private

Definition at line 37 of file SHAMapNodeID.h.