IStateful
#include "State/Stateful.h"
Inherited by Core::ResourceManager, UIModule, Vp::Viewport, WorkspaceWindow
Public Functions
| Name | |
|---|---|
| virtual | ~IStateful() |
| virtual void | clearGlobal() =0<br>Set the global state to some default empty state. |
| virtual void | clearScene() =0<br>Set the scene state to some default empty state. |
| Memento | emptyMemento()<br>Create an empty memento (rapidjson::Document) |
| virtual void | loadGlobal(const Memento & memento) =0<br>Load global state from a memento. |
| virtual void | loadScene(const Memento & memento, State::Scene * scene) =0<br>Called on scene load, undo and redo. |
| virtual Memento | saveGlobal() =0<br>Save shared global state. |
| virtual Memento | saveScene(State::Scene * scene) =0<br>Save state for the current scene. |
Public Functions Documentation
function ~IStateful
inline virtual ~IStateful()inline virtual ~IStateful()function clearGlobal
virtual void clearGlobal() =0virtual void clearGlobal() =0Set the global state to some default empty state.
Reimplemented by: Core::ResourceManager::clearGlobal, WorkspaceWindow::clearGlobal, UIModule::clearGlobal, Vp::Viewport::clearGlobal
function clearScene
virtual void clearScene() =0virtual void clearScene() =0Set the scene state to some default empty state.
Reimplemented by: Core::ResourceManager::clearScene, WorkspaceWindow::clearScene, UIModule::clearScene, Vp::Viewport::clearScene
function emptyMemento
inline Memento emptyMemento()inline Memento emptyMemento()Create an empty memento (rapidjson::Document)
function loadGlobal
virtual void loadGlobal(
const Memento & memento
) =0virtual void loadGlobal(
const Memento & memento
) =0Load global state from a memento.
Parameters:
- memento New global state
Reimplemented by: Core::ResourceManager::loadGlobal, WorkspaceWindow::loadGlobal, UIModule::loadGlobal, Vp::Viewport::loadGlobal
function loadScene
virtual void loadScene(
const Memento & memento,
State::Scene * scene
) =0virtual void loadScene(
const Memento & memento,
State::Scene * scene
) =0Called on scene load, undo and redo.
Parameters:
- scene The current scene or nullptr (in case of undo/redo)
- memento New scene state
Reimplemented by: WorkspaceWindow::loadScene, Core::ResourceManager::loadScene, UIModule::loadScene, Vp::Viewport::loadScene
function saveGlobal
virtual Memento saveGlobal() =0virtual Memento saveGlobal() =0Save shared global state.
Reimplemented by: Core::ResourceManager::saveGlobal, WorkspaceWindow::saveGlobal, UIModule::saveGlobal, Vp::Viewport::saveGlobal
function saveScene
virtual Memento saveScene(
State::Scene * scene
) =0virtual Memento saveScene(
State::Scene * scene
) =0Save state for the current scene.
Parameters:
- scene The current scene or nullptr (in case of undo/redo)
Reimplemented by: WorkspaceWindow::saveScene, Core::ResourceManager::saveScene, UIModule::saveScene, Vp::Viewport::saveScene
The scene parameter should contain a scene object for full filesystem saves and nullptr for quick undo/redo operations.
Updated on 2025-09-07 at 16:13:50 +0000