Robot Raconteur Core C++ Library
Toggle main menu visibility
Loading...
Searching...
No Matches
RobotRaconteurCore
include
RobotRaconteur
NodeID.h
Go to the documentation of this file.
1
23
24
#pragma once
25
26
#include "
RobotRaconteur/RobotRaconteurConstants.h
"
27
#include "
RobotRaconteur/DataTypes.h
"
28
#include <boost/array.hpp>
29
#include <boost/uuid/uuid.hpp>
30
31
namespace
RobotRaconteur
32
{
33
57
class
ROBOTRACONTEUR_CORE_API
NodeID
:
virtual
public
RRObject
58
{
59
private
:
60
boost::uuids::uuid id;
61
62
public
:
67
NodeID
();
68
74
NodeID
(boost::array<uint8_t, 16>
id
);
75
81
NodeID
(boost::uuids::uuid
id
);
82
88
NodeID
(
const
NodeID
&
id
);
89
95
NodeID
(boost::string_ref
id
);
96
102
const
boost::array<uint8_t, 16>
ToByteArray
()
const
;
103
104
const
boost::uuids::uuid ToUuid()
const
;
105
115
virtual
std::string
ToString
()
const
;
116
139
virtual
std::string
ToString
(boost::string_ref format)
const
;
140
148
static
NodeID
NewUniqueID
();
149
151
bool
operator==
(
const
NodeID
& id2)
const
;
152
154
bool
operator!=
(
const
NodeID
& id2)
const
;
155
157
bool
operator<(
const
NodeID
& id2)
const
;
158
160
NodeID
&
operator=
(
const
NodeID
&
id
);
161
170
bool
IsAnyNode
()
const
;
171
177
static
NodeID
GetAny
();
178
180
virtual
int32_t GetHashCode()
const
;
181
182
RR_OVIRTUAL std::string
RRType
() RR_OVERRIDE {
return
"RobotRaconteur::NodeID"
; }
183
184
private
:
185
void
init_from_string(
const
boost::string_ref&
id
);
186
};
187
188
size_t
hash(
const
NodeID& nodeid);
189
190
}
// namespace RobotRaconteur
DataTypes.h
RobotRaconteurConstants.h
RobotRaconteur::NodeID::ToByteArray
const boost::array< uint8_t, 16 > ToByteArray() const
Convert the NodeID UUID to bytes.
RobotRaconteur::NodeID::GetAny
static NodeID GetAny()
Get the "any" NodeId.
RobotRaconteur::NodeID::operator==
bool operator==(const NodeID &id2) const
Test if NodeID is equal.
RobotRaconteur::NodeID::operator=
NodeID & operator=(const NodeID &id)
Assignment operator.
RobotRaconteur::NodeID::NodeID
NodeID(boost::uuids::uuid id)
Construct a new NodeID with the specified boost::uuids::uuid.
RobotRaconteur::NodeID::NodeID
NodeID(boost::array< uint8_t, 16 > id)
Construct a new NodeID with the specified UUID bytes.
RobotRaconteur::NodeID::ToString
virtual std::string ToString(boost::string_ref format) const
Convert the NodeID UUID to specified format.
RobotRaconteur::NodeID::NodeID
NodeID(boost::string_ref id)
Construct a new NodeID parsing a string UUID.
RobotRaconteur::NodeID::IsAnyNode
bool IsAnyNode() const
Is the NodeID UUID all zeros.
RobotRaconteur::NodeID::ToString
virtual std::string ToString() const
Convert the NodeID UUID to string with "B" format.
RobotRaconteur::NodeID::operator!=
bool operator!=(const NodeID &id2) const
Test if NodeID is not equal.
RobotRaconteur::NodeID::NodeID
NodeID()
Construct a new NodeID with "any" node UUID.
RobotRaconteur::NodeID::NewUniqueID
static NodeID NewUniqueID()
Generate a new random NodeID UUID.
RobotRaconteur::NodeID::NodeID
NodeID(const NodeID &id)
Copy construct a new NodeID.
RobotRaconteur::NodeID::RRType
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
Generated by
1.17.0