ComponentTypeId.ixx File
Compile-time type identifier for component types. More...
Included Headers
#include <functional>
#include <helios.core.types>
#include <helios.core.data.TypeIndexer>
Namespaces Index
| namespace | helios |
| namespace | engine |
|
Main engine module aggregating core infrastructure and game systems. More... | |
| namespace | core |
|
Core engine infrastructure providing fundamental building blocks. More... | |
| namespace | data |
|
Data structures for efficient entity management. More... | |
Classes Index
| class | ComponentTypeId |
|
Unique type identifier for component types. More... | |
| struct | helios_engine_core_data_ComponentTypes |
|
Tag type for the TypeIndexer domain. More... | |
| struct | hash<helios::engine::core::data::ComponentTypeId> |
|
std::hash specialization for ComponentTypeId. More... | |
Description
Compile-time type identifier for component types.
Provides a unique, compile-time generated ID for each component type, enabling O(1) direct indexing into the component storage vector within GameObject.
File Listing
The file content with the documentation metadata removed is:
17export namespace helios::engine::core::data {
41 class ComponentTypeId {
68 explicit ComponentTypeId(const size_t id) : id_(id) {}
75 explicit ComponentTypeId(helios::core::types::no_init_t) {}
97 [[nodiscard]] static ComponentTypeId id() {
98 static const size_t tid = helios::core::data::TypeIndexer<ComponentType>::typeIndex<T>();
99 return ComponentTypeId(tid);
102 friend constexpr bool operator==(ComponentTypeId, ComponentTypeId) noexcept = default;
116 std::size_t operator()(const helios::engine::core::data::ComponentTypeId& id) const noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.