Sunshine0.0.5917
Sunshine 0.0.5917
Self-hosted game stream host for Moonlight.
Loading...
Searching...
No Matches
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 UUID bytes and apply the established version and variant masks.

Public Attributes

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

Detailed Description

UUID value exposed through multiple integer views.

Member Function Documentation

◆ generate() [1/2]

uuid_t uuid_util::uuid_t::generate ( )
inlinestatic

Generate a UUID value.

Returns
Random UUID generated from std::random_device seeding.

◆ generate() [2/2]

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

Generate UUID bytes and apply the established version and variant masks.

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: