sgpemv2/src/backend/global_settings.hh
tchernobog 92e6f3be2b - Add copyright notices to existing builtin python policies
- Implement system to dinamically pass plugins and policies search paths to
the sgpemv2 binary and tests (class GlobalSettings)
- Drastically reduce usage of hardcoded paths in code except as 
default overridable values


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@514 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-03-09 10:49:41 +00:00

63 lines
1.7 KiB
C++

// src/global_settings.hh - Copyright 2005, 2006, University
// of Padova, dept. of Pure and Applied
// Mathematics
//
// This file is part of SGPEMv2.
//
// This is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// SGPEMv2 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// 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
#include "config.h"
#include <glibmm/ustring.h>
#include <vector>
namespace sgpem {
class GlobalSettings;
}
#include "config.h"
namespace sgpem {
class SG_DLLEXPORT GlobalSettings {
public:
typedef std::vector<Glib::ustring>::const_iterator dir_iterator;
static GlobalSettings& instance();
dir_iterator modules_dir_begin() const;
dir_iterator modules_dir_end() const;
dir_iterator policies_dir_begin() const;
dir_iterator policies_dir_end() const;
void add_modules_dir(const Glib::ustring& moddir);
void add_policies_dir(const Glib::ustring& poldir);
private:
GlobalSettings();
GlobalSettings(const GlobalSettings&);
GlobalSettings& operator=(const GlobalSettings&);
static GlobalSettings* _instance;
std::vector<Glib::ustring> _mod_dirs;
std::vector<Glib::ustring> _pol_dirs;
};
}
#endif