- Fix all includes, separating header files to be installed

from other headers. Take it while it's hot.
- To all those that lock source files: you'll burn in hell. Really.
It'll be painful, dreadful and above all *long*. *Eternally* long.
And there'll be Freddy Mercury and The Queen playing, *all the time*, 
day after boring, useless, sorrowful day. The song
will be *``Radio Ga-Ga''*, in secula secularum amen.


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1033 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-09-07 00:43:00 +00:00
parent 6458511399
commit 0f718f2899
156 changed files with 547 additions and 521 deletions

View File

@ -44,6 +44,9 @@ gladedir = $(sharedir)/glade
localedir = @datadir@/locale
aclocaldir = @datadir@/aclocal
# used for installing templates include files
templatesdir = $(pkgincludedir)/templates
#define empty global variables
bin_PROGRAMS =
pkglib_LTLIBRARIES =
@ -51,6 +54,7 @@ plugin_LTLIBRARIES =
noinst_HEADERS =
noinst_DATA =
pkginclude_HEADERS =
templates_HEADERS =
EXTRA_DIST =
MAINTAINERCLEANFILES =
MOSTLYCLEANFILES =
@ -133,7 +137,7 @@ pkglib_LTLIBRARIES += src/backend/libbackend.la
src_backend_libbackend_la_CPPFLAGS = \
-I@top_srcdir@ \
-I@top_srcdir@/src/templates \
-I@top_srcdir@/src/backend \
-DPOLDIR="\"$(policiesdir)\"" \
-DPLUGDIR="\"$(plugindir)\"" \
-DLOCALEDIR="\"$(localedir)\"" \
@ -207,43 +211,45 @@ src_backend_libbackend_la_SOURCES = \
# For headers used internally by the backend, see below.
pkginclude_HEADERS += \
config.h \
src/backend/cpu_policies_gatekeeper.hh \
src/backend/cpu_policy.hh \
src/backend/cpu_policy_exception.hh \
src/backend/cpu_policy_manager.hh \
src/backend/default_resource_policy_manager.hh \
src/backend/environment.hh \
src/backend/global_preferences.hh \
src/backend/history.hh \
src/backend/history_observer.hh \
src/backend/holt_graph.hh \
src/backend/invalid_plugin_exception.hh \
src/backend/key_file.hh \
src/backend/malformed_policy_exception.hh \
src/backend/module.hh \
src/backend/null_policy_exception.hh \
src/backend/policy_parameters.hh \
src/backend/plugin.hh \
src/backend/plugin_manager.hh \
src/backend/ready_queue.hh \
src/backend/request.hh \
src/backend/resource.hh \
src/backend/resource_policies_gatekeeper.hh \
src/backend/resource_policy.hh \
src/backend/resource_policy_lifo.hh \
src/backend/resource_policy_manager.hh \
src/backend/process.hh \
src/backend/schedulable.hh \
src/backend/scheduler.hh \
src/backend/serialize_visitor.hh \
src/backend/serializer.hh \
src/backend/serializer_error.hh \
src/backend/serializers_gatekeeper.hh \
src/backend/simulation.hh \
src/backend/simulation_observer.hh \
src/backend/sub_request.hh \
src/backend/thread.hh \
src/backend/user_interrupt_exception.hh
src/backend/sgpemv2/cpu_policies_gatekeeper.hh \
src/backend/sgpemv2/cpu_policy.hh \
src/backend/sgpemv2/cpu_policy_exception.hh \
src/backend/sgpemv2/cpu_policy_manager.hh \
src/backend/sgpemv2/default_resource_policy_manager.hh \
src/backend/sgpemv2/environment.hh \
src/backend/sgpemv2/global_preferences.hh \
src/backend/sgpemv2/history.hh \
src/backend/sgpemv2/history_observer.hh \
src/backend/sgpemv2/holt_graph.hh \
src/backend/sgpemv2/invalid_plugin_exception.hh \
src/backend/sgpemv2/key_file.hh \
src/backend/sgpemv2/malformed_policy_exception.hh \
src/backend/sgpemv2/module.hh \
src/backend/sgpemv2/null_policy_exception.hh \
src/backend/sgpemv2/policy_parameters.hh \
src/backend/sgpemv2/plugin.hh \
src/backend/sgpemv2/plugin_manager.hh \
src/backend/sgpemv2/ready_queue.hh \
src/backend/sgpemv2/request.hh \
src/backend/sgpemv2/resource.hh \
src/backend/sgpemv2/resource_policies_gatekeeper.hh \
src/backend/sgpemv2/resource_policy.hh \
src/backend/sgpemv2/resource_policy_lifo.hh \
src/backend/sgpemv2/resource_policy_manager.hh \
src/backend/sgpemv2/process.hh \
src/backend/sgpemv2/schedulable.hh \
src/backend/sgpemv2/scheduler.hh \
src/backend/sgpemv2/serialize_visitor.hh \
src/backend/sgpemv2/serializer.hh \
src/backend/sgpemv2/serializer_error.hh \
src/backend/sgpemv2/serializers_gatekeeper.hh \
src/backend/sgpemv2/simulation.hh \
src/backend/sgpemv2/simulation_observer.hh \
src/backend/sgpemv2/string_utils.hh \
src/backend/sgpemv2/sub_request.hh \
src/backend/sgpemv2/thread.hh \
src/backend/sgpemv2/user_interrupt_exception.hh
# Put here headers used internally by the backend
# They won't be installed for the end-user.
@ -262,8 +268,7 @@ noinst_HEADERS += \
src/backend/static_resource.hh \
src/backend/static_schedulable.hh \
src/backend/static_sub_request.hh \
src/backend/static_thread.hh \
src/backend/string_utils.hh
src/backend/static_thread.hh
# ############################################################
@ -277,7 +282,7 @@ bin_PROGRAMS += sgpemv2
sgpemv2_CPPFLAGS = \
-I@top_srcdir@ \
-I@top_srcdir@/src/templates \
-I@top_srcdir@/src/backend \
-DLOCALEDIR="\"$(localedir)\"" \
-DSHAREDIR="\"$(sharedir)\"" \
-DGLADEDIR="\"$(gladedir)\"" \
@ -349,14 +354,14 @@ glade_DATA = \
#
# ############################################################
pkginclude_HEADERS += \
src/templates/deletor.tcc \
src/templates/parameter.tcc \
src/templates/sequences.tcc \
src/templates/singleton.hh \
src/templates/singleton.tcc \
src/templates/smartp.hh \
src/templates/smartp.tcc
templates_HEADERS += \
src/backend/sgpemv2/templates/deletor.tcc \
src/backend/sgpemv2/templates/parameter.tcc \
src/backend/sgpemv2/templates/sequences.tcc \
src/backend/sgpemv2/templates/singleton.hh \
src/backend/sgpemv2/templates/singleton.tcc \
src/backend/sgpemv2/templates/smartp.hh \
src/backend/sgpemv2/templates/smartp.tcc
# ############################################################
#
@ -381,8 +386,7 @@ noinst_PROGRAMS = \
# src/testsuite/test-stepforward
src_testsuite_test_history_CPPFLAGS = \
-I@top_srcdir@/src \
-I@top_srcdir@/src/templates \
-I@top_srcdir@/src/backend \
$(GLIBMM_CFLAGS)
src_testsuite_test_history_LDFLAGS = \
src/backend/libbackend.la \
@ -405,8 +409,7 @@ src_testsuite_test_history_SOURCES = \
src/testsuite/test-history.cc
src_testsuite_test_global_preferences_serialization_CPPFLAGS = \
-I@top_srcdir@/src \
-I@top_srcdir@/src/templates \
-I@top_srcdir@/src/backend \
$(GLIBMM_CFLAGS)
src_testsuite_test_global_preferences_serialization_LDFLAGS = \
src/backend/libbackend.la \
@ -415,8 +418,7 @@ src_testsuite_test_global_preferences_serialization_SOURCES = \
src/testsuite/test-global_preferences_serialization.cc
src_testsuite_test_key_file_CPPFLAGS = \
-I@top_srcdir@/src \
-I@top_srcdir@/src/templates \
-I@top_srcdir@/src/backend \
$(GLIBMM_CFLAGS)
src_testsuite_test_key_file_LDFLAGS = \
src/backend/libbackend.la \
@ -426,7 +428,7 @@ src_testsuite_test_key_file_SOURCES = \
src_testsuite_test_cairo_widget_CPPFLAGS = \
-I@top_srcdir@/src \
-I@top_srcdir@/src/templates \
-I@top_srcdir@/src/backend \
$(CAIRO_CFLAGS) \
$(GTKMM_CFLAGS) \
$(GLIBMM_CFLAGS)
@ -441,7 +443,7 @@ src_testsuite_test_cairo_widget_SOURCES = \
src_testsuite_test_simulation_widget_CPPFLAGS = \
-I@top_srcdir@/src \
-I@top_srcdir@/src/templates \
-I@top_srcdir@/src/backend \
$(CAIRO_CFLAGS) \
$(GTKMM_CFLAGS) \
$(GLIBMM_CFLAGS) \
@ -460,7 +462,7 @@ src_testsuite_test_simulation_widget_SOURCES = \
src_testsuite_test_holt_widget_CPPFLAGS = \
-I@top_srcdir@/src \
-I@top_srcdir@/src/templates \
-I@top_srcdir@/src/backend \
$(CAIRO_CFLAGS) \
$(GTKMM_CFLAGS) \
$(GLIBMM_CFLAGS) \
@ -528,15 +530,15 @@ noinst_DATA += \
src/testsuite/scheduling-wizards/wizard-complex-test \
src/testsuite/scheduling-wizards/wizard-priority-inversion-porno \
src/testsuite/scheduling-wizards/wizard-priority-preemption-fail \
src/testsuite/scheduling-wizards/wizard-block-fail
# environments/DiscWorld_unblock.xgp \
# environments/Fantozzi_lifo_requests.xgp \
# environments/FruitsBasket_complex.xgp \
# environments/Matteo_deadlock.xgp \
# environments/Modernita_gap_terminated.xgp \
# environments/Porno_priority_inversion.xgp \
# environments/ScuolaDiMileto_assert_fail.xgp \
# environments/ScuolaDiMileto_block_fail.xgp \
# environments/ScuolaDiMileto_gap_blocked.xgp \
# environments/ScuolaDiMileto_gap_fail.xgp
src/testsuite/scheduling-wizards/wizard-block-fail \
src/testsuite/scheduling-wizards/environments/FruitsBasket_complex.xgp \
src/testsuite/scheduling-wizards/environments/Fantozzi_lifo_requests.xgp \
src/testsuite/scheduling-wizards/environments/ScuolaDiMileto_block_fail.xgp \
src/testsuite/scheduling-wizards/environments/ScuolaDiMileto_gap_blocked.xgp \
src/testsuite/scheduling-wizards/environments/ScuolaDiMileto_assert_fail.xgp \
src/testsuite/scheduling-wizards/environments/Matteo_deadlock.xgp \
src/testsuite/scheduling-wizards/environments/Modernita_gap_terminated.xgp \
src/testsuite/scheduling-wizards/environments/Matteo_preemption_fail.xgp \
src/testsuite/scheduling-wizards/environments/Porno_priority_inversion.xgp \
src/testsuite/scheduling-wizards/environments/ScuolaDiMileto_gap_fail.xgp \
src/testsuite/scheduling-wizards/environments/DiscWorld_unblock.xgp

