XII Release 0.1.0
Loading...
Searching...
No Matches
xiiUuid Class Reference

This data type is the abstraction for 128-bit Uuid (also known as GUID) instances. More...

#include <Uuid.h>

Public Member Functions

 XII_DECLARE_POD_TYPE ()
 
XII_ALWAYS_INLINE xiiUuid ()=default
 Default constructor. Constructed Uuid will be invalid.
 
XII_ALWAYS_INLINE constexpr xiiUuid (xiiUInt64 uiLow, xiiUInt64 uiHigh)
 Constructs the Uuid from existing values.
 
XII_ALWAYS_INLINE bool operator== (const xiiUuid &other) const
 Comparison operator. [tested].
 
XII_ALWAYS_INLINE bool operator< (const xiiUuid &other) const
 Comparison operator.
 
XII_ALWAYS_INLINE bool IsValid () const
 Returns true if this is a valid Uuid.
 
void GetValues (xiiUInt64 &ref_uiLow, xiiUInt64 &ref_uiHigh) const
 Returns the internal 128 Bit of data.
 
XII_ALWAYS_INLINE void CombineWithSeed (const xiiUuid &seed)
 Adds the given seed value to this guid, creating a new guid. The process is reversible.
 
XII_ALWAYS_INLINE void RevertCombinationWithSeed (const xiiUuid &seed)
 Subtracts the given seed from this guid, restoring the original guid.
 
XII_ALWAYS_INLINE void HashCombine (const xiiUuid &hash)
 Combines two guids using hashing, irreversible and order dependent.
 

Static Public Member Functions

static XII_ALWAYS_INLINE xiiUuid MakeInvalid ()
 Returns an invalid UUID.
 
static xiiUuid MakeUuid ()
 Returns a new Uuid.
 
static xiiUuid MakeStableUuidFromString (xiiStringView sString)
 Creates a uuid from a string. The result is always the same for the same string.
 
static xiiUuid MakeStableUuidFromInt (xiiInt64 iInt)
 Creates a uuid from an integer. The result is always the same for the same input.
 

Friends

XII_FOUNDATION_DLL_FRIEND void operator>> (xiiStreamReader &ref_stream, xiiUuid &ref_value)
 Operator to serialize xiiUuid objects. [tested].
 
XII_FOUNDATION_DLL_FRIEND void operator<< (xiiStreamWriter &ref_stream, const xiiUuid &value)
 Operator to serialize xiiUuid objects. [tested].
 

Detailed Description

This data type is the abstraction for 128-bit Uuid (also known as GUID) instances.


The documentation for this class was generated from the following files: