Rebuild autotool system
[construo.git] / config.hxx
blob3e0e15146e55c19d9e97c71e46f97575ad5f1f65
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>
24 #include <stdlib.h>
26 class Config
28 private:
29 std::string home_dir;
30 std::string construo_dir;
32 public:
33 Config () {
34 char* home = getenv ("HOME");
35 if (home) {
36 home_dir = home;
37 } else {
38 home_dir = ".";
40 construo_dir = home_dir + "/.construo/";
43 ~Config () {
46 /** Returns the home directory or the current directory */
47 std::string get_home ()
49 return home_dir;
52 /** Returns the directory to which construo will save its
53 quicksave's and manual saves */
54 std::string get_construo_dir () {
55 return construo_dir;
59 #endif
61 /* EOF */