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

Command to try destroy multiple entities. More...

#include <builtin_commands.hpp>

Public Member Functions

constexpr TryDestroyEntitiesCmd (std::vector< Entity, Alloc > entities)
 Constructs try destroy entities command from vector of entities.
constexpr TryDestroyEntitiesCmd (const TryDestroyEntitiesCmd &) noexcept=default
constexpr TryDestroyEntitiesCmd (TryDestroyEntitiesCmd &&) noexcept=default
constexpr ~TryDestroyEntitiesCmd () noexcept=default
constexpr TryDestroyEntitiesCmdoperator= (const TryDestroyEntitiesCmd &) noexcept=default
constexpr TryDestroyEntitiesCmdoperator= (TryDestroyEntitiesCmd &&) noexcept=default
void Execute (World &world)
 Executes entities destruction if they exist.

Detailed Description

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

Command to try destroy multiple entities.

Will destroy entities only if they exist in the world.

Template Parameters
AllocAllocator type

Definition at line 195 of file builtin_commands.hpp.

Constructor & Destructor Documentation

◆ TryDestroyEntitiesCmd() [1/3]

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

Constructs try destroy entities command from vector of entities.

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

Definition at line 202 of file builtin_commands.hpp.

◆ TryDestroyEntitiesCmd() [2/3]

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

◆ TryDestroyEntitiesCmd() [3/3]

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

◆ ~TryDestroyEntitiesCmd()

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

Member Function Documentation

◆ Execute()

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

Executes entities destruction if they exist.

Parameters
worldWorld to remove entities from

Definition at line 224 of file builtin_commands.hpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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