The system manager is responsible for keeping track and dispatching updates to all attached systems.
More...
#include <CeresEngine/Entity/SystemManager.hpp>
The system manager is responsible for keeping track and dispatching updates to all attached systems.
◆ SystemManager() [1/2]
| CeresEngine::SystemManager::SystemManager |
( |
EntityManager & |
entityManager | ) |
|
|
explicit |
Creates a new system manager,.
- Parameters
-
| entityManager | The entity manager to be used by systems |
◆ SystemManager() [2/2]
◆ ~SystemManager()
| CeresEngine::SystemManager::~SystemManager |
( |
| ) |
|
Destroys the system manager.
◆ add()
template<CSystemImplementation S, typename... Args>
| S & CeresEngine::SystemManager::add |
( |
Args &&... |
args | ) |
|
Adds a new system of type S.
- Template Parameters
-
| S | the type of the system implementation |
| Args | the system constructor argument types |
- Parameters
-
| args | The system constructor arguments |
- Returns
- A reference to the created system
◆ get()
template<CSystem S>
| S & CeresEngine::SystemManager::get |
( |
| ) |
|
Gets a system of type S.
- Template Parameters
-
| S | the type of the system to be retrieved |
- Returns
- A reference to the system of type
S.
◆ has()
template<CSystem S>
| bool CeresEngine::SystemManager::has |
( |
| ) |
|
|
noexcept |
Checks if the manager contains a system of type S.
- Template Parameters
-
| S | the type of the system to be checked |
- Returns
- True if the system contains a system of type
S, false otherwise.
◆ operator=()
◆ remove()
template<CSystem S>
| void CeresEngine::SystemManager::remove |
( |
| ) |
|
Removes a system of type S.
- Template Parameters
-
| S | the type of the system to be removed |
◆ sort()
| void CeresEngine::SystemManager::sort |
( |
| ) |
|
|
privatenoexcept |
Updates the system priority sorted list.
◆ update() [1/2]
| void CeresEngine::SystemManager::update |
( |
double |
time | ) |
|
Updates all systems.
Dispatches a update(double) call to all systems.
- Parameters
-
| time | The time elapsed since the last update call. |
◆ update() [2/2]
template<CSystem S>
| bool CeresEngine::SystemManager::update |
( |
double |
time | ) |
|
Update a specific system of type S.
Dispatches a update(double) call only to the system of type S. If no such system type is present, this method does nothing.
- Template Parameters
-
| S | the type of the system to be updated |
- Parameters
-
| time | The time elapsed since the last update call. |
- Returns
- True if the system was present and updated, false otherwise.
◆ mEntityManager
The entity manager to be used by systems.
◆ mSortedSystems
A vector of all attached systems.
Already sorted according to their respective update order.
◆ mSystems
A vector of all attached systems. Sorted by their ´SystemID`.
The documentation for this class was generated from the following file:
- /Users/Rogiel/Developer/CeresEngine/Engine/Sources/CeresEngine/Entity/SystemManager.hpp