CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::AbstractComponentListener Struct Referenceabstract

An abstract type that represents a generic component listener. More...

#include <CeresEngine/Entity/Component.hpp>

Inheritance diagram for CeresEngine::AbstractComponentListener:
CeresEngine::ComponentListener< Cs >

Public Member Functions

virtual ~AbstractComponentListener ()=default
 Destroys the AbstractComponentListener instance.
 
virtual ComponentMask mask () const noexcept=0
 The component criteria a entity must match for consideration of a callback.
 
virtual void componentsAdded (const Entity &entity) noexcept=0
 A notification dispatched by the SystemManager to a system.
 
virtual void componentsRemoved (const Entity &entity) noexcept=0
 A notification dispatched by the SystemManager to a system.
 
virtual void entityDirtied (const Entity &entity, const EntityChangeSet &changeSet) noexcept
 A notification dispatched by the SystemManager to a system.
 

Detailed Description

An abstract type that represents a generic component listener.

See ComponentListener<Cs... for more details.

Constructor & Destructor Documentation

◆ ~AbstractComponentListener()

virtual CeresEngine::AbstractComponentListener::~AbstractComponentListener ( )
virtualdefault

Destroys the AbstractComponentListener instance.

Member Function Documentation

◆ componentsAdded()

virtual void CeresEngine::AbstractComponentListener::componentsAdded ( const Entity entity)
pure virtualnoexcept

A notification dispatched by the SystemManager to a system.

This notification is dispatched once a new entity matching the mask criteria is created (either by creating it or by adding all components required).

Parameters
entityThe entity object

◆ componentsRemoved()

virtual void CeresEngine::AbstractComponentListener::componentsRemoved ( const Entity entity)
pure virtualnoexcept

A notification dispatched by the SystemManager to a system.

This notification is dispatched once an entity that previously matched the mask criteria is destroyed (either by destroying it or by removing one of the required components).

Parameters
entityThe entity object

◆ entityDirtied()

virtual void CeresEngine::AbstractComponentListener::entityDirtied ( const Entity entity,
const EntityChangeSet changeSet 
)
inlinevirtualnoexcept

A notification dispatched by the SystemManager to a system.

This notification is dispatched once an entity that previously matched the mask criteria is dirtied.

Parameters
entityThe entity object.

◆ mask()

virtual ComponentMask CeresEngine::AbstractComponentListener::mask ( ) const
pure virtualnoexcept

The component criteria a entity must match for consideration of a callback.

Returns
The component mask of the requirements

Implemented in CeresEngine::ComponentListener< Cs >.


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