1 /*! \file   ODApplication.cpp
2  *  \author Ogre team, andrewbuck, oln, StefanP.MUC
3  *  \date   07 April 2011
4  *  \brief  Class ODApplication containing everything to start the game
5  *
6  *  Copyright (C) 2011-2016  OpenDungeons Team
7  *
8  *  This program is free software: you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation, either version 3 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef ODAPPLICATION_H
23 #define ODAPPLICATION_H
24 
25 #include <string>
26 
27 namespace boost
28 {
29 namespace program_options
30 {
31 class variables_map;
32 }
33 }
34 
35 namespace Ogre {
36 class Root;
37 }
38 
39 class LogManager;
40 
41 //! \brief Base class which manages the startup of OpenDungeons.
42 class ODApplication
43 {
44 public:
ODApplication()45     ODApplication()
46     {}
~ODApplication()47     ~ODApplication()
48     {}
49 
50     //! \brief Initializes the Application along with the ResourceManager
51     void startGame(boost::program_options::variables_map& options);
52 
53     static double turnsPerSecond;
54     static const std::string VERSION;
55     static const std::string VERSIONSTRING;
56     static const std::string POINTER_INFO_STRING;
57     static std::string MOTD;
58 
59 private:
60     ODApplication(const ODApplication&) = delete;
61     ODApplication& operator=(const ODApplication&) = delete;
62 
63     //! \brief Normal launch mode. Creates everything to be client and server
64     void startClient();
65     //! \brief Server mode. Creates only the needed to launch a level. Note that this is to be used without gui
66     void startServer();
67 };
68 
69 #endif // ODAPPLICATION_H
70