Orxonox  0.0.5 Codename: Arcturus
CoreConfig.h
Go to the documentation of this file.
1 /*
2  * ORXONOX - the hottest 3D action shooter ever to exist
3  * > www.orxonox.net <
4  *
5  *
6  * License notice:
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (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, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  * Author:
23  * Fabian 'x3n' Landau
24  * Co-authors:
25  * ...
26  *
27  */
28 
29 #ifndef _CoreConfig_H__
30 #define _CoreConfig_H__
31 
32 #include "core/CorePrereqs.h"
33 
35 
36 namespace orxonox
37 {
38  class _CoreExport CoreConfig : virtual public Configurable
39  {
40  public:
41  CoreConfig();
42 
43  void setConfigValues();
44 
46  inline bool inDevMode(void) const
47  { return this->bDevMode_; }
48 
49  inline bool getStartIOConsole() const
50  { return this->bStartIOConsole_; }
51 
52  void updateLastLevelTimestamp();
53  inline long long getLastLevelTimestamp() const
54  { return this->lastLevelTimestamp_; }
55 
56  void updateOgreConfigTimestamp();
57  inline long long getOgreConfigTimestamp() const
58  { return this->ogreConfigTimestamp_; }
59 
60  private:
61  void devModeChanged();
62  void languageChanged();
63  void initRandomNumberGenerator();
64 
65  bool bDevMode_;
69  long long lastLevelTimestamp_;
71  };
72 
74  class DevModeListener : virtual public Listable
75  {
76  public:
78  virtual ~DevModeListener() = default;
79  virtual void devModeChanged(bool value) = 0;
80  };
81 }
82 
83 #endif /* _CoreConfig_H__ */
long long ogreConfigTimestamp_
Timestamp wehen the ogre config level was modified.
Definition: CoreConfig.h:70
bool inDevMode(void) const
Developers bit. If returns false, some options are not available as to not confuse the normal user...
Definition: CoreConfig.h:46
Listable stores the entries of all object lists pointing to this instance.
Definition: Listable.h:50
Shared library macros, enums, constants and forward declarations for the core library ...
::std::string string
Definition: gtest-port.h:756
Informs about changes in the Development Mode.
Definition: CoreConfig.h:74
std::string language_
The language.
Definition: CoreConfig.h:66
This is the base class of all objects which may contain config values.
Definition: Configurable.h:47
Definition: CoreConfig.h:38
bool bDevMode_
Developers bit. If set to false, some options are not available as to not confuse the normal user...
Definition: CoreConfig.h:65
long long getOgreConfigTimestamp() const
Definition: CoreConfig.h:57
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
#define _CoreExport
Definition: CorePrereqs.h:61
Declaration of Configurable, the base class of all objects which may contain config values...
long long getLastLevelTimestamp() const
Definition: CoreConfig.h:53
long long lastLevelTimestamp_
Timestamp when the last level was started.
Definition: CoreConfig.h:69
bool getStartIOConsole() const
Definition: CoreConfig.h:49
bool bStartIOConsole_
Set to false if you don&#39;t want to use the IOConsole.
Definition: CoreConfig.h:68
bool bInitRandomNumberGenerator_
If true, srand(time(0)) is called.
Definition: CoreConfig.h:67