ResourceTypeId Class
Unique type identifier for engine resources. More...
Declaration
Private Member Typedefs Index
| using | ResourceType = helios_engine_common_tag_ResourceTypes |
Friends Index
| constexpr bool | operator== |
Public Constructors Index
| ResourceTypeId (const size_t id) | |
|
Constructs a ResourceTypeId with a specific value. More... | |
| ResourceTypeId (helios::ecs::types::no_init_t) | |
|
Constructs an uninitialized ResourceTypeId. More... | |
Public Member Functions Index
| size_t | value () const noexcept |
|
Returns the underlying ID value. More... | |
Private Member Attributes Index
| size_t | id_ {0} |
|
The underlying ID value. More... | |
Public Static Functions Index
template <typename T> | |
| static ResourceTypeId | id () |
|
Returns the ResourceTypeId for a specific type. More... | |
Description
Unique type identifier for engine resources.
ResourceTypeId 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
- See Also
- See Also
- See Also
CommandTypeId
Definition at line 33 of file ResourceTypeId.ixx.
Private Member Typedefs
ResourceType
|
Definition at line 40 of file ResourceTypeId.ixx.
Friends
operator==
| constexpr noexcept default |
Definition at line 93 of file ResourceTypeId.ixx.
Public Constructors
ResourceTypeId()
| inline explicit |
Constructs a ResourceTypeId with a specific value.
- Parameters
-
id The type ID value.
Definition at line 56 of file ResourceTypeId.ixx.
ResourceTypeId()
| inline explicit |
Constructs an uninitialized ResourceTypeId.
- Parameters
-
no_init_t Tag to indicate no initialization.
Definition at line 64 of file ResourceTypeId.ixx.
Public Member Functions
value()
| inline noexcept |
Private Member Attributes
id_
|
Public Static Functions
id()
| inline static |
Returns the ResourceTypeId 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 ResourceTypeId for type T.
Definition at line 88 of file ResourceTypeId.ixx.
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.