IStateful
#include "State/Stateful.h"
Inherited by Core::ResourceManager, 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() =0
virtual void clearGlobal() =0
Set the global state to some default empty state.
Reimplemented by: Core::ResourceManager::clearGlobal, WorkspaceWindow::clearGlobal, Vp::Viewport::clearGlobal
function clearScene
virtual void clearScene() =0
virtual void clearScene() =0
Set the scene state to some default empty state.
Reimplemented by: Core::ResourceManager::clearScene, WorkspaceWindow::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
) =0
virtual void loadGlobal(
const Memento & memento
) =0
Load global state from a memento.
Parameters:
- memento New global state
Reimplemented by: Core::ResourceManager::loadGlobal, WorkspaceWindow::loadGlobal, Vp::Viewport::loadGlobal
function loadScene
virtual void loadScene(
const Memento & memento,
State::Scene * scene
) =0
virtual void loadScene(
const Memento & memento,
State::Scene * scene
) =0
Called 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, Vp::Viewport::loadScene
function saveGlobal
virtual Memento saveGlobal() =0
virtual Memento saveGlobal() =0
Save shared global state.
Reimplemented by: Core::ResourceManager::saveGlobal, WorkspaceWindow::saveGlobal, Vp::Viewport::saveGlobal
function saveScene
virtual Memento saveScene(
State::Scene * scene
) =0
virtual Memento saveScene(
State::Scene * scene
) =0
Save state for the current scene.
Parameters:
- scene The current scene or nullptr (in case of undo/redo)
Reimplemented by: WorkspaceWindow::saveScene, Core::ResourceManager::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 2024-11-06 at 20:16:53 +0000