YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
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
"
5
# include "
YAPOG/System/IntTypes.hpp
"
6
# include "
YAPOG/System/Network/ServerSocket.hpp
"
7
# include "
YAPOG/Collection/List.hpp
"
8
# include "
YAPOG/System/Thread/Thread.hpp
"
9
# include "
YAPOG/System/Path.hpp
"
10
# include "
YAPOG/Graphics/Vector2.hpp
"
11
# include "
YAPOG/System/Time/Timer.hpp
"
12
# include "
YAPOG/Database/DatabaseManager.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
{
31
DISALLOW_COPY
(
Server
);
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
();
52
void
InitWorldObjectStateFactory
();
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_
;
64
yap::ServerSocket
socket_
;
65
yap::Mutex
socketMutex_
;
66
yap::Thread
listeningThread_
;
67
68
yap::Int16
port_
;
69
70
ClientManager
clients_
;
71
yap::Mutex
clientsMutex_
;
72
73
World
world_
;
74
yap::Mutex
worldMutex_
;
75
yap::Timer
worldUpdateTimer_
;
76
77
yap::ContentManager
&
contentManager_
;
78
79
yap::ObjectFactory
&
objectFactory_
;
80
yap::WorldObjectStateFactory
&
worldObjectStateFactory_
;
81
82
yap::Logger
&
logger_
;
83
yap::DatabaseManager
databaseManager_
;
84
yap::Mutex
databaseManagerMutex_
;
85
};
86
}
// namespace yse
87
88
#endif // YAPOG_SERVER_SERVER_HPP
YAPOG.Server
include
Server
Server.hpp
Generated on Mon Sep 17 2012 22:24:22 for YAPOG by
1.8.1.1