Handles entities that should not be destroyed. More...
#include <ecsm.hpp>
Public Types | |
| typedef DoNotDestroyComponent | ComponentType |
| using | ComponentPool |
| typedef DoNotDestroySystem | ItemType |
| typedef Singleton< DoNotDestroySystem, true > | Instance |
Public Member Functions | |
| const ComponentPool & | getComponents () const noexcept |
| Returns system component pool. | |
| 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. | |
Static Public Member Functions | |
| static bool | has () |
| Returns true if class singleton or manager instance is exist. | |
| static DoNotDestroySystem * | get () |
| Returns class singleton or manager instance. | |
| static DoNotDestroySystem * | tryGet () |
| Returns class singleton or manager instance if exist. | |
Protected Member Functions | |
| DoNotDestroySystem (bool setSingleton=true) | |
| Creates a new do not destroy system instance. | |
| ~DoNotDestroySystem () override | |
| Destroys do not destroy system instance. | |
| std::string_view | getComponentName () const override |
| Returns specific component name of the system. | |
| 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. | |
| void | setSingleton () |
| Sets a new class singleton instance. | |
| void | unsetSingleton () noexcept |
| Unsets this class singleton instance. | |
Protected Attributes | |
| ComponentPool | components |
Static Protected Attributes | |
| static DoNotDestroySystem * | singletonInstance |
Friends | |
| class | ecsm::Manager |
Handles entities that should not be destroyed.
|
inherited |
Type of the system component.
|
inherited |
System component pool type.
|
inherited |
Type of the singleton class.
|
inherited |
Singleton instance class type.
|
protected |
Creates a new do not destroy system instance.
| setSingleton | set system singleton instance |
|
overrideprotectedvirtual |
Returns specific component name of the system.
Reimplemented from ComponentSystem< DoNotDestroyComponent, false >.
|
inlineoverridevirtualinherited |
Returns specific component typeid() of the system.
Reimplemented from System.
|
inlineoverridevirtualinherited |
Actually destroys system components.
Components are not destroyed immediately, only after the dispose call.
Reimplemented from System.
|
protectedinherited |
System component pool.
|
inlinestaticprotectedinherited |
Singleton class instance.