Skip to main content

SystemTypeId Class

Unique type identifier for system types. More...

Declaration

class helios::engine::runtime::world::types::SystemTypeId { ... }

Private Member Typedefs Index

usingSystemType = helios_engine_common_tag_SystemTypes

Friends Index

booloperator==

Public Constructors Index

SystemTypeId (const size_t id)

Constructs a SystemTypeId with a specific value. More...

SystemTypeId (helios::core::types::no_init_t)

Constructs an uninitialized SystemTypeId. More...

Public Member Functions Index

size_tvalue () const noexcept

Returns the underlying ID value. More...

Private Member Attributes Index

size_tid_ {0}

The underlying ID value. More...

Public Static Functions Index

template <typename T>
static SystemTypeIdid ()

Returns the SystemTypeId for a specific type. More...

Description

Unique type identifier for system types.

SystemTypeId assigns a unique, monotonically increasing integer ID to each system type at compile time. Used by SystemRegistry as an index for O(1) type-based system lookup.

See Also

SystemRegistry

See Also

TypeIndexer

See Also

ResourceTypeId

Definition at line 27 of file SystemTypeId.ixx.

Private Member Typedefs

SystemType

using helios::engine::runtime::world::types::SystemTypeId::SystemType = helios_engine_common_tag_SystemTypes

Definition at line 34 of file SystemTypeId.ixx.

34 using SystemType = helios_engine_common_tag_SystemTypes;

Friends

operator==

friend bool SystemTypeId, SystemTypeId
constexpr noexcept default

Definition at line 87 of file SystemTypeId.ixx.

Reference SystemTypeId.

Public Constructors

SystemTypeId()

helios::engine::runtime::world::types::SystemTypeId::SystemTypeId (const size_t id)
inline explicit

Constructs a SystemTypeId with a specific value.

Parameters
id

The type ID value.

Definition at line 50 of file SystemTypeId.ixx.

50 explicit SystemTypeId(const size_t id) : id_(id) {}

Reference id.

Referenced by id and operator==.

SystemTypeId()

helios::engine::runtime::world::types::SystemTypeId::SystemTypeId (helios::core::types::no_init_t)
inline explicit

Constructs an uninitialized SystemTypeId.

Parameters
no_init_t

Tag to indicate no initialization.

Definition at line 58 of file SystemTypeId.ixx.

Public Member Functions

value()

size_t helios::engine::runtime::world::types::SystemTypeId::value ()
inline nodiscard noexcept

Returns the underlying ID value.

Returns

The numeric type ID, suitable for use as an array index.

Definition at line 66 of file SystemTypeId.ixx.

66 [[nodiscard]] size_t value() const noexcept {
67 return id_;
68 }

Private Member Attributes

id_

size_t helios::engine::runtime::world::types::SystemTypeId::id_ {0}

The underlying ID value.

Definition at line 39 of file SystemTypeId.ixx.

39 size_t id_{0};

Public Static Functions

id()

template <typename T>
SystemTypeId helios::engine::runtime::world::types::SystemTypeId::id ()
inline nodiscard static

Returns the SystemTypeId for a specific type.

Uses TypeIndexer to generate a unique ID per type. The ID is generated once and cached.

Template Parameters
T

The resource type.

Returns

The unique SystemTypeId for type T.

Definition at line 82 of file SystemTypeId.ixx.

82 [[nodiscard]] static SystemTypeId id() {
84 return SystemTypeId(tid);
85 }

References SystemTypeId and helios::core::data::TypeIndexer< Group >::typeIndex.

Referenced by SystemTypeId.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.