Skip to main content

ComponentOps Struct

Container for type-erased component lifecycle function pointers. More...

Declaration​

struct helios::ecs::types::ComponentOps { ... }

Public Member Typedefs Index​

usingOnAcquireFn = void(*)(void *)

Function signature for pool acquisition callback. More...

usingOnReleaseFn = void(*)(void *)

Function signature for pool release callback. More...

usingOnRemoveFn = bool(*)(void *)

Function signature for removal interception callback. More...

usingEnableFn = void(*)(void *)

Function signature for component enable callback. More...

usingDisableFn = void(*)(void *)

Function signature for component disable callback. More...

usingCloneFn = void *(*)(void *manager, const void *source, const void *target)

Function signature for component cloning. More...

usingOnActivateFn = void(*)(void *)

Function signature for Entity activation callback. More...

usingOnDeactivateFn = void(*)(void *)

Function signature for Entity deactivation callback. More...

Public Member Attributes Index​

OnAcquireFnonAcquire = nullptr

Called when entity is acquired from an object pool. More...

OnReleaseFnonRelease = nullptr

Called when entity is released back to an object pool. More...

OnRemoveFnonRemove = nullptr

Called before component removal. Return false to block. More...

EnableFnenable = nullptr

Called to enable the component. More...

DisableFndisable = nullptr

Called to disable the component. More...

CloneFnclone = nullptr

Called to clone the component to a target entity. More...

OnActivateFnonActivate = nullptr

Called when the owning Entity is activated. More...

OnDeactivateFnonDeactivate = nullptr

Called when the owning Entity is deactivated. More...

Description​

Container for type-erased component lifecycle function pointers.

ComponentOps enables runtime invocation of component lifecycle hooks without knowing the concrete component type. Function pointers are set during type registration via ComponentReflector::registerType<T>().

Definition at line 40 of file ComponentOps.ixx.

Public Member Typedefs​

CloneFn​

using helios::ecs::types::ComponentOps::CloneFn = void*(*)(void* manager, const void* source, const void* target)

Function signature for component cloning.

Parameters
manager

Raw pointer to the EntityManager.

source

Raw pointer to the source component.

target

Pointer to the target EntityHandle.

Returns

Raw pointer to the newly created component.

Definition at line 88 of file ComponentOps.ixx.

88 using CloneFn = void*(*)(void* manager, const void* source, const void* target);

DisableFn​

using helios::ecs::types::ComponentOps::DisableFn = void(*)(void*)

Function signature for component disable callback.

Parameters
ptr

Raw pointer to the component instance.

Definition at line 77 of file ComponentOps.ixx.

77 using DisableFn = void(*)(void*);

EnableFn​

using helios::ecs::types::ComponentOps::EnableFn = void(*)(void*)

Function signature for component enable callback.

Parameters
ptr

Raw pointer to the component instance.

Definition at line 70 of file ComponentOps.ixx.

70 using EnableFn = void(*)(void*);

OnAcquireFn​

using helios::ecs::types::ComponentOps::OnAcquireFn = void(*)(void*)

Function signature for pool acquisition callback.

Parameters
ptr

Raw pointer to the component instance.

Definition at line 47 of file ComponentOps.ixx.

47 using OnAcquireFn = void(*)(void*);

OnActivateFn​

using helios::ecs::types::ComponentOps::OnActivateFn = void(*)(void*)

Function signature for Entity activation callback.

Parameters
ptr

Raw pointer to the component instance.

Definition at line 95 of file ComponentOps.ixx.

95 using OnActivateFn = void(*)(void*);

OnDeactivateFn​

using helios::ecs::types::ComponentOps::OnDeactivateFn = void(*)(void*)

Function signature for Entity deactivation callback.

Parameters
ptr

Raw pointer to the component instance.

Definition at line 102 of file ComponentOps.ixx.

102 using OnDeactivateFn = void(*)(void*);

OnReleaseFn​

using helios::ecs::types::ComponentOps::OnReleaseFn = void(*)(void*)

Function signature for pool release callback.

Parameters
ptr

Raw pointer to the component instance.

Definition at line 54 of file ComponentOps.ixx.

54 using OnReleaseFn = void(*)(void*);

OnRemoveFn​

using helios::ecs::types::ComponentOps::OnRemoveFn = bool(*)(void*)

Function signature for removal interception callback.

Parameters
ptr

Raw pointer to the component instance.

Returns

true to allow removal, false to prevent it.

Definition at line 63 of file ComponentOps.ixx.

63 using OnRemoveFn = bool(*)(void*);

Public Member Attributes​

clone​

CloneFn helios::ecs::types::ComponentOps::clone = nullptr

Called to clone the component to a target entity.

Definition at line 132 of file ComponentOps.ixx.

132 CloneFn clone = nullptr;

disable​

DisableFn helios::ecs::types::ComponentOps::disable = nullptr

Called to disable the component.

Definition at line 127 of file ComponentOps.ixx.

127 DisableFn disable = nullptr;

enable​

EnableFn helios::ecs::types::ComponentOps::enable = nullptr

Called to enable the component.

Definition at line 122 of file ComponentOps.ixx.

122 EnableFn enable = nullptr;

onAcquire​

OnAcquireFn helios::ecs::types::ComponentOps::onAcquire = nullptr

Called when entity is acquired from an object pool.

Definition at line 107 of file ComponentOps.ixx.

Referenced by helios::ecs::ComponentReflector< TEntityManager >::registerType.

onActivate​

OnActivateFn helios::ecs::types::ComponentOps::onActivate = nullptr

Called when the owning Entity is activated.

Definition at line 137 of file ComponentOps.ixx.

onDeactivate​

OnDeactivateFn helios::ecs::types::ComponentOps::onDeactivate = nullptr

Called when the owning Entity is deactivated.

Definition at line 142 of file ComponentOps.ixx.

onRelease​

OnReleaseFn helios::ecs::types::ComponentOps::onRelease = nullptr

Called when entity is released back to an object pool.

Definition at line 112 of file ComponentOps.ixx.

onRemove​

OnRemoveFn helios::ecs::types::ComponentOps::onRemove = nullptr

Called before component removal. Return false to block.

Definition at line 117 of file ComponentOps.ixx.

Referenced by helios::ecs::EntityManager< THandle, TEntityRegistry, TCapacity >::destroy.


The documentation for this struct was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.