8#include <boost/uuid/uuid.hpp>
11namespace Arp {
namespace System {
namespace Commons {
namespace Configuration
21 using BasicUuid = boost::uuids::uuid;
36 friend bool operator==(
const Uuid& lhs,
const Uuid& rhs)
noexcept;
37 friend bool operator!=(
const Uuid& lhs,
const Uuid& rhs)
noexcept;
38 friend bool operator<(
const Uuid& lhs,
const Uuid& rhs)
noexcept;
39 friend bool operator>(
const Uuid& lhs,
const Uuid& rhs)
noexcept;
40 friend bool operator<=(
const Uuid& lhs,
const Uuid& rhs)
noexcept;
41 friend bool operator>=(
const Uuid& lhs,
const Uuid& rhs)
noexcept;
44 friend std::ostream& operator<<(std::ostream& os,
const Uuid&
id);
45 friend std::istream& operator>>(std::istream& is,
Uuid&
id);
115 return basicId.is_nil();
119inline bool operator==(
const Uuid& lhs,
const Uuid& rhs)
noexcept
121 return lhs.basicId == rhs.basicId;
124inline bool operator!=(
const Uuid& lhs,
const Uuid& rhs)
noexcept
126 return lhs.basicId != rhs.basicId;
129inline bool operator<(
const Uuid& lhs,
const Uuid& rhs)
noexcept
131 return lhs.basicId < rhs.basicId;
134inline bool operator>(
const Uuid& lhs,
const Uuid& rhs)
noexcept
136 return lhs.basicId > rhs.basicId;
139inline bool operator<=(
const Uuid& lhs,
const Uuid& rhs)
noexcept
141 return lhs.basicId <= rhs.basicId;
144inline bool operator>=(
const Uuid& lhs,
const Uuid& rhs)
noexcept
146 return lhs.basicId >= rhs.basicId;
158struct hash<
Arp::System::Commons::Configuration::Uuid>
162 typedef size_t result_type;
This is a small immutable wrapper around the boost::uuids::uuid class and represents a universal uniq...
Definition: Uuid.hpp:19
static Uuid Empty(void)
Returns an empty (zero'ed) Uuid instance.
static Uuid CreateNew(void)
Creates a new unique id.
static Uuid Create(const byte *pBuffer)
Creates a unique id from the as argument passed binary representation in big endian.
static Uuid CreateFromLittleEndian(const byte *pBuffer)
Creates a unique id from the as argument passed binary representation in little endian.
void Clear(void)
Cleas this instance to an empty/zero'ed uuid.
size_t GetHashValue(void) const
Gets the hash value for this uuid.
~Uuid(void)=default
Destructs this instance and frees all resources.
Uuid(const Uuid &arg)=default
Copy constructor.
Uuid & operator=(const Uuid &arg)=default
Assignment operator.
static Uuid Parse(const String &input)
Creates a new unique id from the given input string.
void CopyLittleEndianTo(byte *pBuffer) const
Copies the binary representation to the given buffer in little endian.
Uuid(void)
Constructs an empty (zero'ed) Uuid instance.
static bool TryParse(const String &input, Uuid &result)
Creates a new unique id.
bool IsEmpty(void) const
Checks if this uuid is emtpy (zero'ed).
Definition: Uuid.hpp:113
Uuid(Uuid &&arg)=default
Move constructor.
String ToString(void) const
Creates a string representation of this uuid.
void CopyTo(byte *pBuffer) const
Copies the binary representation to the given buffer in big endian.
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API
Namespace of the C++ standard library