Sunshine master
Self-hosted game stream host for Moonlight.
uuid_util::uuid_t Union Reference

UUID value exposed through multiple integer views. More...

#include <src/uuid.h>

Public Member Functions

constexpr bool operator< (const uuid_t &other) const
 Order UUID values by their 64-bit word representation.
 
constexpr bool operator== (const uuid_t &other) const
 Compare two UUID values for equality.
 
constexpr bool operator> (const uuid_t &other) const
 Order UUID values by their 64-bit word representation.
 
std::string string () const
 Format the UUID using canonical text form.
 

Static Public Member Functions

static uuid_t generate ()
 Generate a UUID value.
 
static uuid_t generate (std::default_random_engine &engine)
 Generate a UUID value.
 

Public Attributes

std::uint16_t b16 [8]
 UUID viewed as 16-bit words.
 
std::uint32_t b32 [4]
 UUID viewed as 32-bit words.
 
std::uint64_t b64 [2]
 UUID viewed as 64-bit words.
 
std::uint8_t b8 [16]
 UUID bytes.
 

Detailed Description

UUID value exposed through multiple integer views.

Member Function Documentation

◆ generate() [1/2]

static uuid_t uuid_util::uuid_t::generate ( )
inlinestatic

Generate a UUID value.

Returns
Random UUID generated from std::random_device seeding.

◆ generate() [2/2]

static uuid_t uuid_util::uuid_t::generate ( std::default_random_engine & engine)
inlinestatic

Generate a UUID value.

Parameters
engineRandom-number engine used to generate UUID bytes.
Returns
Random UUID generated from the supplied engine.

◆ operator<()

bool uuid_util::uuid_t::operator< ( const uuid_t & other) const
inlineconstexpr

Order UUID values by their 64-bit word representation.

Parameters
otherUUID value to compare against.
Returns
True when this UUID sorts before other.

◆ operator==()

bool uuid_util::uuid_t::operator== ( const uuid_t & other) const
inlineconstexpr

Compare two UUID values for equality.

Parameters
otherUUID value to compare against.
Returns
True when both UUID values contain identical bytes.

◆ operator>()

bool uuid_util::uuid_t::operator> ( const uuid_t & other) const
inlineconstexpr

Order UUID values by their 64-bit word representation.

Parameters
otherUUID value to compare against.
Returns
True when this UUID sorts after other.

◆ string()

std::string uuid_util::uuid_t::string ( ) const
inlinenodiscard

Format the UUID using canonical text form.

Returns
Canonical lowercase UUID string.

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