1 | #ifndef ENGINE_HPP_ |
2 | #define ENGINE_HPP_ |
3 |
|
4 |
|
5 | #include <chrono> |
6 | #include <atomic> |
7 | #include <vector> |
8 |
|
9 | #include "ZydecoCommon.hpp" |
10 | #include "ThreadLooping.hpp" |
11 | #include "IEventQuitSubscriber.hpp" |
12 | #include "IUpdateable.hpp" |
13 |
|
14 |
|
15 | class IEventHandler; |
16 | class Renderer; |
17 |
|
18 |
|
19 | class Engine : public IEventQuitSubscriber |
20 | { |
21 | public: |
22 | Engine(IEventHandler& r_event_handler, Renderer& r_renderer); |
23 | ~Engine(); |
24 |
|
25 | void OnQuitEvent() override; |
26 |
|
27 | void Execute(); |
28 |
|
29 | protected: |
30 | IEventHandler& m_rEventHandler; |
31 | Renderer& m_rRenderer; |
32 |
|
33 | std::vector<ThreadLooping*> m_threads; |
34 | std::atomic<bool> m_aIsExiting; |
35 | }; |
36 |
|
37 |
|
38 | #endif /* ENGINE_HPP_ */ |
39 |
|