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

constexpr booloperator==

Public Constructors Index

SystemTypeId (const size_t id)

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

SystemTypeId (helios::ecs::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 28 of file SystemTypeId.ixx.

Private Member Typedefs

SystemType

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

Definition at line 35 of file SystemTypeId.ixx.

35 using SystemType = helios_engine_common_tag_SystemTypes;

Friends

operator==

friend constexpr bool SystemTypeId, SystemTypeId
constexpr noexcept default

Definition at line 88 of file SystemTypeId.ixx.

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 51 of file SystemTypeId.ixx.

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

SystemTypeId()

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

Constructs an uninitialized SystemTypeId.

Parameters
no_init_t

Tag to indicate no initialization.

Definition at line 59 of file SystemTypeId.ixx.

59 explicit SystemTypeId(helios::ecs::types::no_init_t) {}

Public Member Functions

value()

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

Returns the underlying ID value.

Returns

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

Definition at line 67 of file SystemTypeId.ixx.

68 return id_;
69 }

Private Member Attributes

id_

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

The underlying ID value.

Definition at line 40 of file SystemTypeId.ixx.

40 size_t id_{0};

Public Static Functions

id()

template <typename T>
SystemTypeId helios::engine::runtime::world::types::SystemTypeId::id ()
inline 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 83 of file SystemTypeId.ixx.

83 [[nodiscard]] static SystemTypeId id() {
84 static const size_t tid = helios::ecs::TypeIndexer<SystemType>::typeIndex<T>();
85 return SystemTypeId(tid);
86 }

Reference helios::engine::runtime::registerComponents.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.