28 #include <boost/array.hpp>
29 #include <boost/uuid/uuid.hpp>
31 namespace RobotRaconteur
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);
188 size_t hash(
const NodeID& nodeid);
NodeID UUID storage and generation.
Definition: NodeID.h:58
static NodeID GetAny()
Get the "any" NodeId.
bool operator==(const NodeID &id2) const
Test if NodeID is equal.
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.
const boost::array< uint8_t, 16 > ToByteArray() const
Convert the NodeID UUID to bytes.
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 & operator=(const NodeID &id)
Assignment operator.
NodeID(const NodeID &id)
Copy construct a new NodeID.
Base class for all Robot Raconteur objects.
Definition: DataTypes.h:227