neuray API Programmer's Manual

mi::base::Uuid_t< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11> Template Class Reference

[Interface Framework Technology]

template< Uint32 id1, Uint16 id2, Uint16 id3, Uint8 id4, Uint8 id5, Uint8 id6, Uint8 id7, Uint8 id8, Uint8 id9, Uint8 id10, Uint8 id11>

class mi::base::Uuid_t< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11>

Description

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.

Public Member Functions

 operator const Uuid &() const
Conversion operator. More...

Static Public Variables

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.
static const Uint32 m_id1 = id1
First 32 bit out of four.
static const Uint32 m_id2 = static_cast<Uint32>( id2 | (id3 << 16))
Second 32 bit out of four.
static const Uint32 m_id3 = static_cast<Uint32>( id4 | (id5 << 8) | (id6 << 16) | (id7 << 24))
Third 32 bit out of four.
static const Uint32 m_id4 = static_cast<Uint32>( id8 | (id9 << 8) | (id10 << 16) | (id11 << 24))
Fourth 32 bit out of four.

Member Functions

mi::base::Uuid_t< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11>::operator const Uuid &() const [inline]

Conversion operator. The conversion to mi::base::Uuid initializes the UUID to (m_id1, m_id2, m_id3, m_id4).

Variables

const Uint32 mi::base::Uuid_t< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11>::hash32 = m_id1 ^ m_id2 ^ m_id3 ^ m_id4 [static]

A 32 bit hash value from a bitwise xor of all four 32 bit values.

const Uint32 mi::base::Uuid_t< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11>::m_id1 = id1 [static]

First 32 bit out of four.

const Uint32 mi::base::Uuid_t< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11>::m_id2 = static_cast<Uint32>( id2 | (id3 << 16)) [static]

Second 32 bit out of four.

const Uint32 mi::base::Uuid_t< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11>::m_id3 = static_cast<Uint32>( id4 | (id5 << 8) | (id6 << 16) | (id7 << 24)) [static]

Third 32 bit out of four.

const Uint32 mi::base::Uuid_t< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11>::m_id4 = static_cast<Uint32>( id8 | (id9 << 8) | (id10 << 16) | (id11 << 24)) [static]

Fourth 32 bit out of four.