Class template for a compile-time representation of universally unique identifiers (UUIDs or GUIDs). More...
#include <uuid.h>
Public Member Functions | |
operator const Uuid & () const | |
Conversion operator. More... | |
Static Public Attributes | |
static const Uint32 | m_id1 = id1 |
First 32 bit out of four. More... | |
static const Uint32 | m_id2 = static_cast<Uint32>( id2 | (id3 << 16)) |
Second 32 bit out of four. More... | |
static const Uint32 | m_id3 = static_cast<Uint32>( id4 | (id5 << 8) | (id6 << 16) | (id7 << 24)) |
Third 32 bit out of four. More... | |
static const Uint32 | m_id4 = static_cast<Uint32>( id8 | (id9 << 8) | (id10 << 16) | (id11 << 24)) |
Fourth 32 bit out of four. More... | |
static const Uint32 | hash32 = m_id1 ^ m_id2 ^ m_id3 ^ m_id4 |
A 32 bit hash value from a bitwise xor of all four 32 bit values. More... | |
Class template for a compile-time representation of universally unique identifiers (UUIDs or GUIDs).
The identifiers are represented as a sequence of four compile-time constants in the form of static
const
mi::Uint32 types.
This class provides an implicit conversion to mi::base::Uuid. It initializes the mi::base::Uuid value with the compile-time constants (m_id1
, m_id2
, m_id3
, m_id4
). Thus, a simple object instantiation of a class instance of this template can be passed as id along to functions expecting an mi::base::Uuid argument such as mi::base::IInterface::get_interface().
This class template provides also a static const hash32
value of type mi::Uint32, which can be used as compile-time constant expression value, for example, in switch case labels.
The template parameters represent the UUID as the commonly generated sequence of one 32 bit value, two 16 bit values, and eight 8 bit values. The uuidgen
system utility program creates UUIDs in a similar format.