ComponentReflector.ixx File
Compile-time reflection for component lifecycle hook registration. More...
Included Headers
#include <type_traits>
#include <helios.ecs.EntityManager>
#include <helios.ecs.ComponentOpsRegistry>
#include <helios.ecs.types.EntityHandle>
#include <helios.ecs.types.ComponentTypeId>
#include <helios.ecs.types.ComponentOps>
#include <helios.ecs.concepts.Traits>
Namespaces Index
| namespace | helios |
| namespace | ecs |
Classes Index
| class | ComponentReflector<TEntityManager> |
|
Generates and registers ComponentOps for a component type. More... | |
Description
Compile-time reflection for component lifecycle hook registration.
File Listing
The file content with the documentation metadata removed is:
20using namespace helios::ecs::concepts::traits;
21using namespace helios::ecs::types;
22export namespace helios::ecs {
73 class ComponentReflector {
75 using Handle_type = TEntityManager::Handle_type;
88 static void registerType() {
89 ComponentOps ops{
91 .onAcquire = [](void *ptr) {
113 const auto *target = static_cast<const Handle_type *>(targetRaw);
148 const auto typeId = ComponentTypeId<Handle_type>::template id<T>();
150 ComponentOpsRegistry<Handle_type>::setOps(typeId, ops);
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.