![]() |
galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
|
State machine for managing scenes. More...
#include <SceneManager.hpp>
Inheritance diagram for galaxy::SceneManager:
Collaboration diagram for galaxy::SceneManager:Public Member Functions | |
| SceneManager () noexcept | |
| Constructor. | |
| SceneManager (SceneManager &&) | |
| Move constructor. | |
| SceneManager & | operator= (SceneManager &&) |
| Move assignment operator. | |
| virtual | ~SceneManager () |
| Destructor. | |
| void | on_event (SDL_Event &event) |
| Handle an event for a scene. | |
| void | update () |
| Process events and updates. | |
| void | render () |
| Render scenes. | |
| void | clear () |
| Removes all data. | |
Public Member Functions inherited from galaxy::StateMachine< Scene > | |
| StateMachine () noexcept | |
| Constructor. | |
| StateMachine (StateMachine< Stored > &&) | |
| Move constructor. | |
| StateMachine< Stored > & | operator= (StateMachine< Stored > &&) |
| Move assignment operator. | |
| virtual | ~StateMachine () |
| Destructor. | |
| std::shared_ptr< Stored > | add (const std::string &key, Args &&... args) |
| Add a new state. | |
| std::shared_ptr< Stored > | get (const std::string &key) noexcept |
| Get a specific state. | |
| bool | has (const std::string &key) noexcept |
| Does a state exist. | |
| void | remove (const std::string &key) |
| Remove a specific state. | |
| void | push (const std::string &key) noexcept |
| Push a state onto the top of stack. | |
| void | pop () noexcept |
| Remove state on top of stack. | |
| void | pop_all () noexcept |
| Remove all states in stack. | |
| std::shared_ptr< Stored > | top () const noexcept |
| Get top state in stack. | |
| Stack & | stack () noexcept |
| Get stack. | |
| Map & | storage () noexcept |
| Get storage. | |
Private Member Functions | |
| SceneManager (const SceneManager &)=delete | |
| Copy constructor. | |
| SceneManager & | operator= (const SceneManager &)=delete |
| Copy assignment operator. | |
Private Attributes | |
| EntityManager | m_entity_manager |
| Entities belonging to all scenes. | |
Additional Inherited Members | |
Protected Attributes inherited from galaxy::StateMachine< Scene > | |
| Stack | m_stack |
| State stack. | |
| Map | m_storage |
| State cache. | |
State machine for managing scenes.
Definition at line 21 of file SceneManager.hpp.
|
noexcept |
Constructor.
Definition at line 12 of file SceneManager.cpp.
| galaxy::SceneManager::SceneManager | ( | SceneManager && | w | ) |
Move constructor.
Definition at line 17 of file SceneManager.cpp.
|
virtual |
Destructor.
Definition at line 32 of file SceneManager.cpp.
Here is the call graph for this function:
|
privatedelete |
Copy constructor.
| SceneManager & galaxy::SceneManager::operator= | ( | SceneManager && | w | ) |
Move assignment operator.
Definition at line 22 of file SceneManager.cpp.
Here is the call graph for this function:| void galaxy::SceneManager::on_event | ( | SDL_Event & | event | ) |
Handle an event for a scene.
| e | Event that was triggered. |
Definition at line 37 of file SceneManager.cpp.
Here is the call graph for this function:| void galaxy::SceneManager::update | ( | ) |
Process events and updates.
Definition at line 45 of file SceneManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::SceneManager::render | ( | ) |
Render scenes.
Definition at line 53 of file SceneManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::SceneManager::clear | ( | ) |
Removes all data.
Definition at line 61 of file SceneManager.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatedelete |
Copy assignment operator.
|
private |
Entities belonging to all scenes.
Definition at line 81 of file SceneManager.hpp.