1 /*************************************************************************** 2 * Mechanized Assault and Exploration Reloaded Projectfile * 3 * * 4 * This program is free software; you can redistribute it and/or modify * 5 * it under the terms of the GNU General Public License as published by * 6 * the Free Software Foundation; either version 2 of the License, or * 7 * (at your option) any later version. * 8 * * 9 * This program is distributed in the hope that it will be useful, * 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 * GNU General Public License for more details. * 13 * * 14 * You should have received a copy of the GNU General Public License * 15 * along with this program; if not, write to the * 16 * Free Software Foundation, Inc., * 17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 18 ***************************************************************************/ 19 20 #ifndef game_startup_network_host_networkhostgameH 21 #define game_startup_network_host_networkhostgameH 22 23 #include <memory> 24 #include <string> 25 26 #include "game/startup/game.h" 27 #include "maxrconfig.h" 28 #include "ui/graphical/game/control/gameguicontroller.h" 29 30 class cClient; 31 class cServer; 32 class cTCP; 33 34 class cNetworkHostGame : public cGame 35 { 36 public: 37 ~cNetworkHostGame(); 38 39 virtual void run() MAXR_OVERRIDE_FUNCTION; 40 41 virtual void save (int saveNumber, const std::string& saveName) MAXR_OVERRIDE_FUNCTION; 42 43 void setNetwork (std::shared_ptr<cTCP> network); 44 protected: 45 std::shared_ptr<cTCP> network; 46 47 std::shared_ptr<cClient> localClient; 48 std::unique_ptr<cServer> server; 49 50 std::unique_ptr<cGameGuiController> gameGuiController; 51 }; 52 53 #endif // game_startup_network_host_networkhostgameH 54