- 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
// Mathematics
//
@ -19,63 +19,63 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include "global_settings.hh"
#include "global_preferences.hh"
using namespace sgpem;
GlobalSettings* GlobalSettings::_instance = 0;
GlobalPreferences* GlobalPreferences::_instance = 0;
GlobalSettings&
GlobalSettings::instance()
GlobalPreferences&
GlobalPreferences::instance()
{
if(!_instance)
_instance = new GlobalSettings();
_instance = new GlobalPreferences();
return *_instance;
}
GlobalSettings::GlobalSettings()
GlobalPreferences::GlobalPreferences()
: _mod_dirs(1, PLUGDIR), _pol_dirs(1, POLDIR)
{}
GlobalSettings::dir_iterator
GlobalSettings::policies_dir_begin() const
GlobalPreferences::dir_iterator
GlobalPreferences::policies_dir_begin() const
{
return _pol_dirs.begin();
}
GlobalSettings::dir_iterator
GlobalSettings::policies_dir_end() const
GlobalPreferences::dir_iterator
GlobalPreferences::policies_dir_end() const
{
return _pol_dirs.end();
}
GlobalSettings::dir_iterator
GlobalSettings::modules_dir_begin() const
GlobalPreferences::dir_iterator
GlobalPreferences::modules_dir_begin() const
{
return _mod_dirs.begin();
}
GlobalSettings::dir_iterator
GlobalSettings::modules_dir_end() const
GlobalPreferences::dir_iterator
GlobalPreferences::modules_dir_end() const
{
return _mod_dirs.end();
}
void
GlobalSettings::add_modules_dir(const Glib::ustring& moddir)
GlobalPreferences::add_modules_dir(const Glib::ustring& moddir)
{
_mod_dirs.insert(_mod_dirs.begin(), moddir);
}
void
GlobalSettings::add_policies_dir(const Glib::ustring& poldir)
GlobalPreferences::add_policies_dir(const Glib::ustring& 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
// Mathematics
//
@ -18,8 +18,8 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef GLOBAL_SETTINGS_HH
#define GLOBAL_SETTINGS_HH 1
#ifndef GLOBAL_PREFERENCES_HH
#define GLOBAL_PREFERENCES_HH 1
#include "config.h"
@ -27,17 +27,17 @@
#include <vector>
namespace sgpem {
class GlobalSettings;
class GlobalPreferences;
}
#include "config.h"
namespace sgpem {
class SG_DLLEXPORT GlobalSettings {
class SG_DLLEXPORT GlobalPreferences {
public:
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_end() const;
@ -49,11 +49,11 @@ namespace sgpem {
void add_policies_dir(const Glib::ustring& poldir);
private:
GlobalSettings();
GlobalSettings(const GlobalSettings&);
GlobalSettings& operator=(const GlobalSettings&);
GlobalPreferences();
GlobalPreferences(const GlobalPreferences&);
GlobalPreferences& operator=(const GlobalPreferences&);
static GlobalSettings* _instance;
static GlobalPreferences* _instance;
std::vector<Glib::ustring> _mod_dirs;
std::vector<Glib::ustring> _pol_dirs;
};