Skip to main content

AddComponentCommand.ixx File

Deferred command for adding a component to an entity. More...

Included Headers​

#include <memory>

Namespaces Index​

namespacehelios
namespaceecs
namespacecommands

Classes Index​

structAddComponentCommand<TComponent>

Deferred command that adds a component of type TComponent to an entity. More...

Description​

Deferred command for adding a component to an entity.

File Listing​

The file content with the documentation metadata removed is:

1
5module;
6
7#include <memory>
8
9export module helios.ecs.commands:AddComponentCommand;
10
11export namespace helios::ecs::commands {
12
13
23 template<typename TComponent>
25
27 using Handle_type = TComponent::Handle_type;
28
30 using Component_type = TComponent;
31
34
36 TComponent component;
37
44 requires std::default_initializable<TComponent>
45 : handle(handle), component() {}
46
54 template<typename ...TArgs>
55 requires std::constructible_from<TComponent, TArgs...>
56 explicit AddComponentCommand(Handle_type handle, TArgs&& ...args)
57 : handle(handle), component(std::forward<TArgs>(args)...) {}
58
59 };
60
61};

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.