8#include <Common/assertion.h>
9#include <Utility/INoCopyAndMove.h>
10#include <Utility/TUniquePtrVector.h>
11#include <Utility/Concurrent/TSPSCExecutor.h>
12#include <Utility/TSpan.h>
25class System final :
private INoCopyAndMove
35 void addScene(std::unique_ptr<Scene> scene);
52 void waitAllFileReadingWorks();
53 void processQueries();
54 void clearRemovingScenes();
55 void clearRemovedScenes();
60 TUniquePtrVector<Scene> m_sceneStorage;
61 std::vector<Scene*> m_scenes;
62 std::vector<Scene*> m_removingScenes;
63 std::vector<Scene*> m_removedScenes;
65 TSPSCExecutor<FileReadingWork> m_fileReadingThread;
76 return m_removingScenes;
81 return m_removedScenes;
86 m_queryManager.addQuery(std::move(query));
103 m_sys.waitAllFileReadingWorks();
108 m_sys.processQueries();
113 m_sys.clearRemovingScenes();
118 m_sys.clearRemovedScenes();
Definition RenderThreadUpdateContext.h:11
Definition TConcurrentQueryManager.h:21
Definition GraphicsContext.h:24
A scene for the editor renderer only.
Definition Scene.h:34
void clearRemovingScenes()
Definition System.h:111
void clearRemovedScenes()
Definition System.h:116
void waitAllFileReadingWorks()
Definition System.h:101
System * operator->()
Definition System.h:121
SystemController(System &sys)
Definition System.h:97
void processQueries()
Definition System.h:106
~System()
Definition System.cpp:63
System(ghi::GraphicsContext &graphicsCtx)
Definition System.cpp:31
TSpan< Scene * > getRemovedScenes()
Definition System.h:79
TSpan< Scene * > getScenes()
Definition System.h:69
std::function< void(void)> FileReadingWork
Definition System.h:28
void addScene(std::unique_ptr< Scene > scene)
Definition System.cpp:74
void addFileReadingWork(FileReadingWork work)
Add a file reading work, which may run on another thread. Behavior controlled by config::ENABLE_RENDE...
Definition System.cpp:97
void removeScene(Scene *scene)
Definition System.cpp:86
RenderThreadUpdateContext updateCtx
Definition System.h:30
void addQuery(Query query)
Definition System.h:84
TSpan< Scene * > getRemovingScenes()
Definition System.h:74
ghi::GraphicsContext & getGraphicsContext()
Definition System.h:89
Definition PlatformDisplay.h:13
Definition DesignerObject.h:19