View File

@ -2,7 +2,7 @@
prefix=@prefix@
exec_prefix=${prefix}
libdir=@abs_top_builddir@
includedir=@abs_top_srcdir@/src
includedir=@abs_top_srcdir@/src/backend
datarootdir=@datarootdir@
policies_dir=@datadir@/@PACKAGE@/policies
@ -15,4 +15,4 @@ URL: http://www.math.unipd.it/
Requires: glibmm-2.4 >= 2.8 gthread-2.0 >= 2.8
Libs: -L${libdir}/src/backend -lbackend
Libs.private: -lglibmm-2.4 -lgthread-2.0
Cflags: -I${includedir}/backend -I${includedir}/templates
Cflags: -I${includedir}

View File

@ -20,7 +20,7 @@
#include "config.h"
#include "plugin.hh"
#include <sgpemv2/plugin.hh>
#include "python_cpu_policy_manager.hh"
using namespace sgpem;

View File

@ -29,9 +29,9 @@
#include <iostream>
#include "cpu_policy.hh"
#include "user_interrupt_exception.hh"
#include "malformed_policy_exception.hh"
#include <sgpemv2/cpu_policy.hh>
#include <sgpemv2/user_interrupt_exception.hh>
#include <sgpemv2/malformed_policy_exception.hh>
namespace sgpem
{

View File

@ -19,10 +19,10 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "python_cpu_policy_manager.hh"
#include "global_preferences.hh"
#include "cpu_policies_gatekeeper.hh"
#include <sgpemv2/global_preferences.hh>
#include <sgpemv2/cpu_policies_gatekeeper.hh>
#include "deletor.tcc"
#include <sgpemv2/templates/deletor.tcc>
#include <Python.h>
#include <glibmm/ustring.h>

View File

@ -25,7 +25,7 @@
#include <Python.h>
#include "cpu_policy_manager.hh"
#include <sgpemv2/cpu_policy_manager.hh>
#include "python_cpu_policy.hh"
namespace sgpem

View File

@ -1,15 +1,16 @@
%module sgpem
%{
#include "cpu_policy.hh"
#include "cpu_policies_gatekeeper.hh"
#include "history.hh"
#include "policy_parameters.hh"
#include "process.hh"
#include "ready_queue.hh"
#include "schedulable.hh"
#include "scheduler.hh"
#include "simulation.hh"
#include "thread.hh"
#include <sgpemv2/cpu_policy.hh>
#include <sgpemv2/cpu_policies_gatekeeper.hh>
#include <sgpemv2/history.hh>
#include <sgpemv2/policy_parameters.hh>
#include <sgpemv2/process.hh>
#include <sgpemv2/ready_queue.hh>
#include <sgpemv2/schedulable.hh>
#include <sgpemv2/scheduler.hh>
#include <sgpemv2/simulation.hh>
#include <sgpemv2/thread.hh>
using namespace sgpem;
%}
/* NOTE : passing Unicode strings to C++ methods calling them

View File

@ -25,12 +25,12 @@
#include "../python_cpu_policy_manager.hh"
#include "../python_cpu_policy.hh"
#include "simulation.hh"
#include "global_preferences.hh"
#include "cpu_policies_gatekeeper.hh"
#include "simulation.hh"
#include "scheduler.hh"
#include "user_interrupt_exception.hh"
#include <sgpemv2/simulation.hh>
#include <sgpemv2/global_preferences.hh>
#include <sgpemv2/cpu_policies_gatekeeper.hh>
#include <sgpemv2/simulation.hh>
#include <sgpemv2/scheduler.hh>
#include <sgpemv2/user_interrupt_exception.hh>
#include <Python.h>
#include <glibmm/module.h>

View File

@ -20,7 +20,7 @@
#include "config.h"
#include "plugin.hh"
#include <sgpemv2/plugin.hh>
#include "xml_serializer.hh"
using namespace sgpem;

View File

@ -22,11 +22,11 @@
#include "xml_serializer_factory.hh"
#include "xml_visitor.hh"
#include "environment.hh"
#include "history.hh"
#include "process.hh"
#include "serializer_error.hh"
#include "string_utils.hh"
#include <sgpemv2/environment.hh>
#include <sgpemv2/history.hh>
#include <sgpemv2/process.hh>
#include <sgpemv2/serializer_error.hh>
#include <sgpemv2/string_utils.hh>
using namespace sgpem;

View File

@ -22,7 +22,7 @@
#define XML_SERIALIZER_HH 1
#include "config.h"
#include "serializer.hh"
#include <sgpemv2/serializer.hh>
#include <glibmm/ustring.h>
#include <libxml/parser.h>

View File

@ -20,11 +20,9 @@
#include "xml_serializer_factory.hh"
#include "string_utils.hh"
// #include "environment.hh"
#include "history.hh"
#include "resource.hh"
// #include "backend/process.hh"
#include <sgpemv2/string_utils.hh>
#include <sgpemv2/history.hh>
#include <sgpemv2/resource.hh>
using namespace sgpem;

View File

@ -22,9 +22,9 @@
#define XML_SERIALIZER_FACTORY_HH 1
#include "config.h"
#include "history.hh"
#include "environment.hh"
#include "serializer_error.hh"
#include <sgpemv2/history.hh>
#include <sgpemv2/environment.hh>
#include <sgpemv2/serializer_error.hh>
#include <glibmm/ustring.h>
#include <map>

View File

@ -22,15 +22,15 @@
#include "gettext.h"
#include "environment.hh"
#include "history.hh"
#include "process.hh"
#include "request.hh"
#include "resource.hh"
#include "serializer_error.hh"
#include "string_utils.hh"
#include "sub_request.hh"
#include "thread.hh"
#include <sgpemv2/environment.hh>
#include <sgpemv2/history.hh>
#include <sgpemv2/process.hh>
#include <sgpemv2/request.hh>
#include <sgpemv2/resource.hh>
#include <sgpemv2/serializer_error.hh>
#include <sgpemv2/string_utils.hh>
#include <sgpemv2/sub_request.hh>
#include <sgpemv2/thread.hh>
using namespace sgpem;

View File

@ -31,7 +31,7 @@ namespace sgpem
}
#include "config.h"
#include "serialize_visitor.hh"
#include <sgpemv2/serialize_visitor.hh>
#include <glibmm/ustring.h>
#include <libxml/xmlmemory.h>

View File

@ -19,11 +19,13 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "add_request_dialog.hh"
#include "templates/sequences.tcc"
#include "backend/history.hh"
#include "backend/environment.hh"
#include "backend/simulation.hh"
#include "backend/resource.hh"
#include <sgpemv2/templates/sequences.tcc>
#include <sgpemv2/history.hh>
#include <sgpemv2/environment.hh>
#include <sgpemv2/simulation.hh>
#include <sgpemv2/resource.hh>
#include <iostream>
#include <sstream>

View File

@ -22,11 +22,11 @@
#include "dynamic_process.hh"
#include "dynamic_resource.hh"
#include "dynamic_sub_request.hh"
#include "sub_request.hh"
#include "thread.hh"
#include <sgpemv2/sub_request.hh>
#include <sgpemv2/thread.hh>
#include "deletor.tcc"
#include "sequences.tcc"
#include <sgpemv2/templates/deletor.tcc>
#include <sgpemv2/templates/sequences.tcc>
#include <algorithm>
#include <cassert>

View File

@ -22,11 +22,11 @@
#define CONCRETE_ENVIRONMENT_HH 1
#include "config.h"
#include "environment.hh"
#include "resource.hh"
#include <sgpemv2/environment.hh>
#include <sgpemv2/resource.hh>
#include "dynamic_process.hh"
#include "dynamic_request.hh"
#include "ready_queue.hh"
#include <sgpemv2/ready_queue.hh>
namespace sgpem

View File

@ -32,11 +32,11 @@
#include "static_request.hh"
#include "static_sub_request.hh"
#include "history_observer.hh"
#include <sgpemv2/history_observer.hh>
#include "concrete_history.hh"
#include "deletor.tcc"
#include "smartp.tcc"
#include <sgpemv2/templates/deletor.tcc>
#include <sgpemv2/templates/smartp.tcc>
#include <algorithm>
#include <cassert>

View File

@ -29,7 +29,7 @@
#include "dynamic_resource.hh"
#include "dynamic_sub_request.hh"
#include "dynamic_thread.hh"
#include "history.hh"
#include <sgpemv2/history.hh>
#include <glibmm/ustring.h>

View File

@ -19,14 +19,14 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "concrete_simulation.hh"
#include "simulation_observer.hh"
#include "scheduler.hh"
#include "cpu_policies_gatekeeper.hh"
#include "resource_policies_gatekeeper.hh"
#include <sgpemv2/simulation_observer.hh>
#include <sgpemv2/scheduler.hh>
#include <sgpemv2/cpu_policies_gatekeeper.hh>
#include <sgpemv2/resource_policies_gatekeeper.hh>
#include <cassert>
#include "smartp.tcc"
#include <sgpemv2/templates/smartp.tcc>
#include <algorithm>
#include <cassert>

View File

@ -23,7 +23,7 @@
#include "config.h"
#include "simulation.hh"
#include <sgpemv2/simulation.hh>
#include "concrete_history.hh"
#include <map>

View File

@ -20,13 +20,13 @@
#include "config.h"
#include "cpu_policies_gatekeeper.hh"
#include "cpu_policy_manager.hh"
#include "cpu_policy.hh"
#include <sgpemv2/cpu_policies_gatekeeper.hh>
#include <sgpemv2/cpu_policy_manager.hh>
#include <sgpemv2/cpu_policy.hh>
#include "concrete_history.hh"
// Include full template definition only in implementation files:
#include "singleton.tcc"
#include <sgpemv2/templates/singleton.tcc>
#include <algorithm>
#include <cassert>

View File

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "cpu_policy.hh"
#include <sgpemv2/cpu_policy.hh>
using namespace std;
using namespace sgpem;

View File

@ -22,7 +22,7 @@
// It could be necessary to do dynamic type-checking when
// catching it (with typeinfo).
#include "malformed_policy_exception.hh"
#include <sgpemv2/malformed_policy_exception.hh>
using namespace sgpem;
CPUPolicyException::CPUPolicyException(const std::string& msg)

View File

@ -19,8 +19,10 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "cpu_policy_manager.hh"
#include "cpu_policies_gatekeeper.hh"
#include <sgpemv2/cpu_policy_manager.hh>
#include <sgpemv2/cpu_policies_gatekeeper.hh>
using namespace sgpem;
CPUPolicyManager::CPUPolicyManager()
{

View File

@ -19,9 +19,9 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "resource_policy_lifo.hh"
#include "default_resource_policy_manager.hh"
#include "resource_policies_gatekeeper.hh"
#include <sgpemv2/resource_policy_lifo.hh>
#include <sgpemv2/default_resource_policy_manager.hh>
#include <sgpemv2/resource_policies_gatekeeper.hh>
using namespace sgpem;

View File

@ -21,10 +21,10 @@
#include "dynamic_process.hh"
#include "static_process.hh"
#include "dynamic_thread.hh"
#include "serialize_visitor.hh"
#include <sgpemv2/serialize_visitor.hh>
#include "deletor.tcc"
#include "sequences.tcc"
#include <sgpemv2/templates/deletor.tcc>
#include <sgpemv2/templates/sequences.tcc>
#include <algorithm>
#include <functional>

View File

@ -24,11 +24,11 @@
#include "config.h"
#include "gettext.h"
#include "process.hh"
#include <sgpemv2/process.hh>
#include "dynamic_schedulable.hh"
#include "static_process.hh"
#include "smartp.tcc"
#include <sgpemv2/templates/smartp.tcc>
#include <glibmm/ustring.h>
#include <vector>

View File

@ -22,10 +22,10 @@
#include "static_request.hh"
#include "dynamic_sub_request.hh"
#include "dynamic_thread.hh"
#include "serialize_visitor.hh"
#include <sgpemv2/serialize_visitor.hh>
#include "deletor.tcc"
#include "smartp.tcc"
#include <sgpemv2/templates/deletor.tcc>
#include <sgpemv2/templates/smartp.tcc>
#include <algorithm>
#include <functional>

View File

@ -23,11 +23,11 @@
#include "config.h"
#include "request.hh"
#include <sgpemv2/request.hh>
#include "static_request.hh"
#include "dynamic_thread.hh"
#include "smartp.hh"
#include <sgpemv2/templates/smartp.hh>
#include <vector>

View File

@ -20,9 +20,9 @@
#include "dynamic_resource.hh"
#include "static_resource.hh"
#include "serialize_visitor.hh"
#include <sgpemv2/serialize_visitor.hh>
#include "smartp.tcc"
#include <sgpemv2/templates/smartp.tcc>
#include <cassert>

View File

@ -24,9 +24,9 @@
#include "config.h"
#include "glibmm/ustring.h"
#include "smartp.hh"
#include <sgpemv2/templates/smartp.hh>
#include "resource.hh"
#include <sgpemv2/resource.hh>
#include "static_resource.hh"
namespace sgpem

View File

@ -20,7 +20,7 @@
#include "dynamic_schedulable.hh"
#include "smartp.tcc"
#include <sgpemv2/templates/smartp.tcc>
#include <cassert>

View File

@ -22,7 +22,7 @@
#define DYNAMIC_SCHEDULABLE_HH 1
#include "config.h"
#include "schedulable.hh"
#include <sgpemv2/schedulable.hh>
#include "static_schedulable.hh"
namespace sgpem

View File

@ -20,10 +20,10 @@
#include "dynamic_sub_request.hh"
#include "dynamic_request.hh"
#include "request.hh"
#include "serialize_visitor.hh"
#include <sgpemv2/request.hh>
#include <sgpemv2/serialize_visitor.hh>
#include "smartp.tcc"
#include <sgpemv2/templates/smartp.tcc>
#include <algorithm>
#include <cassert>

View File

@ -23,13 +23,13 @@
#include "config.h"
#include "request.hh"
#include "sub_request.hh"
#include <sgpemv2/request.hh>
#include <sgpemv2/sub_request.hh>
#include "dynamic_request.hh"
#include "dynamic_resource.hh"
#include "static_sub_request.hh"
#include "smartp.hh"
#include <sgpemv2/templates/smartp.hh>
namespace sgpem
{

View File

@ -21,14 +21,14 @@
#include "dynamic_thread.hh"
#include "static_thread.hh"
#include "dynamic_request.hh"
#include "serialize_visitor.hh"
#include <sgpemv2/serialize_visitor.hh>
#include <algorithm>
#include <functional>
#include <cassert>
#include "deletor.tcc"
#include "smartp.tcc"
#include <sgpemv2/templates/deletor.tcc>
#include <sgpemv2/templates/smartp.tcc>
using namespace sgpem;
using namespace std;

View File

@ -26,11 +26,11 @@
#include "glibmm/ustring.h"
#include <vector>
#include "thread.hh"
#include <sgpemv2/thread.hh>
#include "dynamic_process.hh"
#include "dynamic_schedulable.hh"
#include "smartp.hh"
#include <sgpemv2/templates/smartp.hh>
namespace sgpem
{

View File

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "environment.hh"
#include <sgpemv2/environment.hh>
using namespace sgpem;

View File

@ -19,14 +19,16 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include "global_preferences.hh"
#include "key_file.hh"
#include "string_utils.hh"
#include <sgpemv2/global_preferences.hh>
#include <sgpemv2/key_file.hh>
#include <sgpemv2/string_utils.hh>
#include <sstream>
// Do not include in header file:
#include "singleton.tcc"
#include <sgpemv2/templates/singleton.tcc>
using namespace sgpem;
// Explicit template instantiation to allow to export symbols from the DSO.

View File

@ -19,7 +19,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include "key_file.hh"
#include <sgpemv2/key_file.hh>
#include "global_preferences_serializer.hh"
#include <sstream>

View File

@ -21,8 +21,8 @@
#ifndef GLOBAL_PREFERENCES_SERIALIZER_HH
#define GLOBAL_PREFERENCES_SERIALIZER_HH 1
#include "global_preferences.hh"
#include "key_file.hh"
#include <sgpemv2/global_preferences.hh>
#include <sgpemv2/key_file.hh>
namespace sgpem
{

View File

@ -20,8 +20,8 @@
#include "config.h"
#include "history.hh"
#include "history_observer.hh"
#include <sgpemv2/history.hh>
#include <sgpemv2/history_observer.hh>
#include <algorithm>
#include <functional>

View File

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "history_observer.hh"
#include <sgpemv2/history_observer.hh>
sgpem::HistoryObserver::~HistoryObserver() {}

View File

@ -18,11 +18,11 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "holt_graph.hh"
#include <sgpemv2/holt_graph.hh>
#include "history.hh"
#include "process.hh"
#include "thread.hh"
#include <sgpemv2/history.hh>
#include <sgpemv2/process.hh>
#include <sgpemv2/thread.hh>
using namespace sgpem;
using namespace std;

View File

@ -20,7 +20,7 @@
#include "config.h"
#include "invalid_plugin_exception.hh"
#include <sgpemv2/invalid_plugin_exception.hh>
using namespace sgpem;

View File

@ -19,7 +19,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include "key_file.hh"
#include <sgpemv2/key_file.hh>
#include <fstream>
#include <string.h>

View File

@ -22,7 +22,7 @@
// It could be necessary to do dynamic type-checking when
// catching it (with typeinfo).
#include "malformed_policy_exception.hh"
#include <sgpemv2/malformed_policy_exception.hh>
using namespace sgpem;
MalformedPolicyException::MalformedPolicyException(const std::string& msg)

View File

@ -20,7 +20,7 @@
#include "config.h"
#include "module.hh"
#include <sgpemv2/module.hh>
// FIXME: remove this header
#include <iostream>

View File

@ -22,7 +22,7 @@
// It could be necessary to do dynamic type-checking when
// catching it (with typeinfo).
#include "null_policy_exception.hh"
#include <sgpemv2/null_policy_exception.hh>
using namespace sgpem;
NullPolicyException::NullPolicyException(const char* msg)

View File

@ -20,12 +20,12 @@
#include "config.h"
#include "plugin_manager.hh"
#include "module.hh"
#include "global_preferences.hh"
#include <sgpemv2/plugin_manager.hh>
#include <sgpemv2/module.hh>
#include <sgpemv2/global_preferences.hh>
#include "deletor.tcc"
#include "singleton.tcc"
#include <sgpemv2/templates/deletor.tcc>
#include <sgpemv2/templates/singleton.tcc>
#include <glibmm/fileutils.h>
#include <glibmm/pattern.h>

View File

@ -18,11 +18,22 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "policy_parameters.hh"
#include <sgpemv2/policy_parameters.hh>
#include <sgpemv2/templates/parameter.tcc>
using namespace std;
using namespace sgpem;
using Glib::ustring;
// instantiate Parameter template for use outside this DSO
namespace sgpem {
template class SG_DLLEXPORT PolicyParameters::Parameter<int>;
template class SG_DLLEXPORT PolicyParameters::Parameter<float>;
template class SG_DLLEXPORT PolicyParameters::Parameter<Glib::ustring>;
}
/**
Register a new parameter of type integer.
If there is a parameter with the same name and type it will be overwritten.

View File

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "process.hh"
#include <sgpemv2/process.hh>
using namespace sgpem;

View File

@ -21,7 +21,7 @@
#include "config.h"
#include "gettext.h"
#include "ready_queue.hh"
#include <sgpemv2/ready_queue.hh>
using sgpem::ReadyQueue;

View File

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "request.hh"
#include <sgpemv2/request.hh>
using namespace sgpem;

View File

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "resource.hh"
#include <sgpemv2/resource.hh>
using namespace sgpem;

View File

@ -20,13 +20,13 @@
#include "config.h"
#include "resource_policies_gatekeeper.hh"
#include "resource_policy_manager.hh"
#include "resource_policy.hh"
#include <sgpemv2/resource_policies_gatekeeper.hh>
#include <sgpemv2/resource_policy_manager.hh>
#include <sgpemv2/resource_policy.hh>
#include "concrete_history.hh"
// Include full template definition only in implementation files:
#include "singleton.tcc"
#include <sgpemv2/templates/singleton.tcc>
#include <algorithm>
#include <cassert>

View File

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "resource_policy.hh"
#include <sgpemv2/resource_policy.hh>
using namespace std;
using namespace sgpem;

View File

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "resource_policy_lifo.hh"
#include <sgpemv2/resource_policy_lifo.hh>
using namespace std;

View File

@ -19,8 +19,8 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "resource_policy_manager.hh"
#include "resource_policies_gatekeeper.hh"
#include <sgpemv2/resource_policy_manager.hh>
#include <sgpemv2/resource_policies_gatekeeper.hh>
using namespace sgpem;

View File

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "schedulable.hh"
#include <sgpemv2/schedulable.hh>
using namespace sgpem;

View File

@ -29,14 +29,14 @@
#include "concrete_environment.hh"
#include "concrete_history.hh"
#include "cpu_policy.hh"
#include "cpu_policy_exception.hh"
#include <sgpemv2/cpu_policy.hh>
#include <sgpemv2/cpu_policy_exception.hh>
#include "scheduler.hh"
#include <sgpemv2/scheduler.hh>
// Do not include full template definition in the header file
#include "singleton.tcc"
#include "sequences.tcc"
#include <sgpemv2/templates/singleton.tcc>
#include <sgpemv2/templates/sequences.tcc>
#include <glibmm/thread.h>

View File

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "serialize_visitor.hh"
#include <sgpemv2/serialize_visitor.hh>
using namespace sgpem;

View File

@ -18,9 +18,9 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "serializer.hh"
#include <sgpemv2/serializer.hh>
#include "serializers_gatekeeper.hh"
#include <sgpemv2/serializers_gatekeeper.hh>
using namespace sgpem;

View File

@ -20,7 +20,7 @@
#include "config.h"
#include "serializer_error.hh"
#include <sgpemv2/serializer_error.hh>
using namespace sgpem;

View File

@ -20,11 +20,11 @@
#include "config.h"
#include "serializers_gatekeeper.hh"
#include "serializer.hh"
#include <sgpemv2/serializers_gatekeeper.hh>
#include <sgpemv2/serializer.hh>
// Include full template definition only in implementation files:
#include "singleton.tcc"
#include <sgpemv2/templates/singleton.tcc>
#include <algorithm>
#include <cassert>

View File

@ -1,4 +1,4 @@
// src/backend/cpu_policies_gatekeeper.hh - Copyright 2005, 2006, University
// src/sgpemv2/cpu_policies_gatekeeper.hhbackend/cpu_policy.hh - Copyright 2005, 2006, University
// of Padova, dept. of Pure and Applied
// Mathematics
//
@ -34,9 +34,9 @@ namespace sgpem
#include <map>
#include <stdexcept>
#include "singleton.hh"
#include "malformed_policy_exception.hh"
#include "user_interrupt_exception.hh"
#include <sgpemv2/templates/singleton.hh>
#include <sgpemv2/malformed_policy_exception.hh>
#include <sgpemv2/user_interrupt_exception.hh>
namespace sgpem
{

View File

@ -26,9 +26,9 @@
#include "glibmm/ustring.h"
#include "policy_parameters.hh"
#include "user_interrupt_exception.hh"
#include "malformed_policy_exception.hh"
#include <sgpemv2/policy_parameters.hh>
#include <sgpemv2/user_interrupt_exception.hh>
#include <sgpemv2/malformed_policy_exception.hh>
#include <stdexcept>

View File

@ -23,7 +23,7 @@
#include "config.h"
#include "cpu_policy.hh"
#include <sgpemv2/cpu_policy.hh>
#include <vector>

View File

@ -28,7 +28,7 @@ namespace sgpem
#include "config.h"
#include "resource_policy_manager.hh"
#include <sgpemv2/resource_policy_manager.hh>
#include <vector>

View File

@ -23,7 +23,7 @@
#include "config.h"
#include "sub_request.hh"
#include <sgpemv2/sub_request.hh>
#include <map>
#include <utility>

View File

@ -28,9 +28,9 @@
#include <vector>
// Do not include complete template definition here:
#include "singleton.hh"
#include "schedulable.hh"
#include "request.hh"
#include <sgpemv2/templates/singleton.hh>
#include <sgpemv2/schedulable.hh>
#include <sgpemv2/request.hh>
namespace sgpem
{

View File

@ -23,7 +23,7 @@
#include "config.h"
#include "environment.hh"
#include <sgpemv2/environment.hh>
#include <glibmm/ustring.h>

View File

@ -28,7 +28,7 @@ namespace sgpem
class Request;
}
#include "history_observer.hh"
#include <sgpemv2/history_observer.hh>
#include <set>
#include <vector>

View File

@ -27,7 +27,7 @@
#include "config.h"
#include "cpu_policy_exception.hh"
#include <sgpemv2/cpu_policy_exception.hh>
namespace sgpem
{

View File

@ -23,7 +23,7 @@
#include "config.h"
#include "invalid_plugin_exception.hh"
#include <sgpemv2/invalid_plugin_exception.hh>
#include <glibmm/module.h>
#include <glibmm/ustring.h>

View File

@ -28,7 +28,7 @@ namespace sgpem
#include "config.h"
#include "singleton.hh"
#include <sgpemv2/templates/singleton.hh>
#include <vector>

View File

@ -30,11 +30,13 @@
namespace sgpem
{
class SG_DLLEXPORT PolicyParametersException : public std::runtime_error
{
public:
PolicyParametersException(char* msg): std::runtime_error(msg) {}};
class PolicyParameters;
PolicyParametersException(char* msg): std::runtime_error(msg) {}
};
/** \brief Represents all configurable parameters of a single scheduling policy.
@ -46,8 +48,72 @@ namespace sgpem
class SG_DLLEXPORT PolicyParameters
{
public:
// -------------------------------------------------------------------------
/** \brief This class represents a sigle parameter of type \c T
This class is useful only to store informations about each parameter. No checks
on the values entered are done.
*/
template<typename T>
class Parameter;
class SG_DLLEXPORT Parameter
{
public:
/** \brief Constructs the parameter
\param name The name of the parameter. This string will be used to refer to this parameter, thus it MUST
be uniqe (one string identifies \b only ONE parameter)
\param value The initial value of this parameter
\param lower_bound The lower limitation of the value which can be set with set_int(...).
\param upper_bound The upper limitation of the value which can be set with set_int(...).
\param required Denotes if this parameter is required by the policy.
\param default_value The initial value of this parameter. (If not specified it's set to 0).
*/
Parameter(Glib::ustring name, const T& value,
const T& lower_bound, const T& upper_bound,
const bool& required, const T& default_value = 0);
/** \returns The name of the parameter (its UNIQUE key)
*/
Glib::ustring get_name() const;
/** \returns The lower bound
*/
T get_lower_bound() const;
/** \returns The upper bound
*/
T get_upper_bound() const;
/** \returns TRUE if this parameter is required
*/
bool is_required() const;
/** \returns Its default value
*/
T get_default() const;
/** \returns Its actual value
*/
T get_value() const;
/** \brief Changes the value of the parameter.
\warning NO CHECK is done whether the value repects its bounds!!
*/
void set_value(const T&);
private:
Glib::ustring _name;
T _value;
T _lower_bound;
T _upper_bound;
bool _is_required;
T _default;
};
// ------------------------------------------------------------------
//#######################################
//########## methods to CREATE PARAMETERS
@ -185,69 +251,6 @@ namespace sgpem
std::map<Glib::ustring, Parameter<Glib::ustring> > string_map;
};
/** \brief This class represents a sigle parameter of type \c T
This class is useful only to store informations about each parameter. No checks
on the values entered are done.
*/
template<typename T>
class PolicyParameters::Parameter
{
public:
/** \brief Constructs the parameter
\param name The name of the parameter. This string will be used to refer to this parameter, thus it MUST
be uniqe (one string identifies \b only ONE parameter)
\param value The initial value of this parameter
\param lower_bound The lower limitation of the value which can be set with set_int(...).
\param upper_bound The upper limitation of the value which can be set with set_int(...).
\param required Denotes if this parameter is required by the policy.
\param default_value The initial value of this parameter. (If not specified it's set to 0).
*/
Parameter(Glib::ustring name, const T& value, const T& lower_bound, const T& upper_bound, const bool& required, const T& default_value = 0);
/** \returns The name of the parameter (its UNIQUE key)
*/
Glib::ustring get_name() const;
/** \returns The lower bound
*/
T get_lower_bound() const;
/** \returns The upper bound
*/
T get_upper_bound() const;
/** \returns TRUE if this parameter is required
*/
bool is_required() const;
/** \returns Its default value
*/
T get_default() const;
/** \returns Its actual value
*/
T get_value() const;
/** \brief Changes the value of the parameter.
\warning NO CHECK is done whether the value repects its bounds!!
*/
void set_value(const T&);
private:
Glib::ustring _name;
T _value;
T _lower_bound;
T _upper_bound;
bool _is_required;
T _default;
};
}//~ namespace sgpem
#include "../templates/parameter.tcc"
#endif

