28#include <boost/array.hpp>
29#include <boost/uuid/uuid.hpp>
31namespace RobotRaconteur
57class ROBOTRACONTEUR_CORE_API
NodeID :
virtual public RRObject
60 boost::uuids::uuid id;
74 NodeID(boost::array<uint8_t, 16>
id);
104 const boost::uuids::uuid ToUuid()
const;
139 virtual std::string
ToString(boost::string_ref format)
const;
157 bool operator<(
const NodeID& id2)
const;
180 virtual int32_t GetHashCode()
const;
182 RR_OVIRTUAL std::string
RRType() RR_OVERRIDE {
return "RobotRaconteur::NodeID"; }
185 void init_from_string(
const boost::string_ref&
id);
188size_t hash(
const NodeID& nodeid);
const boost::array< uint8_t, 16 > ToByteArray() const
Convert the NodeID UUID to bytes.
static NodeID GetAny()
Get the "any" NodeId.
bool operator==(const NodeID &id2) const
Test if NodeID is equal.
NodeID & operator=(const NodeID &id)
Assignment operator.
NodeID(boost::uuids::uuid id)
Construct a new NodeID with the specified boost::uuids::uuid.
NodeID(boost::array< uint8_t, 16 > id)
Construct a new NodeID with the specified UUID bytes.
virtual std::string ToString(boost::string_ref format) const
Convert the NodeID UUID to specified format.
NodeID(boost::string_ref id)
Construct a new NodeID parsing a string UUID.
bool IsAnyNode() const
Is the NodeID UUID all zeros.
virtual std::string ToString() const
Convert the NodeID UUID to string with "B" format.
bool operator!=(const NodeID &id2) const
Test if NodeID is not equal.
NodeID()
Construct a new NodeID with "any" node UUID.
static NodeID NewUniqueID()
Generate a new random NodeID UUID.
NodeID(const NodeID &id)
Copy construct a new NodeID.
RR_OVIRTUAL std::string RRType() RR_OVERRIDE
Gets the type of the object as a string. This string is in C++ format, using two colons to separate n...
Definition NodeID.h:182