galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
galaxy::SystemManager Class Referencefinal

Manages the systems assigned to it. More...

#include <SystemManager.hpp>

+ Collaboration diagram for galaxy::SystemManager:

Public Member Functions

 SystemManager () noexcept
 Constructor.
 
 SystemManager (SystemManager &&) noexcept
 Move constructor.
 
SystemManageroperator= (SystemManager &&) noexcept
 Move assignment operator.
 
 ~SystemManager () noexcept
 Destructor.
 
void add_system (const std::string &system)
 Add a system to operate on entities in this scene.
 
void update (EntityManager &em, Scene *scene)
 Process all systems.
 
void suspend () noexcept
 Suspend all running systems.
 
void resume () noexcept
 Resume all systems.
 
void clear ()
 Remove all systems.
 
SystemStackstack () noexcept
 Get list of systems.
 

Private Member Functions

SystemManageroperator= (const SystemManager &)=delete
 Copy assignment operator.
 
 SystemManager (const SystemManager &)=delete
 Copy constructor.
 

Private Attributes

SystemStack m_systems
 List of systems to process.
 
bool m_suspended
 Are systems allowed to run.
 

Detailed Description

Manages the systems assigned to it.

A system belongs to a scene and operates on it and the shared entities.

Definition at line 22 of file SystemManager.hpp.

Constructor & Destructor Documentation

◆ SystemManager() [1/3]

galaxy::SystemManager::SystemManager ( )
noexcept

Constructor.

Definition at line 12 of file SystemManager.cpp.

◆ SystemManager() [2/3]

galaxy::SystemManager::SystemManager ( SystemManager && sm)
noexcept

Move constructor.

Definition at line 17 of file SystemManager.cpp.

◆ ~SystemManager()

galaxy::SystemManager::~SystemManager ( )
noexcept

Destructor.

Definition at line 34 of file SystemManager.cpp.

◆ SystemManager() [3/3]

galaxy::SystemManager::SystemManager ( const SystemManager & )
privatedelete

Copy constructor.

Member Function Documentation

◆ operator=() [1/2]

SystemManager & galaxy::SystemManager::operator= ( SystemManager && sm)
noexcept

Move assignment operator.

Definition at line 23 of file SystemManager.cpp.

◆ add_system()

void galaxy::SystemManager::add_system ( const std::string & system)

Add a system to operate on entities in this scene.

Scene is called in order of adding. So i.e. if you add anim then render, systems are called in that order.

Parameters
systemName of system to add to this scene.

Definition at line 38 of file SystemManager.cpp.

+ Here is the caller graph for this function:

◆ update()

void galaxy::SystemManager::update ( EntityManager & em,
Scene * scene )

Process all systems.

Parameters
emEntities to process.
sceneScene this system belongs to.

Definition at line 44 of file SystemManager.cpp.

+ Here is the caller graph for this function:

◆ suspend()

void galaxy::SystemManager::suspend ( )
noexcept

Suspend all running systems.

Definition at line 55 of file SystemManager.cpp.

+ Here is the caller graph for this function:

◆ resume()

void galaxy::SystemManager::resume ( )
noexcept

Resume all systems.

Definition at line 60 of file SystemManager.cpp.

+ Here is the caller graph for this function:

◆ clear()

void galaxy::SystemManager::clear ( )

Remove all systems.

Definition at line 65 of file SystemManager.cpp.

+ Here is the caller graph for this function:

◆ stack()

SystemStack & galaxy::SystemManager::stack ( )
nodiscardnoexcept

Get list of systems.

Returns
System stack.

Definition at line 70 of file SystemManager.cpp.

+ Here is the caller graph for this function:

◆ operator=() [2/2]

SystemManager & galaxy::SystemManager::operator= ( const SystemManager & )
privatedelete

Copy assignment operator.

Member Data Documentation

◆ m_systems

SystemStack galaxy::SystemManager::m_systems
private

List of systems to process.

Definition at line 99 of file SystemManager.hpp.

◆ m_suspended

bool galaxy::SystemManager::m_suspended
private

Are systems allowed to run.

Definition at line 104 of file SystemManager.hpp.


The documentation for this class was generated from the following files: