|
@@ -125,37 +121,37 @@
void | createSystem (Args &&... args) |
| Creates a new system instance.
|
|
-void | destroySystem (type_index type) |
- | Terminates and destroys system.
|
- |
+void | destroySystem (std::type_index type) |
+ | Terminates and destroys system.
|
+ |
template<class T = System> |
void | destroySystem () |
| Terminates and destroys system.
|
|
-bool | tryDestroySystem (type_index type) |
- | Terminates and destroys system if exist.
|
- |
+bool | tryDestroySystem (std::type_index type) |
+ | Terminates and destroys system if exist.
|
+ |
template<class T = System> |
bool | tryDestroySystem () |
| Terminates and destroys system if exist.
|
|
-bool | has (type_index type) const noexcept |
- | Returns true if system is created.
|
- |
+bool | has (std::type_index type) const noexcept |
+ | Returns true if system is created.
|
+ |
template<class T = System> |
bool | has () const noexcept |
| Returns true if system is created.
|
|
-System * | get (type_index type) const |
- | Returns system instance.
|
- |
+System * | get (std::type_index type) const |
+ | Returns system instance.
|
+ |
template<class T = System> |
T * | get () const |
| Returns system instance.
|
|
-System * | tryGet (type_index type) const noexcept |
- | Returns system instance if created, otherwise nullptr.
|
- |
+System * | tryGet (std::type_index type) const noexcept |
+ | Returns system instance if created, otherwise nullptr.
|
+ |
template<class T = System> |
T * | tryGet () const noexcept |
| Returns system instance if created, otherwise nullptr.
|
@@ -169,30 +165,30 @@
View< Entity > | get (ID< Entity > instance) const noexcept |
| Returns entity internal data accessor. (View)
|
|
-View< Component > | add (ID< Entity > entity, type_index componentType) |
- | Adds a new component to the entity.
|
- |
+View< Component > | add (ID< Entity > entity, std::type_index componentType) |
+ | Adds a new component to the entity.
|
+ |
template<class T = Component> |
View< T > | add (ID< Entity > entity) |
| Adds a new component to the entity.
|
|
-void | remove (ID< Entity > entity, type_index componentType) |
- | Removes component from the entity.
|
- |
+void | remove (ID< Entity > entity, std::type_index componentType) |
+ | Removes component from the entity.
|
+ |
template<class T = Component> |
void | remove (ID< Entity > entity) |
| Removes component from the entity.
|
|
-bool | isGarbage (ID< Entity > entity, type_index componentType) const noexcept |
- | Returns true if target entity component was removed and is in the garbage pool.
|
- |
+bool | isGarbage (ID< Entity > entity, std::type_index componentType) const noexcept |
+ | Returns true if target entity component was removed and is in the garbage pool.
|
+ |
template<class T = Component> |
bool | isGarbage (ID< Entity > entity) const noexcept |
| Returns true if target entity component was removed and is in the garbage pool.
|
|
-void | copy (ID< Entity > source, ID< Entity > destination, type_index componentType) |
- | Copies component data from source entity to destination.
|
- |
+void | copy (ID< Entity > source, ID< Entity > destination, std::type_index componentType) |
+ | Copies component data from source entity to destination.
|
+ |
template<class T = Component> |
void | copy (ID< Entity > source, ID< Entity > destination) |
| Copies component data from source entity to destination.
|
@@ -200,95 +196,95 @@
ID< Entity > | duplicate (ID< Entity > entity) |
| Creates a duplicate of specified entity.
|
|
-bool | has (ID< Entity > entity, type_index componentType) const noexcept |
- | Returns true if entity has target component.
|
- |
+bool | has (ID< Entity > entity, std::type_index componentType) const noexcept |
+ | Returns true if entity has target component.
|
+ |
template<class T = Component> |
bool | has (ID< Entity > entity) const noexcept |
| Returns true if entity has target component.
|
|
-View< Component > | get (ID< Entity > entity, type_index componentType) const |
- | Returns component data accessor. (View)
|
- |
+View< Component > | get (ID< Entity > entity, std::type_index componentType) const |
+ | Returns component data accessor. (View)
|
+ |
template<class T = Component> |
View< T > | get (ID< Entity > entity) const |
| Returns component data accessor. (View)
|
|
-View< Component > | tryGet (ID< Entity > entity, type_index componentType) const noexcept |
- | Returns component data accessor if exist, otherwise null. (View)
|
- |
+View< Component > | tryGet (ID< Entity > entity, std::type_index componentType) const noexcept |
+ | Returns component data accessor if exist, otherwise null. (View)
|
+ |
template<class T = Component> |
View< T > | tryGet (ID< Entity > entity) const noexcept |
| Returns component data accessor if exist, otherwise null. (View)
|
|
-ID< Component > | getID (ID< Entity > entity, type_index componentType) const |
- | Returns entity component ID.
|
- |
+ID< Component > | getID (ID< Entity > entity, std::type_index componentType) const |
+ | Returns entity component ID.
|
+ |
template<class T = Component> |
ID< T > | getID (ID< Entity > entity) const |
| Returns entity component ID.
|
|
-ID< Component > | tryGetID (ID< Entity > entity, type_index componentType) const noexcept |
- | Returns entity component ID if added, otherwise null.
|
- |
+ID< Component > | tryGetID (ID< Entity > entity, std::type_index componentType) const noexcept |
+ | Returns entity component ID if added, otherwise null.
|
+ |
template<class T = Component> |
ID< T > | tryGetID (ID< Entity > entity) const noexcept |
| Returns entity component ID if added, otherwise null.
|
|
-uint32_t | getComponentCount (ID< Entity > entity) const noexcept |
+uint32_t | getComponentCount (ID< Entity > entity) const noexcept |
| Returns entity component count.
|
|
-void | registerEvent (const string &name) |
- | Registers a new unordered event.
|
- |
-bool | tryRegisterEvent (const string &name) |
- | Registers a new unordered event if not exist.
|
- |
-void | registerEventBefore (const string &newEvent, const string &beforeEvent) |
- | Registers a new ordered event before another.
|
- |
-void | registerEventAfter (const string &newEvent, const string &afterEvent) |
- | Registers a new ordered event after another.
|
- |
-void | unregisterEvent (const string &name) |
- | Unregisters existing event.
|
- |
-bool | tryUnregisterEvent (const string &name) |
- | Unregisters event if exist.
|
- |
-bool | hasEvent (const string &name) const noexcept |
- | Returns true if event is registered.
|
- |
-bool | isEventOrdered (const string &name) const |
- | Returns true if event is ordered.
|
- |
-const Event::Subscribers & | getEventSubscribers (const string &name) const |
- | Returns all event subscribers.
|
- |
-bool | isEventHasSubscribers (const string &name) const |
- | Returns true if event has subscribers.
|
- |
-void | runEvent (const string &name) |
- | Calls all event subscribers.
|
- |
-bool | tryRunEvent (const string &name) |
- | Calls all event subscribers if event exist.
|
- |
+void | registerEvent (const std::string &name) |
+ | Registers a new unordered event.
|
+ |
+bool | tryRegisterEvent (const std::string &name) |
+ | Registers a new unordered event if not exist.
|
+ |
+void | registerEventBefore (const std::string &newEvent, const std::string &beforeEvent) |
+ | Registers a new ordered event before another.
|
+ |
+void | registerEventAfter (const std::string &newEvent, const std::string &afterEvent) |
+ | Registers a new ordered event after another.
|
+ |
+void | unregisterEvent (const std::string &name) |
+ | Unregisters existing event.
|
+ |
+bool | tryUnregisterEvent (const std::string &name) |
+ | Unregisters event if exist.
|
+ |
+bool | hasEvent (const std::string &name) const noexcept |
+ | Returns true if event is registered.
|
+ |
+bool | isEventOrdered (const std::string &name) const |
+ | Returns true if event is ordered.
|
+ |
+const Event::Subscribers & | getEventSubscribers (const std::string &name) const |
+ | Returns all event subscribers.
|
+ |
+bool | isEventHasSubscribers (const std::string &name) const |
+ | Returns true if event has subscribers.
|
+ |
+void | runEvent (const std::string &name) |
+ | Calls all event subscribers.
|
+ |
+bool | tryRunEvent (const std::string &name) |
+ | Calls all event subscribers if event exist.
|
+ |
void | runOrderedEvents () |
| Runs all ordered events.
|
|
-void | subscribeToEvent (const string &name, const std::function< void()> &onEvent) |
- | Adds a new event subscriber.
|
- |
-void | unsubscribeFromEvent (const string &name, const std::function< void()> &onEvent) |
- | Removes existing event subscriber.
|
- |
-bool | trySubscribeToEvent (const string &name, const std::function< void()> &onEvent) |
- | Adds a new event subscriber if not exist.
|
- |
-bool | tryUnsubscribeFromEvent (const string &name, const std::function< void()> &onEvent) |
- | Removes existing event subscriber if exist.
|
- |
+void | subscribeToEvent (const std::string &name, const std::function< void()> &onEvent) |
+ | Adds a new event subscriber.
|
+ |
+void | unsubscribeFromEvent (const std::string &name, const std::function< void()> &onEvent) |
+ | Removes existing event subscriber.
|
+ |
+bool | trySubscribeToEvent (const std::string &name, const std::function< void()> &onEvent) |
+ | Adds a new event subscriber if not exist.
|
+ |
+bool | tryUnsubscribeFromEvent (const std::string &name, const std::function< void()> &onEvent) |
+ | Removes existing event subscriber if exist.
|
+ |
const Systems & | getSystems () const noexcept |
| Returns all manager systems.
|
|
@@ -314,10 +310,6 @@
bool isInitialized () const noexcept |
| Returns true if manager is initialized.
|
|
-
-bool | isRunning () const noexcept |
- | Returns true if manager is currently running.
|
- |
void | initialize () |
| Initializes all created systems.
|
|
@@ -327,9 +319,6 @@
void | start () |
| Enters update loop. Executes update() on each tick.
|
|
-void | stop () noexcept |
- | Stops update loop.
|
- |
void | disposeGarbageComponents () |
| Actually destroys garbage components.
|
|
@@ -370,10 +359,17 @@
| Returns class singleton or manager instance if exist.
|
|