View File

@ -25,7 +25,7 @@
#include "glibmm/ustring.h"
#include <vector>
#include "schedulable.hh"
#include <sgpemv2/schedulable.hh>
namespace sgpem
{

View File

@ -34,7 +34,7 @@ namespace sgpem
#include <map>
#include <stdexcept>
#include "singleton.hh"
#include <sgpemv2/templates/singleton.hh>
namespace sgpem
{

View File

@ -26,10 +26,10 @@
#include "glibmm/ustring.h"
#include "policy_parameters.hh"
#include "user_interrupt_exception.hh"
#include "environment.hh"
#include "sub_request.hh"
#include <sgpemv2/policy_parameters.hh>
#include <sgpemv2/user_interrupt_exception.hh>
#include <sgpemv2/environment.hh>
#include <sgpemv2/sub_request.hh>
namespace sgpem
{

View File

@ -26,10 +26,10 @@
#include "glibmm/ustring.h"
#include "resource_policy.hh"
#include <sgpemv2/resource_policy.hh>
#include "policy_parameters.hh"
#include "user_interrupt_exception.hh"
#include <sgpemv2/policy_parameters.hh>
#include <sgpemv2/user_interrupt_exception.hh>
namespace sgpem
{

View File

@ -28,15 +28,15 @@ namespace sgpem
#include "config.h"
#include "history.hh"
#include "cpu_policy.hh"
#include "resource_policy.hh"
#include "ready_queue.hh"
#include "user_interrupt_exception.hh"
#include "malformed_policy_exception.hh"
#include <sgpemv2/history.hh>
#include <sgpemv2/cpu_policy.hh>
#include <sgpemv2/resource_policy.hh>
#include <sgpemv2/ready_queue.hh>
#include <sgpemv2/user_interrupt_exception.hh>
#include <sgpemv2/malformed_policy_exception.hh>
// Do not include full template definition here
#include "singleton.hh"
#include <sgpemv2/templates/singleton.hh>
#include <glibmm/thread.h>

View File

@ -34,7 +34,7 @@ namespace sgpem
#include "config.h"
#include "serializer_error.hh"
#include <sgpemv2/serializer_error.hh>
#include <glibmm/ustring.h>

View File

@ -22,8 +22,8 @@
#define SERIALIZER_HH 1
#include "config.h"
#include "history.hh"
#include "serializer_error.hh"
#include <sgpemv2/history.hh>
#include <sgpemv2/serializer_error.hh>
#include <glibmm/ustring.h>

View File

@ -30,7 +30,7 @@ namespace sgpem
#include <vector>
#include "singleton.hh"
#include <sgpemv2/templates/singleton.hh>
namespace sgpem
{

View File

@ -30,12 +30,12 @@ namespace sgpem
}
#include "config.h"
#include "history.hh"
#include "singleton.hh"
#include "cpu_policy_exception.hh"
#include "user_interrupt_exception.hh"
#include "null_policy_exception.hh"
#include "malformed_policy_exception.hh"
#include <sgpemv2/history.hh>
#include <sgpemv2/templates/singleton.hh>
#include <sgpemv2/cpu_policy_exception.hh>
#include <sgpemv2/user_interrupt_exception.hh>
#include <sgpemv2/null_policy_exception.hh>
#include <sgpemv2/malformed_policy_exception.hh>
#include <stdexcept>
#include <utility>
#include <vector>

Some files were not shown because too many files have changed in this diff Show More