Skip to main content

StateTypeId Class

Declaration

class helios::engine::state::types::StateTypeId { ... }

Private Member Typedefs Index

usingStateType = helios_engine_common_tag_StateTypes

Friends Index

booloperator==

Public Constructors Index

StateTypeId (helios::core::types::no_init_t)

Constructs an uninitialized StateTypeId. More...

Private Constructors Index

StateTypeId (const size_t id)

Private constructor for internal use. 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 StateTypeIdid ()

Gets the StateTypeId for a specific component type. More...

Definition at line 14 of file StateTypeId.ixx.

Private Member Typedefs

StateType

using helios::engine::state::types::StateTypeId::StateType = helios_engine_common_tag_StateTypes

Definition at line 21 of file StateTypeId.ixx.

21 using StateType = helios_engine_common_tag_StateTypes;

Friends

operator==

friend bool StateTypeId, StateTypeId
constexpr noexcept default

Definition at line 69 of file StateTypeId.ixx.

Public Constructors

StateTypeId()

helios::engine::state::types::StateTypeId::StateTypeId (helios::core::types::no_init_t)
inline explicit

Constructs an uninitialized StateTypeId.

Parameters
<a href="/docs/helios/structs/helios/core/types/no-init-t">helios::core::types::no_init_t</a>

Tag to indicate no initialization.

Definition at line 42 of file StateTypeId.ixx.

Private Constructors

StateTypeId()

helios::engine::state::types::StateTypeId::StateTypeId (const size_t id)
inline explicit

Private constructor for internal use.

Parameters
id

The type ID value.

Definition at line 33 of file StateTypeId.ixx.

33 explicit StateTypeId(const size_t id) : id_(id) {}

Public Member Functions

value()

size_t helios::engine::state::types::StateTypeId::value ()
inline nodiscard noexcept

Returns the underlying ID value.

Returns

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

Definition at line 49 of file StateTypeId.ixx.

49 [[nodiscard]] size_t value() const noexcept {
50 return id_;
51 }

Private Member Attributes

id_

size_t helios::engine::state::types::StateTypeId::id_ {0}

The underlying ID value.

Definition at line 26 of file StateTypeId.ixx.

26 size_t id_{0};

Public Static Functions

id()

template <typename T>
StateTypeId helios::engine::state::types::StateTypeId::id ()
inline nodiscard static

Gets the StateTypeId for a specific component type.

Uses TypeIndexer to generate a unique, monotonically increasing ID for each component type. The ID is generated once per type and cached.

Template Parameters
T

The component type. Must be a concrete type (not abstract).

Returns

The unique StateTypeId for type T.

Definition at line 64 of file StateTypeId.ixx.

64 [[nodiscard]] static StateTypeId id() {
66 return StateTypeId(tid);
67 }

Reference helios::core::data::TypeIndexer< Group >::typeIndex.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.