SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MapServer.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2018 SEGS Team (see Authors.txt)
5  * This software is licensed! (See License.txt for details)
6  */
7 
8 #pragma once
9 
11 #include "GameServer/GameServer.h"
12 //#include "Entity.h"
13 #include "MapLink.h"
14 
15 #include <memory>
16 
17 class Net;
18 class MapServerEndpoint;
19 struct MapClientSession;
20 class MapInstance;
21 class MapServerData;
22 class MapManager;
23 
24 class MapServer : public EventProcessor
25 {
26  class PrivateData;
27 public:
28  MapServer(uint8_t id);
29  ~MapServer(void) override;
30 
31  bool ReadConfigAndRestart();
32 
33  bool ShutDown();
36  void sett_game_server_owner(uint8_t owner_id);
37 private:
38  bool Run(void);
39  // EventProcessor interface
40  void dispatch(SEGSEvent *ev) override;
41  void on_expect_client(struct ExpectMapClientRequest *ev);
42 
43  std::unique_ptr<PrivateData> d;
44 
45  uint8_t m_id = 1;
46  uint8_t m_owner_game_server_id = 255;
47  QString m_serverName;
48  ACE_INET_Addr m_base_location;
49  ACE_INET_Addr m_base_listen_point;
50  MapInstance * m_handler = nullptr;
51 };
Definition: MapClientSession.h:32
Definition: SEGSEvent.h:32
~MapServer(void) override
Definition: MapServer.cpp:62
The MapServer::PrivateData class - PIMPL idiom for internal MapServer data.
Definition: MapServer.cpp:47
Definition: MapServerData.h:23
Definition: MapInstance.h:35
MapServerData & runtimeData()
Definition: MapServer.cpp:135
bool ReadConfigAndRestart()
Definition: MapServer.cpp:82
Definition: MapServer.h:24
MapManager & map_manager()
Definition: MapServer.cpp:130
MapServer(uint8_t id)
Definition: MapServer.cpp:55
Definition: MapManager.h:20
void sett_game_server_owner(uint8_t owner_id)
Definition: MapServer.cpp:140
Definition: EventProcessor.h:13
MapServer * g_GlobalMapServer
Definition: MapServer.cpp:35
bool ShutDown()
Definition: MapServer.cpp:121