]> cygwin.com Git - cygwin-apps/setup.git/blob - UserSettings.h
2003-07-30 Robert Collins <rbtcollins@hotmail.com>
[cygwin-apps/setup.git] / UserSettings.h
1 /*
2 * Copyright (c) 2003, Robert Collins.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
11 *
12 * Written by Robert Collins <rbtcollins@hotmail.com>
13 *
14 */
15
16 #ifndef SETUP_USERSETTINGS_H
17 #define SETUP_USERSETTINGS_H
18
19 /* A collection of user-related settings */
20
21 #include <vector>
22
23 class io_stream;
24 class UserSetting;
25 class String;
26 class UserSettings {
27 public:
28 static UserSettings &Instance();
29 void registerSetting(UserSetting &);
30 void deRegisterSetting(UserSetting &);
31 void loadAllSettings();
32 void saveAllSettings();
33 io_stream * settingFileForLoad(String const &relativeName) const;
34 io_stream * settingFileForSave(String const &relativeName) const;
35 private:
36 static UserSettings Instance_;
37 typedef std::vector<UserSetting *> Settings;
38 void init();
39 int inited;
40 Settings settings;
41 };
42
43 #endif /* SETUP_USERSETTINGS_H */
This page took 0.035894 seconds and 5 git commands to generate.