3 Copyright (c) 2009, Christopher Faylor
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 A copy of the GNU General Public License can be found at http://www.gnu.org
13 #ifndef SETUP_USERSETTINGS_H
14 #define SETUP_USERSETTINGS_H
17 #include "io_stream.h"
33 static class UserSettings
*global
;
35 static UserSettings
& instance() {return *global
;}
37 const char *get (const char *);
38 unsigned int get_index (const char *key
);
39 io_stream
*open (const char *); // opens an iostream you can write to set the value of key
40 const char *set (const char *, const char *);
41 const char *set (const char *key
, const std::string val
) {return set (key
, val
.c_str ());}
42 void load (std::string local_dir
);
46 void extend_table (ssize_t
);
47 io_stream
*open_settings (const char *, std::string
&);
51 #endif // SETUP_USERSETTINGS_H