ComponentOpsRegistry Class Template
Global registry for component lifecycle function pointers. More...
Declaration
Public Member Typedefs Index
template <typename THandle> | |
| using | ComponentTypeId_type = ComponentTypeId< THandle > |
Public Static Functions Index
template <typename THandle> | |
| static void | setOps (const ComponentTypeId_type typeId, const ComponentOps &ops) |
|
Registers ComponentOps for a component type. More... | |
template <typename THandle> | |
| static const ComponentOps & | ops (const ComponentTypeId_type typeId) |
|
Retrieves ComponentOps for a component type. More... | |
Private Static Attributes Index
template <typename THandle> | |
| static std::vector< ComponentOps > | operations_ |
|
Type-indexed storage for ComponentOps. More... | |
template <typename THandle> | |
| static constexpr ComponentOps | emptyOps_ {} |
|
Empty ops returned for unregistered types. More... | |
Description
Global registry for component lifecycle function pointers.
ComponentOpsRegistry provides O(1) lookup of ComponentOps by ComponentTypeId. It uses a type-indexed vector where the index corresponds to the component type's unique identifier.
Definition at line 54 of file ComponentOpsRegistry.ixx.
Public Member Typedefs
ComponentTypeId_type
|
Definition at line 68 of file ComponentOpsRegistry.ixx.
Public Static Functions
ops()
| inline static |
Retrieves ComponentOps for a component type.
- Parameters
-
typeId The unique identifier for the component type.
- Returns
Reference to the registered ComponentOps, or empty ops if not registered.
Definition at line 95 of file ComponentOpsRegistry.ixx.
Reference helios::ecs::types::ComponentTypeId< THandle >::value.
Referenced by helios::ecs::Entity< TEntityManager >::add, helios::ecs::EntityManager< THandle, TEntityRegistry, TCapacity >::clone, helios::ecs::EntityManager< THandle, TEntityRegistry, TCapacity >::destroy, helios::ecs::EntityManager< THandle, TEntityRegistry, TCapacity >::enable, helios::ecs::Entity< TEntityManager >::onAcquire, helios::ecs::Entity< TEntityManager >::onRelease, helios::ecs::EntityManager< THandle, TEntityRegistry, TCapacity >::remove, helios::ecs::Entity< TEntityManager >::setActive and helios::ecs::ComponentOpsRegistry< THandle >::setOps.
setOps()
| inline static |
Registers ComponentOps for a component type.
Auto-resizes the internal vector if necessary.
- Parameters
-
typeId The unique identifier for the component type.
ops The lifecycle function pointers to register.
Definition at line 79 of file ComponentOpsRegistry.ixx.
References helios::ecs::ComponentOpsRegistry< THandle >::ops and helios::ecs::types::ComponentTypeId< THandle >::value.
Referenced by helios::ecs::ComponentReflector< TEntityManager >::registerType.
Private Static Attributes
emptyOps_
| constexpr static |
Empty ops returned for unregistered types.
Definition at line 64 of file ComponentOpsRegistry.ixx.
operations_
| static |
Type-indexed storage for ComponentOps.
Definition at line 59 of file ComponentOpsRegistry.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.