Sirikata
|
Identifier for an ODP port. More...
#include <Defs.hpp>
Classes | |
class | Hasher |
Public Member Functions | |
PortID () | |
PortID (uint32 rhs) | |
PortID (const PortID &rhs) | |
PortID & | operator= (const PortID &rhs) |
PortID & | operator= (uint32 rhs) |
operator uint32 () const | |
bool | operator== (const PortID &rhs) const |
bool | operator!= (const PortID &rhs) const |
bool | operator> (const PortID &rhs) const |
bool | operator>= (const PortID &rhs) const |
bool | operator< (const PortID &rhs) const |
bool | operator<= (const PortID &rhs) const |
PortID & | operator++ () |
PortID | operator++ (int) |
bool | matches (const PortID &rhs) const |
Returns true if the ports match, i.e. | |
Static Public Member Functions | |
static const PortID & | null () |
Get a null PortID. | |
static const PortID & | any () |
Get a PortID that matches any other PortID. | |
Private Attributes | |
uint32 | mValue |
Identifier for an ODP port.
Under the hood this is simply a uint32, but this class provides additional features: null and any values, matching (which differs from equality), etc. Because the format of PortID is fixed to uint32, the raw value is exposed directly -- a PortID can be be cast directly to a uint32.
Sirikata::XDP::PortID::PortID | ( | ) |
Referenced by operator++().
Sirikata::XDP::PortID::PortID | ( | uint32 | rhs | ) |
Sirikata::XDP::PortID::PortID | ( | const PortID & | rhs | ) |
const PortID & Sirikata::XDP::PortID::any | ( | ) | [static] |
Get a PortID that matches any other PortID.
References ANY_PORT_ID.
Referenced by Sirikata::OHDP::Endpoint::any(), Sirikata::ODP::Endpoint::any(), and Sirikata::XDP::DelegatePort< EndpointType, DelegateServiceType, PortType >::deliver().
bool Sirikata::XDP::PortID::matches | ( | const PortID & | rhs | ) | const |
Returns true if the ports match, i.e.
if they are equal or one of them is any().
References ANY_PORT_ID, and mValue.
Referenced by Sirikata::XDP::Endpoint< NodeID >::matches().
const PortID & Sirikata::XDP::PortID::null | ( | ) | [static] |
Get a null PortID.
Equivalent to PortID(0).
References NULL_PORT_ID.
Referenced by Sirikata::ODP::DelegateService::bindODPPort(), Sirikata::OHDP::DelegateService::bindOHDPPort(), Sirikata::OHDP::Endpoint::null(), Sirikata::ODP::Endpoint::null(), Sirikata::ODP::DelegateService::unusedODPPort(), Sirikata::ObjectHost::unusedOHDPPort(), and Sirikata::OHDP::DelegateService::unusedOHDPPort().
Sirikata::XDP::PortID::operator uint32 | ( | ) | const |
References mValue.
uint32 Sirikata::XDP::PortID::mValue [private] |