StateManager
Handles app state management.
#include "State/StateManager.h"
Inherits from Module
Public Functions
Name | |
---|---|
StateManager() =default | |
void | addOriginator(IStateful * originator) |
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 | onInit() override |
void | redo() |
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 | onEndFrame() |
virtual void | onUpdate(double deltaSeconds) |
Public Functions Documentation
function StateManager
cpp
StateManager() =default
StateManager() =default
function addOriginator
cpp
inline void addOriginator(
IStateful * originator
)
inline void addOriginator(
IStateful * originator
)
function canRedo
cpp
bool canRedo() const
bool canRedo() const
function canUndo
cpp
bool canUndo() const
bool canUndo() const
function fetchTmpDirectory
cpp
const fs::path fetchTmpDirectory()
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()
inline Scene * getCurrentScene()
function getCurrentState
cpp
const Memento & getCurrentState() const
const Memento & getCurrentState() const
function getMementosCount
cpp
int getMementosCount() const
int getMementosCount() const
function getPossibleRedosCount
cpp
int getPossibleRedosCount() const
int getPossibleRedosCount() const
TodoTest me!
function getPossibleUndosCount
cpp
int getPossibleUndosCount() const
int getPossibleUndosCount() const
function getTmpDirectory
cpp
const fs::path getTmpDirectory() const
const fs::path getTmpDirectory() const
function getTmpDirectoryLockFileName
cpp
inline fs::path getTmpDirectoryLockFileName()
inline fs::path getTmpDirectoryLockFileName()
function hasScene
cpp
inline bool hasScene()
inline bool hasScene()
Return: Whether a previously saved scene is currently loaded.
function isDirty
cpp
inline bool isDirty() const
inline bool isDirty() const
function loadGlobal
cpp
bool loadGlobal()
bool loadGlobal()
function loadScene
cpp
bool loadScene(
const fs::path & path
)
bool loadScene(
const fs::path & path
)
function loadUserData
cpp
void loadUserData()
void loadUserData()
function newScene
cpp
void newScene(
bool firstRun =false
)
void newScene(
bool firstRun =false
)
function onBeginFrame
cpp
virtual void onBeginFrame() override
virtual void onBeginFrame() override
Reimplements: Module::onBeginFrame
function onClose
cpp
virtual void onClose() override
virtual void onClose() override
Reimplements: Module::onClose
function onInit
cpp
virtual void onInit() override
virtual void onInit() override
Reimplements: Module::onInit
function redo
cpp
void redo()
void redo()
function resetGlobal
cpp
void resetGlobal()
void resetGlobal()
function saveGlobal
cpp
bool saveGlobal()
bool saveGlobal()
function saveScene
cpp
bool saveScene()
bool saveScene()
function saveScene
cpp
bool saveScene(
const fs::path & scene
)
bool saveScene(
const fs::path & scene
)
function saveUserData
cpp
void saveUserData()
void saveUserData()
function takeSnapshot
cpp
void takeSnapshot()
void takeSnapshot()
function undo
cpp
void undo()
void undo()
function isValidScenePath
cpp
static bool isValidScenePath(
const fs::path path
)
static bool isValidScenePath(
const fs::path path
)
Friends
friend Application
cpp
friend class Application(
Application
);
friend class Application(
Application
);
Updated on 2024-11-06 at 20:16:53 +0000