Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::ecs::Name Struct Reference

Name component for debugging and identification. More...

#include <Common.hpp>

Public Member Functions

 Name ()=default
 Default constructor (empty name).
 Name (const std::string &name)
 Constructs with name (copy).
 Name (std::string &&name)
 Constructs with name (move).
 Name (const char *name)
 Constructs with C-string.

Public Attributes

std::string value
 The entity's name.

Detailed Description

Name component for debugging and identification.

Attaches a human-readable name to an entity for debugging, editor display, or lookup purposes.

Entity player = registry.create();
registry.emplace<Name>(player, "Player");
Entity identifier with packed index + generation.
Definition Types.hpp:135
Name()=default
Default constructor (empty name).

Definition at line 88 of file Common.hpp.

Constructor & Destructor Documentation

◆ Name() [1/4]

esengine::ecs::Name::Name ( )
default

Default constructor (empty name).

◆ Name() [2/4]

esengine::ecs::Name::Name ( const std::string & name)
inlineexplicit

Constructs with name (copy).

Parameters
nameThe name string

Definition at line 99 of file Common.hpp.

References value.

◆ Name() [3/4]

esengine::ecs::Name::Name ( std::string && name)
inlineexplicit

Constructs with name (move).

Parameters
nameThe name string (moved)

Definition at line 105 of file Common.hpp.

References value.

◆ Name() [4/4]

esengine::ecs::Name::Name ( const char * name)
inlineexplicit

Constructs with C-string.

Parameters
nameThe name string

Definition at line 111 of file Common.hpp.

References value.

Member Data Documentation

◆ value

std::string esengine::ecs::Name::value

The entity's name.

Definition at line 90 of file Common.hpp.

Referenced by Name(), Name(), and Name().


The documentation for this struct was generated from the following file:
  • /home/runner/work/estella/estella/src/esengine/ecs/components/Common.hpp