]>
cygwin.com Git - cygwin-apps/setup.git/blob - UserSettings.cc
2 * Copyright (c) 2003, Robert Collins
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.
9 * A copy of the GNU General Public License can be found at
12 * Written by Robert Collins <rbtcollins@hotmail.com>
17 static const char *cvsid
=
29 #include "LogSingleton.h"
30 #include "io_stream.h"
33 #include "Exception.h"
34 #include "UserSettings.h"
39 UserSettings::Instance()
42 if (Instance_
.inited
!= 42)
53 UserSettings
UserSettings::Instance_
;
56 UserSettings::registerSetting(UserSetting
&aSetting
)
58 settings
.push_back(&aSetting
);
62 UserSettings::deRegisterSetting(UserSetting
&aSetting
)
64 Settings::iterator i
= find(settings
.begin(), settings
.end(), &aSetting
);
65 if (i
== settings
.end())
66 throw new Exception ("__LINE__ __FILE__", String ("Attempt to deregister non registered setting!"), APPERR_LOGIC_ERROR
);
This page took 0.035899 seconds and 5 git commands to generate.