_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

parameters.h
Go to the documentation of this file.
1 // _________ __ __
2 // / _____// |_____________ _/ |______ ____ __ __ ______
3 // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
4 // / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ |
5 // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
6 // \/ \/ \//_____/ \/
7 // ______________________ ______________________
8 // T H E W A R B E G I N S
9 // Stratagus - A free fantasy real time strategy game engine
10 //
12 //
13 // (c) Copyright 1998-2013 by Joris Dauphin
14 //
15 // This program is free software; you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation; only version 2 of the License.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 // 02111-1307, USA.
28 //
29 
30 #ifndef PARAMATERS_H
31 #define PARAMATERS_H
32 
34 {
35 public:
36  void SetDefaultValues();
38 
39  void SetUserDirectory(const std::string &path) {
40  if (path.size() == 0) {
41  SetDefaultUserDirectory(true);
42  } else {
43  userDirectory = path;
44  }
45  }
46  const std::string &GetUserDirectory() const { return userDirectory; }
47 
48 private:
49  void SetDefaultUserDirectory(bool noPortable = false);
50 
51 public:
52  std::string applicationName;
53  std::string luaStartFilename;
55  std::string luaScriptArguments;
56  std::string LocalPlayerName;
57  bool benchmark = false;
58 private:
59  std::string userDirectory;
60 public:
62 };
63 
64 #endif /* PARAMATERS_H */
Parameters::benchmark
bool benchmark
Name of local player.
Definition: parameters.h:57
Parameters::luaStartFilename
std::string luaStartFilename
Definition: parameters.h:53
Parameters::luaEditorStartFilename
std::string luaEditorStartFilename
Definition: parameters.h:54
Parameters
Definition: parameters.h:33
Parameters::GetUserDirectory
const std::string & GetUserDirectory() const
Definition: parameters.h:46
Parameters::applicationName
std::string applicationName
Definition: parameters.h:52
Parameters::LocalPlayerName
std::string LocalPlayerName
Definition: parameters.h:56
Parameters::luaScriptArguments
std::string luaScriptArguments
Definition: parameters.h:55
Parameters::Instance
static Parameters Instance
Directory containing user settings and data.
Definition: parameters.h:61
Parameters::SetDefaultValues
void SetDefaultValues()
Definition: parameters.cpp:46
Parameters::SetUserDirectory
void SetUserDirectory(const std::string &path)
Definition: parameters.h:39
Parameters::SetLocalPlayerNameFromEnv
void SetLocalPlayerNameFromEnv()
Definition: parameters.cpp:108
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.