CatapultServer  v0.5.0.1 (Elephant)
catapult::ionet::Node Class Reference

A node in the catapult network. More...

Collaboration diagram for catapult::ionet::Node:

Public Member Functions

 Node ()
 Creates a default node. More...
 
 Node (const Key &identityKey, const NodeEndpoint &endpoint, const NodeMetadata &metadata)
 Creates a node around a unique identifier (identityKey) with endpoint and metadata. More...
 
const Key & identityKey () const
 Gets the unique identifier (a public key). More...
 
const NodeEndpoint & endpoint () const
 Gets the endpoint. More...
 
const NodeMetadata & metadata () const
 Gets tne metadata. More...
 
bool operator== (const Node &rhs) const
 Returns true if this node is equal to rhs. More...
 
bool operator!= (const Node &rhs) const
 Returns true if this node is not equal to rhs. More...
 

Private Attributes

Key m_identityKey
 
NodeEndpoint m_endpoint
 
NodeMetadata m_metadata
 
std::string m_printableName
 

Friends

std::ostream & operator<< (std::ostream &out, const Node &node)
 Insertion operator for outputting node to out. More...
 

Detailed Description

A node in the catapult network.

Constructor & Destructor Documentation

◆ Node() [1/2]

catapult::ionet::Node::Node ( )

Creates a default node.

◆ Node() [2/2]

catapult::ionet::Node::Node ( const Key &  identityKey,
const NodeEndpoint &  endpoint,
const NodeMetadata &  metadata 
)

Creates a node around a unique identifier (identityKey) with endpoint and metadata.

Member Function Documentation

◆ endpoint()

const NodeEndpoint & catapult::ionet::Node::endpoint ( ) const

Gets the endpoint.

Here is the caller graph for this function:

◆ identityKey()

const Key & catapult::ionet::Node::identityKey ( ) const

Gets the unique identifier (a public key).

Here is the caller graph for this function:

◆ metadata()

const NodeMetadata & catapult::ionet::Node::metadata ( ) const

Gets tne metadata.

Here is the caller graph for this function:

◆ operator!=()

bool catapult::ionet::Node::operator!= ( const Node &  rhs) const

Returns true if this node is not equal to rhs.

◆ operator==()

bool catapult::ionet::Node::operator== ( const Node &  rhs) const

Returns true if this node is equal to rhs.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Node &  node 
)
friend

Insertion operator for outputting node to out.

Member Data Documentation

◆ m_endpoint

NodeEndpoint catapult::ionet::Node::m_endpoint
private

◆ m_identityKey

Key catapult::ionet::Node::m_identityKey
private

◆ m_metadata

NodeMetadata catapult::ionet::Node::m_metadata
private

◆ m_printableName

std::string catapult::ionet::Node::m_printableName
private

The documentation for this class was generated from the following files: