R-TYPE
Public Member Functions | List of all members
ECS::EntityManager Class Reference

#include <EntityManager.hpp>

Public Member Functions

 EntityManager ()=default
 
 ~EntityManager ()=default
 
Entity createEntity (EntityType t)
 
void destroyEntity (Entity e)
 
std::deque< Entity > & getEntities ()
 
std::deque< EntitygetEntityByType (EntityType type)
 
Entity getEntityById (std::size_t id)
 

Constructor & Destructor Documentation

◆ EntityManager()

ECS::EntityManager::EntityManager ( )
default

◆ ~EntityManager()

ECS::EntityManager::~EntityManager ( )
default

Member Function Documentation

◆ createEntity()

ECS::Entity ECS::EntityManager::createEntity ( ECS::EntityType  type)

It creates an entity and adds it to the entity manager

Parameters
typeThe type of entity you want to create.
Returns
A reference to the last element in the deque.

◆ destroyEntity()

void ECS::EntityManager::destroyEntity ( ECS::Entity  e)

It removes the entity from the list of entities

Parameters
eThe entity to destroy.

◆ getEntities()

std::deque< ECS::Entity > & ECS::EntityManager::getEntities ( )

Returns a reference to the deque of entities.

Returns
A reference to the deque of entities.

◆ getEntityById()

ECS::Entity ECS::EntityManager::getEntityById ( std::size_t  id)

◆ getEntityByType()

std::deque< ECS::Entity > ECS::EntityManager::getEntityByType ( EntityType  type)

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