- Doh! I forgot to svn move two files...

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@622 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
elvez 2006-06-12 14:08:00 +00:00
parent 1706119e4d
commit c381ee8875
2 changed files with 27 additions and 27 deletions

View File

@ -1,4 +1,4 @@
// src/global_settings.cc - Copyright 2005, 2006, University // src/global_preferences.cc - Copyright 2005, 2006, University
// of Padova, dept. of Pure and Applied // of Padova, dept. of Pure and Applied
// Mathematics // Mathematics
// //
@ -19,63 +19,63 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h" #include "config.h"
#include "global_settings.hh" #include "global_preferences.hh"
using namespace sgpem; using namespace sgpem;
GlobalSettings* GlobalSettings::_instance = 0; GlobalPreferences* GlobalPreferences::_instance = 0;
GlobalSettings& GlobalPreferences&
GlobalSettings::instance() GlobalPreferences::instance()
{ {
if(!_instance) if(!_instance)
_instance = new GlobalSettings(); _instance = new GlobalPreferences();
return *_instance; return *_instance;
} }
GlobalSettings::GlobalSettings() GlobalPreferences::GlobalPreferences()
: _mod_dirs(1, PLUGDIR), _pol_dirs(1, POLDIR) : _mod_dirs(1, PLUGDIR), _pol_dirs(1, POLDIR)
{} {}
GlobalSettings::dir_iterator GlobalPreferences::dir_iterator
GlobalSettings::policies_dir_begin() const GlobalPreferences::policies_dir_begin() const
{ {
return _pol_dirs.begin(); return _pol_dirs.begin();
} }
GlobalSettings::dir_iterator GlobalPreferences::dir_iterator
GlobalSettings::policies_dir_end() const GlobalPreferences::policies_dir_end() const
{ {
return _pol_dirs.end(); return _pol_dirs.end();
} }
GlobalSettings::dir_iterator GlobalPreferences::dir_iterator
GlobalSettings::modules_dir_begin() const GlobalPreferences::modules_dir_begin() const
{ {
return _mod_dirs.begin(); return _mod_dirs.begin();
} }
GlobalSettings::dir_iterator GlobalPreferences::dir_iterator
GlobalSettings::modules_dir_end() const GlobalPreferences::modules_dir_end() const
{ {
return _mod_dirs.end(); return _mod_dirs.end();
} }
void void
GlobalSettings::add_modules_dir(const Glib::ustring& moddir) GlobalPreferences::add_modules_dir(const Glib::ustring& moddir)
{ {
_mod_dirs.insert(_mod_dirs.begin(), moddir); _mod_dirs.insert(_mod_dirs.begin(), moddir);
} }
void void
GlobalSettings::add_policies_dir(const Glib::ustring& poldir) GlobalPreferences::add_policies_dir(const Glib::ustring& poldir)
{ {
_pol_dirs.insert(_pol_dirs.begin(), poldir); _pol_dirs.insert(_pol_dirs.begin(), poldir);
} }

View File

@ -1,4 +1,4 @@
// src/global_settings.hh - Copyright 2005, 2006, University // src/global_preferences.hh - Copyright 2005, 2006, University
// of Padova, dept. of Pure and Applied // of Padova, dept. of Pure and Applied
// Mathematics // Mathematics
// //
@ -18,8 +18,8 @@
// along with SGPEMv2; if not, write to the Free Software // along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef GLOBAL_SETTINGS_HH #ifndef GLOBAL_PREFERENCES_HH
#define GLOBAL_SETTINGS_HH 1 #define GLOBAL_PREFERENCES_HH 1
#include "config.h" #include "config.h"
@ -27,17 +27,17 @@
#include <vector> #include <vector>
namespace sgpem { namespace sgpem {
class GlobalSettings; class GlobalPreferences;
} }
#include "config.h" #include "config.h"
namespace sgpem { namespace sgpem {
class SG_DLLEXPORT GlobalSettings { class SG_DLLEXPORT GlobalPreferences {
public: public:
typedef std::vector<Glib::ustring>::const_iterator dir_iterator; typedef std::vector<Glib::ustring>::const_iterator dir_iterator;
static GlobalSettings& instance(); static GlobalPreferences& instance();
dir_iterator modules_dir_begin() const; dir_iterator modules_dir_begin() const;
dir_iterator modules_dir_end() const; dir_iterator modules_dir_end() const;
@ -49,11 +49,11 @@ namespace sgpem {
void add_policies_dir(const Glib::ustring& poldir); void add_policies_dir(const Glib::ustring& poldir);
private: private:
GlobalSettings(); GlobalPreferences();
GlobalSettings(const GlobalSettings&); GlobalPreferences(const GlobalPreferences&);
GlobalSettings& operator=(const GlobalSettings&); GlobalPreferences& operator=(const GlobalPreferences&);
static GlobalSettings* _instance; static GlobalPreferences* _instance;
std::vector<Glib::ustring> _mod_dirs; std::vector<Glib::ustring> _mod_dirs;
std::vector<Glib::ustring> _pol_dirs; std::vector<Glib::ustring> _pol_dirs;
}; };