Skip to main content

RemoveComponentCommand Struct Template

Deferred command that removes a component of type TComponent from an entity. More...

Declaration

template <typename TComponent> struct helios::ecs::commands::RemoveComponentCommand<TComponent> { ... }

Public Member Typedefs Index

template <typename TComponent>
usingHandle_type = TComponent::Handle_type

Handle type derived from the component. More...

template <typename TComponent>
usingComponent_type = TComponent

The component type being removed. More...

Public Constructors Index

template <typename TComponent>
RemoveComponentCommand (Handle_type handle)

Constructs the command with a default-initialised component. More...

template <typename ... TArgs>
RemoveComponentCommand (Handle_type handle, TArgs &&...args)

Constructs the command and forwards arguments to the component constructor. More...

Public Member Attributes Index

template <typename TComponent>
Handle_typehandle

Handle of the target entity. More...

template <typename TComponent>
TComponentcomponent

Component instance providing context for the removal. More...

Description

Deferred command that removes a component of type TComponent from an entity.

Mirrors AddComponentCommand in structure. The stored component instance may carry contextual data needed by the consumer during removal.

Template Parameters
TComponent

Component type to detach. Must expose Handle_type.

Definition at line 23 of file RemoveComponentCommand.ixx.

Public Member Typedefs

Component_type

template <typename TComponent>
using helios::ecs::commands::RemoveComponentCommand< TComponent >::Component_type = TComponent

The component type being removed.

Definition at line 29 of file RemoveComponentCommand.ixx.

29 using Component_type = TComponent;

Handle_type

template <typename TComponent>
using helios::ecs::commands::RemoveComponentCommand< TComponent >::Handle_type = TComponent::Handle_type

Handle type derived from the component.

Definition at line 26 of file RemoveComponentCommand.ixx.

26 using Handle_type = TComponent::Handle_type;

Public Constructors

RemoveComponentCommand()

template <typename TComponent>
helios::ecs::commands::RemoveComponentCommand< TComponent >::RemoveComponentCommand (Handle_type handle)
inline explicit

Constructs the command with a default-initialised component.

Parameters
handle

Target entity handle.

Definition at line 42 of file RemoveComponentCommand.ixx.

43 requires std::default_initializable<TComponent>
44 : handle(handle), component() {}

RemoveComponentCommand()

template <typename ... TArgs>
helios::ecs::commands::RemoveComponentCommand< TComponent >::RemoveComponentCommand (Handle_type handle, TArgs &&... args)
inline explicit

Constructs the command and forwards arguments to the component constructor.

Template Parameters
TArgs

Component constructor argument types.

Parameters
handle

Target entity handle.

args

Arguments forwarded to TComponent.

Definition at line 55 of file RemoveComponentCommand.ixx.

55 explicit RemoveComponentCommand(Handle_type handle, TArgs&& ...args)
56 : handle(handle), component(std::forward<TArgs>(args)...) {}

Public Member Attributes

component

template <typename TComponent>
TComponent helios::ecs::commands::RemoveComponentCommand< TComponent >::component

Component instance providing context for the removal.

Definition at line 35 of file RemoveComponentCommand.ixx.

35 TComponent component;

handle

template <typename TComponent>
Handle_type helios::ecs::commands::RemoveComponentCommand< TComponent >::handle

Handle of the target entity.

Definition at line 32 of file RemoveComponentCommand.ixx.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.