ComponentTypeId.ixx File
Compile-time type identifier for component types. More...
Included Headers
#include <functional>
#include <cstddef>
#include <helios.ecs.types.TypeDefs>
#include <helios.ecs.TypeIndexer>
Namespaces Index
| namespace | helios |
| namespace | ecs |
| namespace | types |
Classes Index
| class | ComponentTypeId<THandle> |
|
Unique type identifier for component types, scoped per domain. More... | |
| struct | hash<helios::ecs::types::ComponentTypeId< THandle >> |
|
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:
18export namespace helios::ecs::types {
53 class ComponentTypeId {
72 explicit ComponentTypeId(const size_t id) : id_(id) {}
79 explicit ComponentTypeId(helios::ecs::types::no_init_t) {}
101 [[nodiscard]] static ComponentTypeId<THandle> id() {
102 static const size_t tid = helios::ecs::TypeIndexer<THandle>::template typeIndex<T>();
103 return ComponentTypeId(tid);
106 friend constexpr bool operator==(ComponentTypeId, ComponentTypeId) noexcept = default;
120 std::size_t operator()(const helios::ecs::types::ComponentTypeId<THandle>& id) const noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.