1 | /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ |
2 | /* If you are missing that file, acquire a complete release at teeworlds.com. */ |
3 | #ifndef ENGINE_ENGINE_H |
4 | #define ENGINE_ENGINE_H |
5 | |
6 | #include "kernel.h" |
7 | |
8 | #include <memory> |
9 | |
10 | class CFutureLogger; |
11 | class IJob; |
12 | class ILogger; |
13 | |
14 | class IEngine : public IInterface |
15 | { |
16 | MACRO_INTERFACE("engine" ) |
17 | |
18 | public: |
19 | virtual ~IEngine() = default; |
20 | |
21 | virtual void Init() = 0; |
22 | virtual void AddJob(std::shared_ptr<IJob> pJob) = 0; |
23 | virtual void ShutdownJobs() = 0; |
24 | virtual void SetAdditionalLogger(std::shared_ptr<ILogger> &&pLogger) = 0; |
25 | }; |
26 | |
27 | extern IEngine *CreateEngine(const char *pAppname, std::shared_ptr<CFutureLogger> pFutureLogger, int Jobs); |
28 | extern IEngine *CreateTestEngine(const char *pAppname, int Jobs); |
29 | |
30 | #endif |
31 | |