Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/core3/src/orxonox/Settings.h @ 1755

Last change on this file since 1755 was 1596, checked in by landauf, 16 years ago
  • added feature to add a callback function to configvalues. they get called if the value changes. an examples is in Core.cc.
  • changed the SetConfigValue macro and the Identifier::updateConfigValues() function to work properly with inherited classes in both possible cases: 1) they overwrite the config-value or 2) they don't. an example is ParticleProjectile that defines it's own speed_ configvalue.
  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
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 *      Reto Grieder
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29/**
30    @file Core.h
31    @brief Definition of the Settings class.
32
33    The static Settings class is only used to configure some variables
34    through the config-file.
35*/
36
37#ifndef _Settings_H__
38#define _Settings_H__
39
40#include "OrxonoxPrereqs.h"
41#include <string>
42#include "core/OrxonoxClass.h"
43
44namespace orxonox
45{
46  class _OrxonoxExport Settings : public OrxonoxClass
47  {
48    public:
49      void setConfigValues();
50      void dataPathChanged();
51
52      static const std::string& getDataPath();
53
54      static void tsetDataPath(const std::string& path);
55
56    private:
57      Settings();
58      Settings(const Settings& instance);
59      ~Settings();
60      static Settings& getSingleton();
61
62      void _tsetDataPath(const std::string& path);
63
64      std::string dataPath_;               //!< Path to the game data
65  };
66}
67
68#endif /* _Settings_H__ */
Note: See TracBrowser for help on using the repository browser.