libCZI
Reading and Writing CZI documents made easy
Loading...
Searching...
No Matches
libCZI::GUID Struct Reference

Represents a globally unique identifier (GUID) consisting of four unsigned 32-bit integers. More...

#include <libCZI_Utilities.h>

Public Member Functions

bool operator== (const GUID &other) const
 Provide an equality comparison operator between GUID objects.
 
bool operator!= (const GUID &other) const
 Provide an inequality comparison operator between GUID objects.
 
int compare (const GUID &other) const
 Provide a method to lexically compare two GUID objects.
 

Public Attributes

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.
 

Detailed Description

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.

Member Function Documentation

◆ compare()

int libCZI::GUID::compare ( const GUID other) const
inline

Provide a method to lexically compare two GUID objects.

Parameters
otherThe 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.

◆ operator!=()

bool libCZI::GUID::operator!= ( const GUID other) const
inline

Provide an inequality comparison operator between GUID objects.

Parameters
otherThe GUID object to compare with.
Returns
True if the GUID objects are different, otherwise false.

◆ operator==()

bool libCZI::GUID::operator== ( const GUID other) const
inline

Provide an equality comparison operator between GUID objects.

Parameters
otherThe GUID object to compare with.
Returns
True if the GUID objects are equal, otherwise false.

The documentation for this struct was generated from the following file: