StateManager
Handles app state management.
#include "State/StateManager.h"
Inherits from Module
Public Functions
| Name | |
|---|---|
| StateManager() =default | |
| void | addOriginator(IStateful * originator) |
| bool | appendScene(const fs::path & path) |
| bool | canRedo() const |
| bool | canUndo() const |
| const fs::path | fetchTmpDirectory()<br>Returns the temporary directory path just like getTmpDirectory() but creates it if it doesn't exist yet. |
| Scene * | getCurrentScene() |
| const Memento & | getCurrentState() const |
| int | getMementosCount() const |
| int | getPossibleRedosCount() const |
| int | getPossibleUndosCount() const |
| const fs::path | getTmpDirectory() const |
| fs::path | getTmpDirectoryLockFileName() |
| bool | hasScene() |
| bool | isDirty() const |
| bool | loadGlobal() |
| bool | loadScene(const fs::path & path) |
| void | loadUserData() |
| void | newScene(bool firstRun =false) |
| virtual void | onBeginFrame() override |
| virtual void | onClose() override |
| virtual void | onEndFrame() override |
| virtual void | onInit() override |
| void | redo() |
| void | requestRewritableSnapshot() |
| void | requestSnapshot() |
| void | resetGlobal() |
| bool | saveGlobal() |
| bool | saveScene() |
| bool | saveScene(const fs::path & scene) |
| void | saveUserData() |
| void | takeSnapshot() |
| void | undo() |
| bool | isValidScenePath(const fs::path path) |
Friends
| Name | |
|---|---|
| class | Application |
Additional inherited members
Public Functions inherited from Module
| Name | |
|---|---|
| Module() =default | |
| virtual | ~Module() =default |
| virtual void | onBeforeFrame() |
| virtual void | onUpdate(double deltaSeconds) |
Public Functions Documentation
function StateManager
cpp
StateManager() =defaultfunction addOriginator
cpp
inline void addOriginator(
IStateful * originator
)function appendScene
cpp
bool appendScene(
const fs::path & path
)function canRedo
cpp
bool canRedo() constfunction canUndo
cpp
bool canUndo() constfunction fetchTmpDirectory
cpp
const fs::path fetchTmpDirectory()Returns the temporary directory path just like getTmpDirectory() but creates it if it doesn't exist yet.
function getCurrentScene
cpp
inline Scene * getCurrentScene()function getCurrentState
cpp
const Memento & getCurrentState() constfunction getMementosCount
cpp
int getMementosCount() constfunction getPossibleRedosCount
cpp
int getPossibleRedosCount() constTodoTest me!
function getPossibleUndosCount
cpp
int getPossibleUndosCount() constfunction getTmpDirectory
cpp
const fs::path getTmpDirectory() constfunction getTmpDirectoryLockFileName
cpp
inline fs::path getTmpDirectoryLockFileName()function hasScene
cpp
inline bool hasScene()Return: Whether a previously saved scene is currently loaded.
function isDirty
cpp
inline bool isDirty() constfunction loadGlobal
cpp
bool loadGlobal()function loadScene
cpp
bool loadScene(
const fs::path & path
)function loadUserData
cpp
void loadUserData()function newScene
cpp
void newScene(
bool firstRun =false
)function onBeginFrame
cpp
virtual void onBeginFrame() overrideReimplements: Module::onBeginFrame
function onClose
cpp
virtual void onClose() overrideReimplements: Module::onClose
function onEndFrame
cpp
virtual void onEndFrame() overrideReimplements: Module::onEndFrame
function onInit
cpp
virtual void onInit() overrideReimplements: Module::onInit
function redo
cpp
void redo()function requestRewritableSnapshot
cpp
inline void requestRewritableSnapshot()function requestSnapshot
cpp
inline void requestSnapshot()function resetGlobal
cpp
void resetGlobal()function saveGlobal
cpp
bool saveGlobal()function saveScene
cpp
bool saveScene()function saveScene
cpp
bool saveScene(
const fs::path & scene
)function saveUserData
cpp
void saveUserData()function takeSnapshot
cpp
void takeSnapshot()function undo
cpp
void undo()function isValidScenePath
cpp
static bool isValidScenePath(
const fs::path path
)Friends
friend Application
cpp
friend class Application(
Application
);Updated on 2026-09-11 at 21:24:24 +0000