Helios Engine
A modular ECS based data-oriented C++23 game engine framework
Loading...
Searching...
No Matches
helios::ecs::DestroyEntityCmd Class Reference

Command to destroy a single entity. More...

#include <builtin_commands.hpp>

Public Member Functions

constexpr DestroyEntityCmd (Entity entity) noexcept
 Constructs destroy entity command.
constexpr DestroyEntityCmd (const DestroyEntityCmd &) noexcept=default
constexpr DestroyEntityCmd (DestroyEntityCmd &&) noexcept=default
constexpr ~DestroyEntityCmd () noexcept=default
constexpr DestroyEntityCmdoperator= (const DestroyEntityCmd &) noexcept=default
constexpr DestroyEntityCmdoperator= (DestroyEntityCmd &&) noexcept=default
void Execute (World &world)
 Executes entity destruction.

Detailed Description

Command to destroy a single entity.

Removes entity and all its components from the world during execution.

Warning
Will trigger assertion if the world does not own (entity index/generation mismatch) the entity.

Definition at line 81 of file builtin_commands.hpp.

Constructor & Destructor Documentation

◆ DestroyEntityCmd() [1/3]

helios::ecs::DestroyEntityCmd::DestroyEntityCmd ( Entity entity)
inlineexplicitconstexprnoexcept

Constructs destroy entity command.

Warning
Triggers assertion if entity is invalid.
Parameters
entityEntity to destroy

Definition at line 88 of file builtin_commands.hpp.

◆ DestroyEntityCmd() [2/3]

helios::ecs::DestroyEntityCmd::DestroyEntityCmd ( const DestroyEntityCmd & )
constexprdefaultnoexcept

◆ DestroyEntityCmd() [3/3]

helios::ecs::DestroyEntityCmd::DestroyEntityCmd ( DestroyEntityCmd && )
constexprdefaultnoexcept

◆ ~DestroyEntityCmd()

helios::ecs::DestroyEntityCmd::~DestroyEntityCmd ( )
constexprdefaultnoexcept

Member Function Documentation

◆ Execute()

void helios::ecs::DestroyEntityCmd::Execute ( World & world)
inline

Executes entity destruction.

Warning
Triggers assertion if the world does not own the entity.
Parameters
worldWorld to remove entity from

Definition at line 106 of file builtin_commands.hpp.

◆ operator=() [1/2]

DestroyEntityCmd & helios::ecs::DestroyEntityCmd::operator= ( const DestroyEntityCmd & )
constexprdefaultnoexcept

◆ operator=() [2/2]

DestroyEntityCmd & helios::ecs::DestroyEntityCmd::operator= ( DestroyEntityCmd && )
constexprdefaultnoexcept