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

Command to clear all components from an entity. More...

#include <builtin_commands.hpp>

Public Member Functions

constexpr ClearComponentsCmd (Entity entity) noexcept
 Constructs clear components command.
constexpr ClearComponentsCmd (const ClearComponentsCmd &) noexcept=default
constexpr ClearComponentsCmd (ClearComponentsCmd &&) noexcept=default
constexpr ~ClearComponentsCmd () noexcept=default
constexpr ClearComponentsCmdoperator= (const ClearComponentsCmd &) noexcept=default
constexpr ClearComponentsCmdoperator= (ClearComponentsCmd &&) noexcept=default
void Execute (World &world)
 Executes component clearing.

Detailed Description

Command to clear all components from an entity.

Removes all components from the specified entity during execution.

Warning
Will trigger assertion if the entity does not exist in the world (when world updated).

Definition at line 437 of file builtin_commands.hpp.

Constructor & Destructor Documentation

◆ ClearComponentsCmd() [1/3]

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

Constructs clear components command.

Warning
Triggers assertion if entity is invalid.
Parameters
entityEntity to clear components from

Definition at line 444 of file builtin_commands.hpp.

◆ ClearComponentsCmd() [2/3]

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

◆ ClearComponentsCmd() [3/3]

helios::ecs::ClearComponentsCmd::ClearComponentsCmd ( ClearComponentsCmd && )
constexprdefaultnoexcept

◆ ~ClearComponentsCmd()

helios::ecs::ClearComponentsCmd::~ClearComponentsCmd ( )
constexprdefaultnoexcept

Member Function Documentation

◆ Execute()

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

Executes component clearing.

Warning
Triggers assertion if the entity does not exist in the world.
Parameters
worldWorld to clear components in

Definition at line 463 of file builtin_commands.hpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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