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 "IEventQuitSubscriber.hpp" |
11 | #include "IUpdateable.hpp" |
12 |
|
13 |
|
14 | class IEventHandler; |
15 | class IWindow; |
16 | class ITimer; |
17 | class Renderer; |
18 |
|
19 |
|
20 | class Engine : public IEventQuitSubscriber |
21 | { |
22 | public: |
23 | Engine(IEventHandler& r_event_handler, IWindow& r_window, ITimer& r_core_timer, Renderer& r_renderer); |
24 | ~Engine(); |
25 |
|
26 | void OnQuitEvent() override; |
27 |
|
28 | void Execute(); |
29 |
|
30 | protected: |
31 | std::vector<IUpdateable*> m_jobs; |
32 | bool m_isExiting = false; |
33 | }; |
34 |
|
35 |
|
36 | #endif /* ENGINE_HPP_ */ |
37 |
|