Skip to content

Class Engine::IComponentArray

ClassList > Engine > IComponentArray

Interface for component arrays so they can be stored generically.

  • #include <Registry.hpp>

Inherited by the following classes: Engine::ComponentArray

Public Functions

Type Name
virtual void Clear () = 0
Removes the components of every entity from this array.
virtual void EntityDestroyed (Entity entity) = 0
Called when an entity is destroyed, allows the array to clean up.
virtual bool Has (Entity entity) const = 0
Returns whether an entity has a component in this array.
virtual void Remove (Entity entity) = 0
Removes the component of an entity from this array.
virtual ~IComponentArray () = default

Public Functions Documentation

function Clear

Removes the components of every entity from this array.

virtual void Engine::IComponentArray::Clear () = 0


function EntityDestroyed

Called when an entity is destroyed, allows the array to clean up.

virtual void Engine::IComponentArray::EntityDestroyed (
    Entity entity
) = 0

Parameters:

  • entity The ID of the destroyed entity.

function Has

Returns whether an entity has a component in this array.

virtual bool Engine::IComponentArray::Has (
    Entity entity
) const = 0


function Remove

Removes the component of an entity from this array.

virtual void Engine::IComponentArray::Remove (
    Entity entity
) = 0


function ~IComponentArray

virtual Engine::IComponentArray::~IComponentArray () = default


The documentation for this class was generated from the following file /home/runner/work/r-type/r-type/Engine/include/ECS/Registry.hpp