Skip to main content

ManagerTypeId Class

Unique type identifier for engine resources. More...

Declaration

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

Private Member Typedefs Index

usingResourceType = helios_engine_common_tag_ResourceTypes

Friends Index

constexpr booloperator==

Public Constructors Index

ManagerTypeId (const size_t id)

Constructs a ManagerTypeId with a specific value. More...

ManagerTypeId (helios::ecs::types::no_init_t)

Constructs an uninitialized ManagerTypeId. 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 ManagerTypeIdid ()

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

Description

Unique type identifier for engine resources.

ManagerTypeId assigns a unique, monotonically increasing integer ID to each resource type at compile time. Used by ResourceRegistry as an index into the fastAccess_ array for O(1) type-based resource lookup.

All resource categories (Managers, CommandBuffers, CommandHandlers) share a single index space.

See Also

ResourceRegistry

See Also

TypeIndexer

See Also

ComponentTypeId

See Also

CommandTypeId

Definition at line 33 of file ManagerTypeId.ixx.

Private Member Typedefs

ResourceType

using helios::engine::runtime::world::types::ManagerTypeId::ResourceType = helios_engine_common_tag_ResourceTypes

Definition at line 40 of file ManagerTypeId.ixx.

40 using ResourceType = helios_engine_common_tag_ResourceTypes;

Friends

operator==

friend constexpr bool ManagerTypeId, ManagerTypeId
constexpr noexcept default

Definition at line 93 of file ManagerTypeId.ixx.

Public Constructors

ManagerTypeId()

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

Constructs a ManagerTypeId with a specific value.

Parameters
id

The type ID value.

Definition at line 56 of file ManagerTypeId.ixx.

56 explicit ManagerTypeId(const size_t id) : id_(id) {}

ManagerTypeId()

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

Constructs an uninitialized ManagerTypeId.

Parameters
no_init_t

Tag to indicate no initialization.

Definition at line 64 of file ManagerTypeId.ixx.

64 explicit ManagerTypeId(helios::ecs::types::no_init_t) {}

Public Member Functions

value()

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

Returns the underlying ID value.

Returns

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

Definition at line 72 of file ManagerTypeId.ixx.

73 return id_;
74 }

Private Member Attributes

id_

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

The underlying ID value.

Definition at line 45 of file ManagerTypeId.ixx.

45 size_t id_{0};

Public Static Functions

id()

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

Returns the ManagerTypeId 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 ManagerTypeId for type T.

Definition at line 88 of file ManagerTypeId.ixx.

88 [[nodiscard]] static ManagerTypeId id() {
89 static const size_t tid = helios::ecs::TypeIndexer<ResourceType>::typeIndex<T>();
90 return ManagerTypeId(tid);
91 }

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.