YAPOG  0.0.1
Yet Another Pokemon Online Game
Server.hpp
Go to the documentation of this file.
1 #ifndef YAPOG_SERVER_SERVER_HPP
2 # define YAPOG_SERVER_SERVER_HPP
3 
4 # include "YAPOG/Macros.hpp"
9 # include "YAPOG/System/Path.hpp"
13 
14 # include "World/World.hpp"
15 # include "Server/ClientManager.hpp"
16 
17 namespace yap
18 {
19  class ContentManager;
20  class ObjectFactory;
21  class WorldObjectStateFactory;
22  class Logger;
23 } // namespace yap
24 
25 namespace yse
26 {
27  class ClientSession;
28 
29  class Server
30  {
32 
33  public:
34 
35  Server ();
36 
37  void Init ();
38  void Launch ();
39  void Stop ();
40 
41  private:
42 
43  void AddClient (ClientSession* client);
44 
45  void HandleListening ();
46 
47  void Dispose ();
48 
49  void InitRandom ();
50  void InitContentManager (const yap::Path& contentRootPath);
51  void InitObjectFactory ();
53 
54  void InitLoggerManager ();
55 
56  void LoadMaps ();
57 
58  static const bool DEFAULT_RUNNING_STATE;
59  static const yap::Int16 DEFAULT_PORT;
60 
61  static const float DEFAULT_WORLD_UPDATE_RATE;
62 
63  bool isRunning_;
67 
69 
72 
76 
78 
81 
85  };
86 } // namespace yse
87 
88 #endif // YAPOG_SERVER_SERVER_HPP