Base system class with components. More...
#include <ecsm.hpp>
Public Types | |
| typedef T | ComponentType |
| using | ComponentPool = LinearPool<T, DestroyComponents> |
Public Member Functions | |
| const ComponentPool & | getComponents () const noexcept |
| Returns system component pool. | |
| std::string_view | getComponentName () const override |
| Returns specific component name of the system. | |
| std::type_index | getComponentType () const override |
| Returns specific component typeid() of the system. | |
| View< Component > | getComponent (ID< Component > instance) override |
| Returns specific component View. | |
| void | disposeComponents () override |
| Actually destroys system components. | |
Protected Member Functions | |
| ID< Component > | createComponent (ID< Entity > entity) override |
| Creates a new system component instance for the entity. | |
| void | destroyComponent (ID< Component > instance) override |
| Destroys system component instance. | |
| void | resetComponent (View< Component > component, bool full) override |
| Resets system component data. | |
| void | copyComponent (View< Component > source, View< Component > destination) override |
| Copies system component data from the source to destination. | |
Protected Attributes | |
| ComponentPool | components |
Base system class with components.
See the System.
| T | type of the system component |
| DestroyComponents | system should call destroy() function of the components |
| typedef T ComponentType |
Type of the system component.
| using ComponentPool = LinearPool<T, DestroyComponents> |
System component pool type.
|
inlineoverridevirtual |
Returns specific component name of the system.
Reimplemented from System.
Reimplemented in DoNotDestroySystem, and DoNotDuplicateSystem.
|
inlineoverridevirtual |
Returns specific component typeid() of the system.
Reimplemented from System.
|
inlineoverridevirtual |
Actually destroys system components.
Components are not destroyed immediately, only after the dispose call.
Reimplemented from System.
|
protected |
System component pool.