A node ID is an opaque value for representing CAF instances in the network.
More...
#include <node_id.hpp>
|
using | default_data = hashed_node_id |
|
|
| node_id (hashed_node_id data) |
|
| node_id (uri data) |
|
node_id & | operator= (const none_t &) |
|
| operator bool () const noexcept |
| Queries whether this node is not default-constructed.
|
|
bool | operator! () const noexcept |
| Queries whether this node is default-constructed.
|
|
int | compare (const node_id &other) const noexcept |
| Compares this instance to other .
|
|
void | swap (node_id &other) noexcept |
| Exchanges the value of this object with other .
|
|
|
static bool | can_parse (std::string_view str) noexcept |
| Returns whether parse would produce a valid node ID.
|
|
|
template<class Inspector > |
bool | inspect (Inspector &f, node_id &x) |
|
|
(Note that these are not member symbols.)
|
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 |
|
CAF_CORE_EXPORT void | append_to_string (std::string &str, const node_id &x) |
| Appends x in human-readable string representation to str .
|
|
CAF_CORE_EXPORT std::string | to_string (const node_id &x) |
| Converts x into a human-readable string representation.
|
|
CAF_CORE_EXPORT node_id | make_node_id (uri from) |
| Creates a node ID from the URI from .
|
|
CAF_CORE_EXPORT 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 .
|
|
CAF_CORE_EXPORT std::optional< node_id > | make_node_id (uint32_t process_id, std::string_view host_hash) |
| Creates a node ID from process_id and host_hash .
|
|
CAF_CORE_EXPORT error | parse (std::string_view str, node_id &dest) |
|
A node ID is an opaque value for representing CAF instances in the network.
◆ 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.
◆ make_node_id() [1/2]
CAF_CORE_EXPORT 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_id | System-wide unique process identifier. |
host_id | Unique hash value representing a single CAF node. |
◆ make_node_id() [2/2]
CAF_CORE_EXPORT std::optional< node_id > make_node_id |
( |
uint32_t |
process_id, |
|
|
std::string_view |
host_hash |
|
) |
| |
|
related |
Creates a node ID from process_id
and host_hash
.
- Parameters
-
process_id | System-wide unique process identifier. |
host_hash | Unique node ID as hexadecimal string representation. |
The documentation for this class was generated from the following files:
- libcaf_core/caf/node_id.hpp
- libcaf_core/caf/node_id.cpp