DDraceNetwork Docs
engine.h
Go to the documentation of this file.
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
10class CFutureLogger;
11class IJob;
12class ILogger;
13
14class IEngine : public IInterface
15{
17
18public:
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
27extern IEngine *CreateEngine(const char *pAppname, std::shared_ptr<CFutureLogger> pFutureLogger, int Jobs);
28extern IEngine *CreateTestEngine(const char *pAppname, int Jobs);
29
30#endif
Definition: logger.h:233
Definition: engine.h:15
virtual void AddJob(std::shared_ptr< IJob > pJob)=0
virtual void SetAdditionalLogger(std::shared_ptr< ILogger > &&pLogger)=0
virtual void ShutdownJobs()=0
virtual void Init()=0
Definition: kernel.h:10
Definition: jobs.h:20
Definition: logger.h:67
Definition: jobs.cpp:14
IEngine * CreateTestEngine(const char *pAppname, int Jobs)
Definition: engine.cpp:109
IEngine * CreateEngine(const char *pAppname, std::shared_ptr< CFutureLogger > pFutureLogger, int Jobs)
Definition: engine.cpp:108
#define MACRO_INTERFACE(Name)
Definition: kernel.h:25