IStateful ​
#include "State/Stateful.h"
Inherited by Core::ResourceManager, I3TApplication, UIModule, ViewportModule, WorkspaceModule
Public Functions ​
| Name | |
|---|---|
| virtual | ~IStateful() |
| virtual void | appendScene(const Memento & memento, State::Scene * scene) =0<br>Called on scene append. |
| virtual void | clearGlobal() =0<br>Set the global state to some default empty state. |
| virtual void | clearScene(bool newScene) =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 appendScene ​
virtual void appendScene(
const Memento & memento,
State::Scene * scene
) =0virtual void appendScene(
const Memento & memento,
State::Scene * scene
) =0Called on scene append.
Parameters:
- scene The current scene
- memento Scene state to appended
Reimplemented by: WorkspaceModule::appendScene, Core::ResourceManager::appendScene, UIModule::appendScene, ViewportModule::appendScene, I3TApplication::appendScene
function clearGlobal ​
virtual void clearGlobal() =0virtual void clearGlobal() =0Set the global state to some default empty state.
Reimplemented by: Core::ResourceManager::clearGlobal, UIModule::clearGlobal, ViewportModule::clearGlobal, WorkspaceModule::clearGlobal, I3TApplication::clearGlobal
function clearScene ​
virtual void clearScene(
bool newScene
) =0virtual void clearScene(
bool newScene
) =0Set the scene state to some default empty state.
Parameters:
- newScene Whether to perform basic new scene initialization.
Reimplemented by: Core::ResourceManager::clearScene, UIModule::clearScene, ViewportModule::clearScene, WorkspaceModule::clearScene, I3TApplication::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, UIModule::loadGlobal, ViewportModule::loadGlobal, WorkspaceModule::loadGlobal, I3TApplication::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: WorkspaceModule::loadScene, Core::ResourceManager::loadScene, UIModule::loadScene, ViewportModule::loadScene, I3TApplication::loadScene
function saveGlobal ​
virtual Memento saveGlobal() =0virtual Memento saveGlobal() =0Save shared global state.
Reimplemented by: Core::ResourceManager::saveGlobal, UIModule::saveGlobal, ViewportModule::saveGlobal, WorkspaceModule::saveGlobal, I3TApplication::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: WorkspaceModule::saveScene, Core::ResourceManager::saveScene, UIModule::saveScene, ViewportModule::saveScene, I3TApplication::saveScene
The scene parameter should contain a scene object for full filesystem saves and nullptr for quick undo/redo operations.
Updated on 2026-05-21 at 15:39:35 +0000