Fixed autotools stuff
[construo.git] / config.hxx
blobd8c9b7e0acfc8e5b3df8a01d6d27425e3d47a650
1 // $Id: config.hxx,v 1.1 2002/11/20 00:46:11 grumbel Exp $
2 //
3 // Construo - A wire-frame construction game
4 // Copyright (C) 2002 Ingo Ruhnke <grumbel@gmx.de>
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #ifndef CONFIG_HH
21 #define CONFIG_HH
23 #include <string>
25 class Config
27 private:
28 std::string home_dir;
29 std::string construo_dir;
31 public:
32 Config () {
33 char* home = getenv ("HOME");
34 if (home) {
35 home_dir = home;
36 } else {
37 home_dir = ".";
39 construo_dir = home_dir + "/.construo/";
42 ~Config () {
45 /** Returns the home directory or the current directory */
46 std::string get_home ()
48 return home_dir;
51 /** Returns the directory to which construo will save its
52 quicksave's and manual saves */
53 std::string get_construo_dir () {
54 return construo_dir;
58 #endif
60 /* EOF */