32 return (
m_UUID == std::array<Byte, 16>{{0}});
57 std::array<Byte, 16>
ToRaw()
const;
60 void FromRaw(
const std::array<Byte, 16> & a_Raw);
72 return (a_Lhs.
Compare(a_Rhs) == 0);
77 return (a_Lhs.
Compare(a_Rhs) != 0);
82 return (a_Lhs.
Compare(a_Rhs) < 0);
87 return (a_Lhs.
Compare(a_Rhs) <= 0);
92 return (a_Lhs.
Compare(a_Rhs) > 0);
97 return (a_Lhs.
Compare(a_Rhs) >= 0);
bool operator<(const cUUID &a_Lhs, const cUUID &a_Rhs)
bool operator>(const cUUID &a_Lhs, const cUUID &a_Rhs)
bool operator>=(const cUUID &a_Lhs, const cUUID &a_Rhs)
bool operator!=(const cUUID &a_Lhs, const cUUID &a_Rhs)
bool operator<=(const cUUID &a_Lhs, const cUUID &a_Rhs)
bool operator==(const cUUID &a_Lhs, const cUUID &a_Rhs)
int Compare(const cUUID &a_Other) const
Lexicographically compare bytes with another UUID.
AString ToShortString() const
Converts the UUID to a short form string (i.e without dashes).
bool FromString(const AString &a_StringUUID)
Tries to interpret the string as a short or long form UUID and assign from it.
static cUUID GenerateVersion3(const AString &a_Name)
Generates a version 3, variant 1 UUID based on the md5 hash of a_Name.
bool IsNil() const
Returns true if this contains the "nil" UUID with all bits set to 0.
std::array< Byte, 16 > m_UUID
Binary UUID stored big-endian.
UInt8 Variant() const
Returns the variant number of the UUID.
UInt8 Version() const
Returns the version number of the UUID.
cUUID()
Default constructed "nil" UUID.
AString ToLongString() const
Converts the UUID to a long form string (i.e.
void FromRaw(const std::array< Byte, 16 > &a_Raw)
Assigns from raw memory representation, respecting UUID variant.
std::array< Byte, 16 > ToRaw() const
Converts UUID to raw memory representation, respecting UUID variant.