Saga
Saga Game Engine
Loading...
Searching...
No Matches
Saga::IComponentContainer Class Referenceabstract

Generic container of components. More...

#include <componentContainer.h>

Inheritance diagram for Saga::IComponentContainer:

Public Member Functions

virtual ~IComponentContainer ()=default
 Destroy the IComponentContainer object.
 
virtual void onEntityDestroyed (Entity entity)=0
 Handler for when an entity is deleted. This should remove the entity from the Container, as well as the associated component if it exists.
 
virtual int getLastReallocated ()=0
 Get the last time the container was changed. Useful for cacheing references from the container.
 

Detailed Description

Generic container of components.

Constructor & Destructor Documentation

◆ ~IComponentContainer()

virtual Saga::IComponentContainer::~IComponentContainer ( )
virtualdefault

Destroy the IComponentContainer object.

Member Function Documentation

◆ getLastReallocated()

virtual int Saga::IComponentContainer::getLastReallocated ( )
pure virtual

Get the last time the container was changed. Useful for cacheing references from the container.

Returns
int time step at which the container has been changed.

Implemented in Saga::ComponentContainer< Component >.

◆ onEntityDestroyed()

virtual void Saga::IComponentContainer::onEntityDestroyed ( Entity  entity)
pure virtual

Handler for when an entity is deleted. This should remove the entity from the Container, as well as the associated component if it exists.

Parameters
entity

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