R-Type  2
Doom but in better
Loading...
Searching...
No Matches
Entity Class Reference

Represents an entity in an Entity-Component-System (ECS) architecture. More...

#include <Entity.hpp>

Collaboration diagram for Entity:
Collaboration graph

Public Member Functions

 Entity (std::size_t id)
 Constructs an Entity with a given ID.
 
 operator std::size_t () const
 Implicit conversion operator to size_t.
 
std::size_t getID () const
 Retrieves the ID of the entity.
 

Detailed Description

Represents an entity in an Entity-Component-System (ECS) architecture.

The Entity class provides a lightweight wrapper around an entity identifier (ID). It allows entities to be managed as unique IDs within the ECS system.

Definition at line 12 of file Entity.hpp.

Constructor & Destructor Documentation

◆ Entity()

Entity::Entity ( std::size_t id)
explicit

Constructs an Entity with a given ID.

Parameters
idThe unique identifier for the entity.

Definition at line 3 of file Entity.cpp.

Member Function Documentation

◆ getID()

std::size_t Entity::getID ( ) const

Retrieves the ID of the entity.

Returns
The unique identifier of the entity.

Definition at line 9 of file Entity.cpp.

◆ operator std::size_t()

Entity::operator std::size_t ( ) const

Implicit conversion operator to size_t.

This operator allows an Entity to be used as its underlying ID in contexts requiring a size_t.

Returns
The unique ID of the entity.

Definition at line 5 of file Entity.cpp.


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