Represents a globally unique identifier (GUID) consisting of four unsigned 32-bit integers.
The GUID is represented as a struct with 4 Data fields of different sizes, allowing it to be packed more tightly than a 16-byte array. This implementation is compatible with the Microsoft GUID definition, but it is not necessarily byte-swappable with it.
Public Functions
-
inline bool operator==(const GUID &other) const
Provide an equality comparison operator between GUID objects.
- Parameters:
other – The GUID object to compare with.
- Returns:
True if the GUID objects are equal, otherwise false.
-
inline bool operator!=(const GUID &other) const
Provide an inequality comparison operator between GUID objects.
- Parameters:
other – The GUID object to compare with.
- Returns:
True if the GUID objects are different, otherwise false.
-
inline int compare(const GUID &other) const
Provide a method to lexically compare two GUID objects.
- Parameters:
other – The GUID object to compare with.
- Returns:
An integer less than, equal to, or greater than 0 if this GUID is less than, equal to, or greater than the other GUID.
Public Members
-
std::uint32_t Data1
The first component of the GUID.
-
std::uint16_t Data2
The second component of the GUID.
-
std::uint16_t Data3
The third component of the GUID.
-
std::uint8_t Data4[8]
The fourth component of the GUID, represented as an array of 8 bytes.