Apache Mesos
Public Member Functions | Friends | List of all members
process::PID< T > Struct Template Reference

A "process identifier" used to uniquely identify a process when dispatching messages. More...

#include <pid.hpp>

Inheritance diagram for process::PID< T >:
process::UPID

Public Member Functions

 PID ()
 
 PID (const T *t)
 
 PID (const T &t)
 
template<typename Base >
 operator PID< Base > () const
 
- Public Member Functions inherited from process::UPID
 UPID ()=default
 
 UPID (const UPID &that)=default
 
 UPID (UPID &&that)=default
 
 UPID (const char *id_, const net::IP &ip_, uint16_t port_)
 
 UPID (const char *id_, const network::inet::Address &address_)
 
 UPID (const std::string &id_, const net::IP &ip_, uint16_t port_)
 
 UPID (const std::string &id_, const network::inet::Address &address_)
 
 UPID (const char *s)
 
 UPID (const std::string &s)
 
 UPID (const ProcessBase &process)
 
UPIDoperator= (const UPID &that)=default
 
UPIDoperator= (UPID &&that)=default
 
 operator std::string () const
 
 operator bool () const
 
bool operator! () const
 
bool operator< (const UPID &that) const
 
bool operator== (const UPID &that) const
 
bool operator!= (const UPID &that) const
 
void resolve ()
 

Friends

template<typename U >
struct PID
 

Additional Inherited Members

- Public Attributes inherited from process::UPID
struct process::UPID::ID id
 
network::inet::Address address = network::inet4::Address::ANY_ANY()
 
struct {
   Option< network::inet6::Address >   v6
 
addresses = {None()}
 
Option< std::string > host
 
- Protected Attributes inherited from process::UPID
Option< std::weak_ptr< ProcessBase * > > reference = None()
 

Detailed Description

template<typename T = ProcessBase>
struct process::PID< T >

A "process identifier" used to uniquely identify a process when dispatching messages.

Typed with the actual process class's type, which must be derived from process::ProcessBase.

Use it like this:

using namespace process;

class SimpleProcess : public Process<SimpleProcess> { // ... };

SimpleProcess process; PID<SimpleProcess> pid = spawn(process);

// ...

dispatchpid, &SimpleProcess::method, "argument");

See also
process::ProcessBase

Constructor & Destructor Documentation

template<typename T = ProcessBase>
process::PID< T >::PID ( )
inline
template<typename T = ProcessBase>
process::PID< T >::PID ( const T *  t)
inline
template<typename T = ProcessBase>
process::PID< T >::PID ( const T &  t)
inline

Member Function Documentation

template<typename T = ProcessBase>
template<typename Base >
process::PID< T >::operator PID< Base > ( ) const
inline

Friends And Related Function Documentation

template<typename T = ProcessBase>
template<typename U >
friend struct PID
friend

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