co_ecs 0.9.0
Cobalt ECS
Loading...
Searching...
No Matches
co_ecs::command_entity_ref Class Reference

This class provides a reference to a command entity, allowing operations such as setting, removing components, and cloning the entity. More...

#include <command.hpp>

Public Member Functions

template<component C, typename... Args>
auto set (Args &&... args) -> command_entity_ref &
 Sets a component of type C for the entity.
 
template<component C>
auto remove () -> command_entity_ref &
 Removes a component of type C from the entity.
 
void destroy ()
 Destroys the entity.
 
auto clone () const -> command_entity_ref
 Clones the entity.
 
 operator entity () const noexcept
 Conversion operator to entity.
 

Friends

class command_writer
 

Detailed Description

This class provides a reference to a command entity, allowing operations such as setting, removing components, and cloning the entity.

Member Function Documentation

◆ clone()

auto co_ecs::command_entity_ref::clone ( ) const -> command_entity_ref
inline

Clones the entity.

Returns
A reference to the cloned command_entity_ref.

◆ destroy()

void co_ecs::command_entity_ref::destroy ( )
inline

Destroys the entity.

◆ operator entity()

co_ecs::command_entity_ref::operator entity ( ) const
inlinenoexcept

Conversion operator to entity.

Returns
The underlying entity.

◆ remove()

template<component C>
auto co_ecs::command_entity_ref::remove ( ) -> command_entity_ref&
inline

Removes a component of type C from the entity.

Template Parameters
CComponent type to remove.
Returns
A reference to the command_entity_ref for chaining.

◆ set()

template<component C, typename... Args>
auto co_ecs::command_entity_ref::set ( Args &&... args) -> command_entity_ref&
inline

Sets a component of type C for the entity.

Template Parameters
CComponent type to set.
ArgsArgument types for the component constructor.
Parameters
argsArguments for the component constructor.
Returns
A reference to the command_entity_ref for chaining.

Friends And Related Symbol Documentation

◆ command_writer

friend class command_writer
friend

The documentation for this class was generated from the following file: