CAF  0.17.2
Public Member Functions | Related Functions | List of all members
caf::node_id Class Reference

A node ID is an opaque value for representing CAF instances in the network. More...

#include <node_id.hpp>

Public Member Functions

 node_id (intrusive_ptr< data > dataptr)
 
node_idoperator= (const none_t &)
 
 node_id (node_id &&)=default
 
 node_id (const node_id &)=default
 
node_idoperator= (node_id &&)=default
 
node_idoperator= (const node_id &)=default
 
 operator bool () const
 Queries whether this node is not default-constructed.
 
int compare (const node_id &other) const noexcept
 Compares this instance to other. More...
 
void swap (node_id &other)
 Exchanges the value of this object with other.
 

Related Functions

(Note that these are not member functions.)

bool wraps_uri (const node_id &x) noexcept
 Returns whether x contains an URI.
 
bool operator== (const node_id &x, const node_id &y) noexcept
 
bool operator!= (const node_id &x, const node_id &y) noexcept
 
bool operator< (const node_id &x, const node_id &y) noexcept
 
bool operator<= (const node_id &x, const node_id &y) noexcept
 
bool operator> (const node_id &x, const node_id &y) noexcept
 
bool operator>= (const node_id &x, const node_id &y) noexcept
 
bool operator== (const node_id &x, const none_t &) noexcept
 
bool operator== (const none_t &, const node_id &x) noexcept
 
bool operator!= (const node_id &x, const none_t &) noexcept
 
bool operator!= (const none_t &, const node_id &x) noexcept
 
error inspect (serializer &sink, const node_id &x)
 
error inspect (deserializer &source, node_id &x)
 
void append_to_string (std::string &str, const node_id &x)
 Appends x in human-readable string representation to str.
 
std::string to_string (const node_id &x)
 Converts x into a human-readable string representation.
 
node_id make_node_id (uri from)
 Creates a node ID from the URI from.
 
node_id make_node_id (uint32_t process_id, const node_id::default_data::host_id_type &host_id)
 Creates a node ID from process_id and host_id. More...
 
optional< node_idmake_node_id (uint32_t process_id, const std::string &host_hash)
 Creates a node ID from process_id and host_hash. More...
 

Detailed Description

A node ID is an opaque value for representing CAF instances in the network.

Member Function Documentation

◆ compare()

int caf::node_id::compare ( const node_id other) const
noexcept

Compares this instance to other.

Returns
-1 if *this < other, 0 if *this == other, and 1 otherwise.

Friends And Related Function Documentation

◆ make_node_id() [1/2]

node_id make_node_id ( uint32_t  process_id,
const node_id::default_data::host_id_type &  host_id 
)
related

Creates a node ID from process_id and host_id.

Parameters
process_idSystem-wide unique process identifier.
host_idUnique hash value representing a single CAF node.

◆ make_node_id() [2/2]

optional< node_id > make_node_id ( uint32_t  process_id,
const std::string &  host_hash 
)
related

Creates a node ID from process_id and host_hash.

Parameters
process_idSystem-wide unique process identifier.
host_hashUnique node ID as hexadecimal string representation.

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