The IEntity interface.
More...
#include <IEntity.hpp>
◆ ~IEntity()
| virtual Arcade::ECS::IEntity::~IEntity |
( |
| ) |
|
|
virtualdefault |
◆ addComponent()
| virtual void Arcade::ECS::IEntity::addComponent |
( |
std::shared_ptr< IComponent > |
component | ) |
|
|
pure virtual |
Add a component.
- Parameters
-
| component | The component to add |
◆ getComponents() [1/3]
| virtual const std::map<CompType, std::vector<std::shared_ptr<IComponent> > >& Arcade::ECS::IEntity::getComponents |
( |
| ) |
const |
|
pure virtual |
Get all components.
- Returns
- The list of components
◆ getComponents() [2/3]
| virtual const std::vector<std::shared_ptr<IComponent> >& Arcade::ECS::IEntity::getComponents |
( |
CompType |
type | ) |
const |
|
pure virtual |
Get all components of type compType
- Parameters
-
| type | The type of component to get |
!!!ATTENTION!!!: You need to use .at() in order to manipulate your map or vector because of const
- Returns
- The list of components filtered
◆ getComponents() [3/3]
| virtual IComponent& Arcade::ECS::IEntity::getComponents |
( |
const std::string & |
id | ) |
|
|
pure virtual |
Get component by its id.
- Parameters
-
| id | The id of the component to get |
- Returns
- The component (if it doesn't exists: throw)
◆ getId()
| virtual std::string Arcade::ECS::IEntity::getId |
( |
| ) |
const |
|
pure virtual |
Get the entity id.
- Returns
- The entity id
◆ removeComponent() [1/2]
| virtual void Arcade::ECS::IEntity::removeComponent |
( |
CompType |
type | ) |
|
|
pure virtual |
Remove all components of type CompType
- Parameters
-
| type | The type of component to remove |
◆ removeComponent() [2/2]
| virtual void Arcade::ECS::IEntity::removeComponent |
( |
const std::string & |
id | ) |
|
|
pure virtual |
Remove a component.
- Parameters
-
| std::string | The component id to remove |
The documentation for this class was generated from the following file: