-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathEngine.h
More file actions
44 lines (33 loc) · 853 Bytes
/
Engine.h
File metadata and controls
44 lines (33 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef __ENGINE_H__
#define __ENGINE_H__
#include <memory>
#include <thread>
namespace network {
class Connection;
} // namespace network;
namespace engine {
namespace detail {
class Engine_impl;
} // namespace detail
class Engine
{
public:
static Engine& Singleton();
bool Run(const std::string& init_file);
void Stop();
private:
std::unique_ptr<detail::Engine_impl> impl_;
void OnAcceptCallback(const network::Connection& connection);
void OnReceiveCallback(const network::Connection& connection);
void OnAbortCallback(const network::Connection& connection);
public:
Engine();
~Engine();
private:
Engine(const Engine& rhs) = delete;
Engine(Engine&& rhs) = delete;
Engine& operator=(const Engine& rhs) = delete;
Engine& operator=(Engine&& rhs) = delete;
};
} // namespace engine
#endif