| 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 void Init() = 0; |
| 20 | virtual void AddJob(std::shared_ptr<IJob> pJob) = 0; |
| 21 | virtual void ShutdownJobs() = 0; |
| 22 | virtual void SetAdditionalLogger(std::shared_ptr<ILogger> &&pLogger) = 0; |
| 23 | }; |
| 24 | |
| 25 | extern IEngine *CreateEngine(const char *pAppname, std::shared_ptr<CFutureLogger> pFutureLogger); |
| 26 | extern IEngine *CreateTestEngine(const char *pAppname); |
| 27 | |
| 28 | #endif |
| 29 | |