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:
21using namespace helios::ecs::types;
22export namespace helios::ecs {
75 class ComponentReflector {
80 using Handle_type = TEntityManager::Handle_type;
93 static void registerType() {
95 ComponentOps ops{
97 .onAcquire = [](void* ptr) {
132 const auto* target = static_cast<const Handle_type*>(targetRaw);
166 const auto typeId = ComponentTypeId<Handle_type>::template id<T>();
168 ComponentOpsRegistry<Handle_type>::setOps(typeId, ops);
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.