13 #ifndef __PROCESS_PID_HPP__ 14 #define __PROCESS_PID_HPP__ 21 #include <boost/functional/hash.hpp> 53 UPID(
const std::string& id_,
const net::IP& ip_, uint16_t port_)
61 UPID(
const std::string& s);
69 operator std::string()
const;
97 return !(*
this == that);
118 ID(
const std::string& s)
119 :
id(
std::make_shared<
std::string>(s)) {}
122 :
id(
std::make_shared<
std::string>(
std::move(s))) {}
126 id = std::make_shared<std::string>(std::move(that));
133 return EMPTY == that;
141 return EMPTY == that;
148 return !(*
this == that);
159 operator const std::string&()
const 168 std::shared_ptr<std::string>
id;
221 const std::string& s = id;
240 return (
const std::string&)
id + s;
246 return (
const std::string&)
id + std::move(s);
252 return s + (
const std::string&)
id;
258 return std::move(s) + (
const std::string&)
id;
288 template <
typename T = ProcessBase>
292 template <
typename U>
300 template <
typename Base>
335 boost::hash_combine(seed, (
const std::string&) upid.
id);
344 #endif // __PROCESS_PID_HPP__ static Address ANY_ANY()
Definition: address.hpp:164
ID & operator=(std::string &&that)
Definition: pid.hpp:124
std::ostream & operator<<(std::ostream &stream, const Future< T > &future)
Definition: future.hpp:1826
UPID & operator=(const UPID &that)=default
PID(const T &t)
Definition: pid.hpp:298
ID(std::string &&s)
Definition: pid.hpp:121
bool operator!=(const UPID &that) const
Definition: pid.hpp:95
network::inet::Address address
Definition: pid.hpp:177
static const std::string EMPTY
Definition: pid.hpp:114
ID(const std::string &s)
Definition: pid.hpp:118
bool isAny() const
Definition: ip.hpp:157
Definition: type_utils.hpp:619
Definition: process.hpp:72
bool operator<(const std::string &that) const
Definition: pid.hpp:151
UPID(const char *id_, const net::IP &ip_, uint16_t port_)
Definition: pid.hpp:47
struct process::UPID::@5 addresses
UPID(const char *id_, const network::inet::Address &address_)
Definition: pid.hpp:50
bool operator<(const UPID &that) const
Definition: pid.hpp:81
bool operator!=(const std::string &that) const
Definition: pid.hpp:146
An "untyped" PID, used to encapsulate the process ID for lower-layer abstractions (eg...
Definition: pid.hpp:39
result_type operator()(const argument_type &upid) const
Definition: pid.hpp:332
Option< network::inet6::Address > v6
Definition: pid.hpp:193
bool operator==(const UPID &that) const
Definition: pid.hpp:90
uint16_t port
Definition: address.hpp:141
Option< std::weak_ptr< ProcessBase * > > reference
Definition: pid.hpp:215
Definition: address.hpp:52
std::string operator+(const UPID::ID &id, const std::string &s)
Definition: pid.hpp:238
friend class ProcessManager
Definition: pid.hpp:208
A "process identifier" used to uniquely identify a process when dispatching messages.
Definition: pid.hpp:289
Definition: executor.hpp:48
bool operator!() const
Definition: pid.hpp:76
UPID(const std::string &id_, const network::inet::Address &address_)
Definition: pid.hpp:56
PID(const T *t)
Definition: pid.hpp:297
bool operator==(const std::string &that) const
Definition: pid.hpp:130
bool operator==(const char *that) const
Definition: pid.hpp:138
Option< std::string > host
Definition: pid.hpp:204
UPID(const std::string &id_, const net::IP &ip_, uint16_t port_)
Definition: pid.hpp:53
struct process::UPID::ID id
std::istream & operator>>(std::istream &, UPID &)
net::IP ip
Definition: address.hpp:140
process::UPID argument_type
Definition: pid.hpp:330
PID()
Definition: pid.hpp:295
size_t result_type
Definition: pid.hpp:328