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

Command to destroy multiple entities. More...

#include <builtin_commands.hpp>

Public Member Functions

constexpr DestroyEntitiesCmd (std::vector< Entity, Alloc > entities)
 Constructs destroy entities command from vector of entities.
constexpr DestroyEntitiesCmd (const DestroyEntitiesCmd &) noexcept=default
constexpr DestroyEntitiesCmd (DestroyEntitiesCmd &&) noexcept=default
constexpr ~DestroyEntitiesCmd () noexcept=default
constexpr DestroyEntitiesCmdoperator= (const DestroyEntitiesCmd &) noexcept=default
constexpr DestroyEntitiesCmdoperator= (DestroyEntitiesCmd &&) noexcept=default
void Execute (World &world)
 Executes entities destruction.

Detailed Description

template<typename Alloc = std::allocator<Entity>>
class helios::ecs::DestroyEntitiesCmd< Alloc >

Command to destroy multiple entities.

Efficiently destroys multiple entities in a single operation.

Warning
Will assertion if any of the entities do not exist in the world (when world updated).
Template Parameters
AllocAllocator type

Definition at line 120 of file builtin_commands.hpp.

Constructor & Destructor Documentation

◆ DestroyEntitiesCmd() [1/3]

template<typename Alloc = std::allocator<Entity>>
helios::ecs::DestroyEntitiesCmd< Alloc >::DestroyEntitiesCmd ( std::vector< Entity, Alloc > entities)
inlineexplicitconstexpr

Constructs destroy entities command from vector of entities.

Warning
Triggers assertion if any entity is invalid.
Parameters
entitiesVector of entities to destroy

Definition at line 127 of file builtin_commands.hpp.

◆ DestroyEntitiesCmd() [2/3]

template<typename Alloc = std::allocator<Entity>>
helios::ecs::DestroyEntitiesCmd< Alloc >::DestroyEntitiesCmd ( const DestroyEntitiesCmd< Alloc > & )
constexprdefaultnoexcept

◆ DestroyEntitiesCmd() [3/3]

template<typename Alloc = std::allocator<Entity>>
helios::ecs::DestroyEntitiesCmd< Alloc >::DestroyEntitiesCmd ( DestroyEntitiesCmd< Alloc > && )
constexprdefaultnoexcept

◆ ~DestroyEntitiesCmd()

template<typename Alloc = std::allocator<Entity>>
helios::ecs::DestroyEntitiesCmd< Alloc >::~DestroyEntitiesCmd ( )
constexprdefaultnoexcept

Member Function Documentation

◆ Execute()

template<typename Alloc = std::allocator<Entity>>
void helios::ecs::DestroyEntitiesCmd< Alloc >::Execute ( World & world)
inline

Executes entities destruction.

Warning
Triggers assertion if any entity does not exist in the world.
Parameters
worldWorld to remove entities from

Definition at line 148 of file builtin_commands.hpp.

◆ operator=() [1/2]

template<typename Alloc = std::allocator<Entity>>
DestroyEntitiesCmd & helios::ecs::DestroyEntitiesCmd< Alloc >::operator= ( const DestroyEntitiesCmd< Alloc > & )
constexprdefaultnoexcept

◆ operator=() [2/2]

template<typename Alloc = std::allocator<Entity>>
DestroyEntitiesCmd & helios::ecs::DestroyEntitiesCmd< Alloc >::operator= ( DestroyEntitiesCmd< Alloc > && )
constexprdefaultnoexcept