1.3.64
 
Loading...
Searching...
No Matches
helios::PrimitiveUUID Struct Reference

Primitive UUID - sparse identifier from Helios Context. More...

#include <IndexTypes.h>

Public Member Functions

constexpr PrimitiveUUID (uint v)
 Explicit construction from uint.
 
 operator uint () const
 Explicit conversion to uint (prevents implicit array indexing)
 
constexpr bool operator== (const PrimitiveUUID &other) const
 Equality comparison.
 
constexpr bool operator!= (const PrimitiveUUID &other) const
 

Data Fields

uint value
 Raw UUID value from Helios Context.
 

Detailed Description

Primitive UUID - sparse identifier from Helios Context.

UUIDs are assigned by the Helios Context when primitives are created. They are persistent, unique identifiers but may be non-sequential (e.g., 10, 42, 100, 5).

Cannot be implicitly converted to size_t, preventing accidental use as array index. Must explicitly convert via UUIDPositionMapper.

// Correct usage:
PrimitiveUUID uuid{42};
ArrayPosition pos = mapper.toPosition(uuid);
float value = buffer[pos]; // pos converts implicitly to size_t
// Compile error:
float value = buffer[uuid]; // ERROR: PrimitiveUUID cannot convert to size_t

Definition at line 48 of file IndexTypes.h.

Constructor & Destructor Documentation

◆ PrimitiveUUID()

constexpr helios::PrimitiveUUID::PrimitiveUUID ( uint  v)
inlineexplicitconstexpr

Explicit construction from uint.

Definition at line 52 of file IndexTypes.h.

Member Function Documentation

◆ operator uint()

helios::PrimitiveUUID::operator uint ( ) const
inlineexplicit

Explicit conversion to uint (prevents implicit array indexing)

Definition at line 56 of file IndexTypes.h.

◆ operator!=()

constexpr bool helios::PrimitiveUUID::operator!= ( const PrimitiveUUID other) const
inlineconstexpr

Definition at line 64 of file IndexTypes.h.

◆ operator==()

constexpr bool helios::PrimitiveUUID::operator== ( const PrimitiveUUID other) const
inlineconstexpr

Equality comparison.

Definition at line 61 of file IndexTypes.h.

Field Documentation

◆ value

uint helios::PrimitiveUUID::value

Raw UUID value from Helios Context.

Definition at line 49 of file IndexTypes.h.


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