Replace autotools with CMake at the toplevel, backend now compiles with newer GCC

This commit is contained in:
Matteo Settenvini 2018-09-25 09:56:28 +02:00
parent d50ec337d1
commit 616aef27a8
124 changed files with 1242 additions and 6315 deletions

View File

@ -1,57 +0,0 @@
.bzrignore
./=*
,,semantic.cache
stamp-*
*.info
doc/vers-*.texi
ABOUT-NLS
INSTALL
Makefile.in
configure
config/config.guess
config/config.rpath
config/depcomp
config/install-sh
config/ltmain.sh
config/mdate-sh
config/missing
config/mkinstalldirs
config/py-compile
config/texinfo.tex
m4/codeset.m4
m4/gettext.m4
m4/glibc21.m4
m4/iconv.m4
m4/intdiv0.m4
m4/intmax.m4
m4/inttypes-pri.m4
m4/inttypes.m4
m4/inttypes_h.m4
m4/isc-posix.m4
m4/lcmessage.m4
m4/lib-ld.m4
m4/lib-link.m4
m4/lib-prefix.m4
m4/longdouble.m4
m4/longlong.m4
m4/nls.m4
m4/po.m4
m4/printf-posix.m4
m4/progtest.m4
m4/signed.m4
m4/size_max.m4
m4/stdint_h.m4
m4/uintmax_t.m4
m4/ulonglong.m4
m4/wchar_t.m4
m4/wint_t.m4
m4/xsize.m4
po/Makefile.in.in
po/Makevars.template
po/Rules-quot
po/boldquot.sed
po/en@boldquot.header
po/en@quot.header
po/insert-header.sin
po/quot.sed
po/remove-potcdate.sin

59
.gitignore vendored
View File

@ -1,59 +1,2 @@
*~
**/ChangeLog
**/config.h
**/config.log
**/config/*
**/autom4te.cache
**/configure
**/Makefile.in
**/aclocal.m4
__build__
__inst__
distro/deb/*
**/m4/codeset.m4
**/m4/gettext.m4
**/m4/glibc21.m4
**/m4/glibc2.m4
**/m4/iconv.m4
**/m4/intdiv0.m4
**/m4/intldir.m4
**/m4/intl.m4
**/m4/intlmacosx.m4
**/m4/intmax.m4
**/m4/inttypes_h.m4
**/m4/inttypes-pri.m4
**/m4/lcmessage.m4
**/m4/lib-ld.m4
**/m4/lib-link.m4
**/m4/lib-prefix.m4
**/m4/libtool.m4
**/m4/lock.m4
**/m4/longlong.m4
**/m4/lt~obsolete.m4
**/m4/ltoptions.m4
**/m4/ltsugar.m4
**/m4/ltversion.m4
**/m4/nls.m4
**/m4/pkg.m4
**/m4/po.m4
**/m4/printf-posix.m4
**/m4/progtest.m4
**/m4/size_max.m4
**/m4/stdint_h.m4
**/m4/uintmax_t.m4
**/m4/wchar_t.m4
**/m4/wint_t.m4
**/m4/xsize.m4
**/po/Rules-quot
**/po/boldquot.sed
**/po/en@boldquot.header
**/po/en@quot.header
**/po/insert-header.sin
**/po/quot.sed
**/po/remove-potcdate.sin
**/po/Makevars.template
/CMakeLists.txt.user

628
CMakeLists.txt Normal file
View File

@ -0,0 +1,628 @@
cmake_minimum_required(VERSION 3.11)
project(sgpemv2 VERSION 1.2)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR [=[
** This seems to be the pkg root directory.
** Compiling here your sources is considered
** as unpolite as exploring your nose with
** your pinky whilst attending a wedding party.
**
** Please create a separate build dir and then
** run CMake into it.
]=])
endif()
include(FindPkgConfig)
include(GNUInstallDirs)
set(CMAKE_CXX_STANDARD 17)
# -------------------------------------------
function(pkg_config_to_tgt tgt) # ARGN: modules + REQUIRED
if(NOT ${tgt}_FOUND)
pkg_check_modules(${tgt}
${ARGN})
endif()
if(${tgt}_FOUND)
add_library(${tgt} INTERFACE IMPORTED)
set_target_properties(${tgt} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${${tgt}_INCLUDE_DIRS}"
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${${tgt}_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${${tgt}_LIBRARY_DIRS};${${tgt}_LIBRARIES}"
INTERFACE_COMPILE_OPTIONS "${${tgt}_CFLAGS_OTHER}")
endif()
endfunction(pkg_config_to_tgt)
function(target_sources_add_headers tgt basedir) # ARGN: [<type [headers...]> ...]
set(visibilities PUBLIC PRIVATE INTERFACE)
cmake_parse_arguments("" "" "" "${visibilities}" ${ARGN})
list(APPEND _PUBLIC ${_UNPARSED_ARGUMENTS})
unset(target_sources_headers)
foreach(visibility IN LISTS visibilities)
list(APPEND target_sources_headers ${visibility})
foreach(header IN LISTS "_${visibility}")
if(IS_ABSOLUTE "${header}")
string(REGEX REPLACE ".*/${basedir}/(.*)$" "\\1" rel_header "${header}")
list(APPEND target_sources_headers
"$<BUILD_INTERFACE:${header}>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${rel_header}>")
else()
list(APPEND target_sources_headers
"$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/${basedir}/${header}>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${header}>")
endif()
endforeach()
endforeach()
target_sources(${tgt} ${type} ${target_sources_headers})
endfunction(target_sources_add_headers)
# -------------------------------------------
find_package(Gettext REQUIRED)
find_package(Intl REQUIRED)
find_package(Doxygen COMPONENTS dot)
add_compile_options(-Wall -pedantic -Wextra)
add_definitions(-DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE)
set(CMAKE_CXX_VISIBILITY_PRESET "hidden")
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
pkg_config_to_tgt(sgpemv2-backend-deps
"gthread-2.0 >= 2.32.0"
"sigc++-2.0 >= 2.2.9"
"glibmm-2.4 >= 2.32.0")
pkg_config_to_tgt(sgpemv2-frontend-deps
"cairomm-1.0 >= 1.10.0"
"gtkmm-3.0 >= 3.4.0")
# -------------------------------------------
# TODO: no translations yet, so leave commented and untested.
# foreach(lang IN ITEMS ... languages ...)
# gettext_create_translations(${CMAKE_CURRENT_BINARY_DIR}/po/${lang}.mo ALL
# ${CMAKE_CURRENT_BINARY_DIR}/po/${lang}.po)
# gettext_process_po_files(${lang} ALL
# INSTALL_DESTINATION ${CMAKE_INSTALL_LOCALEDIR}
# PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/po/${lang}.po)
# endforeach()
gettext_process_pot_file(${CMAKE_CURRENT_SOURCE_DIR}/po/sgpemv2.pot ALL
INSTALL_DESTINATION ${CMAKE_INSTALL_LOCALEDIR} LANGUAGES ${languages})
add_custom_target(doc
COMMENT "Build all the documentation")
if(NOT DOXYGEN_FOUND)
message(STATUS "Cannot find doxygen with dot. Skipping API documentation.")
else()
set(DOXYGEN_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/api)
doxygen_add_docs(api-doc
${CMAKE_CURRENT_SOURCE_DIR}/src/backend/sgpemv2
${CMAKE_CURRENT_BINARY_DIR}/src/backend/sgpemv2
COMMENT "Building documentation via Doxygen")
add_dependencies(doc api-doc)
install(DIRECTORY ${DOXYGEN_OUTPUT_DIRECTORY}/html
DESTINATION ${CMAKE_INSTALL_DOCDIR}
OPTIONAL)
endif()
# TODO: eventually migrate to sphinx.
find_program(MAKEINFO makeinfo)
find_program(CONVERT convert)
if(NOT (MAKEINFO AND CONVERT))
message(STATUS "Cannot find makeinfo or convert. Skipping Info documentation.")
else()
set(output ${CMAKE_CURRENT_BINARY_DIR}/doc/sgpemv2.info)
set(inputs doc/fdl.texi
doc/gpl.texi
doc/sgpem2uman.texi
doc/sgpem2dman.texi)
set(images doc/holt_circle.gif
doc/main-window.gif
doc/simulation_widget.gif)
set(text_image doc/main-window.txt)
set(img_deps)
foreach(img IN LISTS images)
get_filename_component(img_we ${img} NAME_WE)
set(img_eps ${CMAKE_CURRENT_BINARY_DIR}/doc/${img_we}.eps)
set(img_pdf ${CMAKE_CURRENT_BINARY_DIR}/doc/${img_we}.pdf)
add_custom_command(OUTPUT ${img_eps} COMMAND ${CONVERT} ${img} ${img_eps})
add_custom_command(OUTPUT ${img_pdf} COMMAND ${CONVERT} ${img} ${img_pdf})
list(APPEND img_deps ${img_eps} ${img_pdf})
install(FILES ${img_eps} ${img_pdf} ${CMAKE_CURRENT_SOURCE_DIR}/doc/main-window.txt
DESTINATION ${CMAKE_INSTALL_INFODIR}/sgpemv2-figures)
endforeach()
add_custom_command(OUTPUT ${output}
COMMAND ${MAKEINFO_EXECUTABLE} -o ${output} ${inputs}
DEPENDS ${inputs} ${img_deps}
COMMENT "Creating Info file documentation"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
VERBATIM)
install(FILES ${output}
DESTINATION ${CMAKE_INSTALL_INFODIR})
add_custom_target(info-doc ALL DEPENDS ${outputs})
add_dependencies(doc info-doc)
endif()
# -------------------------------------------
set(localedir ${CMAKE_INSTALL_FULL_LOCALEDIR})
set(uidir ${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}/ui)
set(policiesdir ${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}/policies)
set(plugindir ${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}/plugins)
configure_file(src/backend/sgpemv2/config.h.in
src/backend/sgpemv2/config.h
@ONLY)
add_library(sgpemv2-backend SHARED)
set_target_properties(sgpemv2-backend PROPERTIES
POSITION_INDEPENDENT_CODE ON
VERSION 1.2
SOVERSION 1.2.0)
target_include_directories(sgpemv2-backend
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/backend>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/src/backend>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/backend
${Intl_INCLUDE_DIRS})
target_link_libraries(sgpemv2-backend
PRIVATE sgpemv2-backend-deps
${Intl_LIBRARIES})
target_sources_add_headers(sgpemv2-backend src/backend/
PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/src/backend/sgpemv2/config.h
sgpemv2/cpu_policies_gatekeeper.hh
sgpemv2/cpu_policy.hh
sgpemv2/cpu_policy_exception.hh
sgpemv2/cpu_policy_manager.hh
sgpemv2/environment.hh
sgpemv2/global_preferences.hh
sgpemv2/history.hh
sgpemv2/history_observer.hh
sgpemv2/invalid_plugin_exception.hh
sgpemv2/key_file.hh
sgpemv2/malformed_policy_exception.hh
sgpemv2/module.hh
sgpemv2/null_policy_exception.hh
sgpemv2/policy_parameters.hh
sgpemv2/plugin.hh
sgpemv2/plugin_manager.hh
sgpemv2/process_statistics.hh
sgpemv2/ready_queue.hh
sgpemv2/request.hh
sgpemv2/resource.hh
sgpemv2/resource_policies_gatekeeper.hh
sgpemv2/resource_policy.hh
sgpemv2/resource_policy_manager.hh
sgpemv2/process.hh
sgpemv2/schedulable.hh
sgpemv2/schedulable_statistics.hh
sgpemv2/scheduler.hh
sgpemv2/serialize_visitor.hh
sgpemv2/serializer.hh
sgpemv2/serializer_error.hh
sgpemv2/serializers_gatekeeper.hh
sgpemv2/sgpemv2-visibility.hh
sgpemv2/simulation.hh
sgpemv2/simulation_observer.hh
sgpemv2/simulation_statistics.hh
sgpemv2/statistics.hh
sgpemv2/string_utils.hh
sgpemv2/sub_request.hh
sgpemv2/thread.hh
sgpemv2/thread_statistics.hh
sgpemv2/user_interrupt_exception.hh
sgpemv2/templates/down_cast.tcc
sgpemv2/templates/parameter.tcc
sgpemv2/templates/sequences.tcc
sgpemv2/templates/singleton.hh
sgpemv2/templates/singleton.tcc
PRIVATE sgpemv2/config.h.in # not distributed
concrete_environment.cc
concrete_environment.hh
concrete_history.cc
concrete_history.hh
concrete_process_statistics.cc
concrete_process_statistics.hh
concrete_simulation.cc
concrete_simulation.hh
concrete_simulation_statistics.cc
concrete_simulation_statistics.hh
concrete_statistics.cc
concrete_statistics.hh
concrete_thread_statistics.cc
concrete_thread_statistics.hh
cpp_resource_policy_manager.cc
cpp_resource_policy_manager.hh
cpu_policies_gatekeeper.cc
cpu_policy.cc
cpu_policy_exception.cc
cpu_policy_manager.cc
dynamic_process.cc
dynamic_process.hh
dynamic_request.cc
dynamic_request.hh
dynamic_resource.cc
dynamic_resource.hh
dynamic_schedulable.cc
dynamic_schedulable.hh
dynamic_sub_request.cc
dynamic_sub_request.hh
dynamic_thread.cc
dynamic_thread.hh
environment.cc
gettext.h
global_preferences.cc
history.cc
history_observer.cc
invalid_plugin_exception.cc
key_file.cc
malformed_policy_exception.cc
module.cc
null_policy_exception.cc
plugin_manager.cc
policy_parameters.cc
process.cc
process_statistics.cc
ready_queue.cc
request.cc
resource.cc
resource_policies_gatekeeper.cc
resource_policy.cc
resource_policy_fifo.cc
resource_policy_fifo.hh
resource_policy_lifo.cc
resource_policy_lifo.hh
resource_policy_manager.cc
resource_policy_priority.cc
resource_policy_priority.hh
resource_policy_priority_inheritance.hh
resource_policy_priority_inheritance.cc
schedulable.cc
schedulable_statistics.cc
scheduler.cc
serialize_visitor.cc
serializer.cc
serializer_error.cc
serializers_gatekeeper.cc
simulation.cc
simulation_observer.cc
simulation_statistics.cc
static_process.cc
static_process.hh
static_request.cc
static_request.hh
static_resource.cc
static_resource.hh
static_schedulable.cc
static_schedulable.hh
static_sub_request.cc
static_sub_request.hh
static_thread.cc
static_thread.hh
statistics.cc
string_utils.cc
sub_request.cc
thread.cc
thread_statistics.cc
user_interrupt_exception.cc)
# TODO: plugins!
# add_subdirectory(plugins/pyloader)
# add_subdirectory(plugins/xmlsave)
# -------------------------------------------
add_executable(sgpemv2)
target_include_directories(sgpemv2
PRIVATE ${Intl_INCLUDE_DIRS})
target_link_libraries(sgpemv2
PRIVATE sgpemv2-backend
sgpemv2-frontend-deps
${Intl_LIBRARIES})
target_sources(sgpemv2
PRIVATE src/add_request_dialog.cc
src/add_request_dialog.hh
src/cairo_elements.cc
src/cairo_elements.hh
src/cairo_widget.cc
src/cairo_widget.hh
src/configure_policy_dialog.cc
src/configure_policy_dialog.hh
src/graphical_preferences_editor.cc
src/graphical_preferences_editor.hh
src/gui_builder.cc
src/gui_builder.hh
src/holt_container_window.cc
src/holt_container_window.hh
src/holt_widget.cc
src/holt_widget.hh
src/jump_to_dialog.cc
src/jump_to_dialog.hh
src/main.cc
src/main.hh
src/parse_opts.cc
src/parse_opts.hh
src/ready_queue_widget.cc
src/ready_queue_widget.hh
src/resources_widget.cc
src/resources_widget.hh
src/schedulables_statistics_widget.cc
src/schedulables_statistics_widget.hh
src/schedulables_statistics_widget.hh
src/schedulables_tree_widget.cc
src/schedulables_tree_widget.hh
src/simulation_controller.cc
src/simulation_controller.hh
src/simulation_statistics_widget.cc
src/simulation_statistics_widget.hh
src/simulation_widget.cc
src/simulation_widget.hh
src/statistics_container_window.cc
src/statistics_container_window.hh
src/text_simulation.cc
src/text_simulation.hh)
# -------------------------------------------
# TODO: port the tests!
# # ############################################################
# #
# # check : testsuite
# #
# # ############################################################
# if COND_TESTS
# # DEJATOOL = src/testsuite/example-test.exp
# noinst_PROGRAMS = \
# src/testsuite/test-cairo_widget \
# src/testsuite/test-history \
# src/testsuite/test-holt_widget \
# src/testsuite/test-key_file \
# src/testsuite/test-simulation_widget \
# src/testsuite/test-statistics
# # disable :
# # src/testsuite/test-global_preferences_serialization
# # src/testsuite/test-parse_command
# # src/testsuite/test-stepforward
# src_testsuite_test_history_CPPFLAGS = \
# -I@top_srcdir@/src/backend \
# $(GLIBMM_CFLAGS)
# src_testsuite_test_history_LDFLAGS = \
# -Wl,-rpath -Wl,"$(pkglibdir)" \
# src/backend/libbackend.la \
# $(GLIBMM_LIBS)
# src_testsuite_test_history_SOURCES = \
# src/backend/concrete_environment.cc \
# src/backend/concrete_history.cc \
# src/backend/dynamic_process.cc \
# src/backend/dynamic_request.cc \
# src/backend/dynamic_resource.cc \
# src/backend/dynamic_schedulable.cc \
# src/backend/dynamic_sub_request.cc \
# src/backend/dynamic_thread.cc \
# src/backend/static_process.cc \
# src/backend/static_request.cc \
# src/backend/static_resource.cc \
# src/backend/static_schedulable.cc \
# src/backend/static_sub_request.cc \
# src/backend/static_thread.cc \
# src/testsuite/test-history.cc
# src_testsuite_test_statistics_CPPFLAGS = \
# -I@top_srcdir@/src/backend \
# $(GLIBMM_CFLAGS) $(GTHREAD_CFLAGS)
# src_testsuite_test_statistics_LDFLAGS = \
# -Wl,-rpath -Wl,"$(pkglibdir)" \
# src/backend/libbackend.la \
# $(GLIBMM_LIBS) $(GTHREAD_LIBS)
# src_testsuite_test_statistics_SOURCES = \
# src/backend/statistics.cc \
# src/backend/concrete_process_statistics.cc \
# src/backend/concrete_thread_statistics.cc \
# src/backend/concrete_simulation_statistics.cc \
# src/backend/concrete_statistics.cc \
# src/testsuite/test-statistics.cc
# #src_testsuite_test_global_preferences_serialization_CPPFLAGS = \
# # -I@top_srcdir@/src/backend \
# # $(GLIBMM_CFLAGS)
# #src_testsuite_test_global_preferences_serialization_LDFLAGS = \
# # src/backend/libbackend.la \
# # -Wl,-rpath -Wl,"$(pkglibdir)" \
# # $(GLIBMM_LIBS)
# #src_testsuite_test_global_preferences_serialization_SOURCES = \
# # src/testsuite/test-global_preferences_serialization.cc
# src_testsuite_test_key_file_CPPFLAGS = \
# -I@top_srcdir@/src/backend \
# $(GLIBMM_CFLAGS)
# src_testsuite_test_key_file_LDFLAGS = \
# -Wl,-rpath -Wl,"$(pkglibdir)" \
# src/backend/libbackend.la \
# $(GLIBMM_LIBS)
# src_testsuite_test_key_file_SOURCES = \
# src/testsuite/test-key_file.cc
# src_testsuite_test_cairo_widget_CPPFLAGS = \
# -I@top_srcdir@/src \
# -I@top_srcdir@/src/backend \
# $(CAIROMM_CFLAGS) \
# $(GTKMM_CFLAGS) \
# $(GLIBMM_CFLAGS)
# src_testsuite_test_cairo_widget_LDFLAGS = \
# $(CAIROMM_LIBS) \
# $(GTKMM_LIBS) \
# $(GLIBMM_LIBS)
# src_testsuite_test_cairo_widget_SOURCES = \
# src/cairo_elements.cc \
# src/cairo_widget.cc \
# src/testsuite/test-cairo_widget.cc
# src_testsuite_test_simulation_widget_CPPFLAGS = \
# -I@top_srcdir@/src \
# -I@top_srcdir@/src/backend \
# $(CAIROMM_CFLAGS) \
# $(GTKMM_CFLAGS) \
# $(GLIBMM_CFLAGS) \
# $(GTHREAD_CFLAGS)
# src_testsuite_test_simulation_widget_LDFLAGS = \
# src/backend/libbackend.la \
# -Wl,-rpath -Wl,"$(pkglibdir)" \
# $(CAIROMM_LIBS) \
# $(GTKMM_LIBS) \
# $(GLIBMM_LIBS) \
# $(GTHREAD_LIBS)
# src_testsuite_test_simulation_widget_SOURCES = \
# src/cairo_elements.cc \
# src/cairo_widget.cc \
# src/simulation_widget.cc \
# src/testsuite/test-simulation_widget.cc
# src_testsuite_test_holt_widget_CPPFLAGS = \
# -I@top_srcdir@/src \
# -I@top_srcdir@/src/backend \
# $(CAIROMM_CFLAGS) \
# $(GTKMM_CFLAGS) \
# $(GLIBMM_CFLAGS) \
# $(GTHREAD_CFLAGS)
# src_testsuite_test_holt_widget_LDFLAGS = \
# src/backend/libbackend.la \
# -Wl,-rpath -Wl,"$(pkglibdir)" \
# $(CAIROMM_LIBS) \
# $(GTKMM_LIBS) \
# $(GLIBMM_LIBS) \
# $(GTHREAD_LIBS)
# src_testsuite_test_holt_widget_SOURCES = \
# src/cairo_elements.cc \
# src/cairo_widget.cc \
# src/simulation_widget.cc \
# src/holt_container_window.cc \
# src/holt_widget.cc \
# src/testsuite/test-holt_widget.cc
# #src_testsuite_test_parse_command_CPPFLAGS = \
# # -I@top_srcdir@/src \
# # -I@top_srcdir@/src/templates \
# # $(GLIBMM_CFLAGS)
# #src_testsuite_test_parse_command_LDFLAGS = \
# # src/backend/libbackend.la \
# # -Wl,-rpath -Wl,"$(pkglibdir)" \
# # $(GLIBMM_LIBS)
# #src_testsuite_test_parse_command_SOURCES = \
# # src/testsuite/test-parse_command.cc
# # advice: get dummy_policy from the somewhere in the repository, and compile it in.
# #src_testsuite_test_stepforward_CPPFLAGS = \
# # -I@top_srcdir@/src \
# # -I@top_srcdir@/src/templates \
# # $(GLIBMM_CFLAGS)
# #src_testsuite_test_stepforward_LDFLAGS = \
# # src/backend/libbackend.la \
# # -Wl,-rpath -Wl,"$(pkglibdir)" \
# # $(GLIBMM_LIBS)
# #src_testsuite_test_stepforward_SOURCES = \
# # src/testsuite/stubs/history.cc \
# # src/testsuite/stubs/prrpolicy.cc \
# # src/testsuite/stubs/policy_manager.cc \
# # src/backend/scheduler.cc \
# # src/testsuite/test-stepforward.cc
# # Workaround an automake bug that leaves behind some files
# # while it's finishing the distcheck target
# CLEANFILES += \
# src/testsuite/.libs/test-cairo_widget \
# src/testsuite/.libs/test-history \
# src/testsuite/.libs/test-holt_widget \
# src/testsuite/.libs/test-key_file \
# src/testsuite/.libs/test-simulation_widget \
# src/testsuite/.libs/test-statistics
# # disabled:
# # src/testsuite/.libs/test-global_preferences_serialization
# endif #~ if COND_TESTS
# # ############################################################
# #
# # extra files to distribute
# #
# # ############################################################
# noinst_DATA += \
# src/testsuite/scheduling-wizards/wizard-deadlock-test \
# src/testsuite/scheduling-wizards/wizard-gap-fail \
# src/testsuite/scheduling-wizards/wizard-assert-fail \
# src/testsuite/scheduling-wizards/wizard-unblock-test \
# 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
# examples_DATA = \
# src/testsuite/scheduling-wizards/environments/Colori_rr_prio_1_2.xgp \
# src/testsuite/scheduling-wizards/environments/DiscWorld_unblock.xgp \
# src/testsuite/scheduling-wizards/environments/Ducks_rr_2.xgp \
# src/testsuite/scheduling-wizards/environments/FruitsBasket_complex.xgp \
# src/testsuite/scheduling-wizards/environments/Fantozzi_lifo_requests.xgp \
# src/testsuite/scheduling-wizards/environments/Matteo_deadlock.xgp \
# src/testsuite/scheduling-wizards/environments/Matteo_preemption_fail.xgp \
# src/testsuite/scheduling-wizards/environments/Modernita_gap_terminated.xgp \
# src/testsuite/scheduling-wizards/environments/MyAutoDeadlock.xgp \
# src/testsuite/scheduling-wizards/environments/Pensieri_fcfs.xgp \
# src/testsuite/scheduling-wizards/environments/Porno_priority_inversion.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/ScuolaDiMileto_gap_fail.xgp \
# src/testsuite/scheduling-wizards/environments/TheSecretOfMonkeyIsland.xgp
# EXTRA_DIST += $(noinst_DATA) $(examples_DATA)
# -------------------------------------------
install(FILES data/logo.png
ui/add-process-dialog.ui
ui/add-request-dialog.ui
ui/add-resource-dialog.ui
ui/add-thread-dialog.ui
ui/configure-dialog.ui
ui/jump-to-dialog.ui
ui/main-window.ui
ui/statistics-window.ui
DESTINATION ${uidir})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/sgpemv2.desktop
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/sgpemv2.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons)
# TODO: create the export set

291
INSTALL
View File

@ -1,291 +0,0 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
6. Often, you can also type `make uninstall' to remove the installed
files again.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *Note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

View File

@ -1,666 +0,0 @@
# Makefile.am - 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 3 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, see http://www.gnu.org/licenses/.
# extra calls
.PHONY : apidox generate-extra-images
# this should be the only recursive call inside sgpemv2 main pkg
# please note the "." directory _has_ to come first, before plugins
SUBDIRS = . po
# ################################# #
# Additional directories building: #
# ################################# #
# allow building of provided plugins
# FIXME: how to make this dynamic? e.g. for plugins/* ?
SUBDIRS += \
plugins/pyloader \
plugins/xmlsave
datarootdir = @datarootdir@
sharedir = $(pkgdatadir)
examplesdir = $(sharedir)/examples
policiesdir = $(sharedir)/policies
plugindir = $(sharedir)/plugins
uidir = $(sharedir)/ui
applicationsdir = @datadir@/applications
iconsdir = @datadir@/pixmaps
localedir = @datadir@/locale
aclocaldir = @datadir@/aclocal
# used for installing templates include files
templatesdir = $(pkgincludedir)/templates
#define empty global variables
bin_PROGRAMS =
pkglib_LTLIBRARIES =
plugin_LTLIBRARIES =
noinst_HEADERS =
noinst_DATA =
pkginclude_HEADERS =
templates_HEADERS =
EXTRA_DIST =
MAINTAINERCLEANFILES =
MOSTLYCLEANFILES =
CLEANFILES =
# ############################################################
#
# extra dist, cleanup and automake/aclocal flags
#
# ############################################################
ACLOCAL_AMFLAGS = -I m4 --install
install_macros = \
m4/sgpemv2-dirs.m4
macros = \
m4/compilerflags.m4 \
m4/linkingflags.m4
distro_files = \
distro/deb/control-file-v1.0 \
distro/deb/build.sh \
distro/deb/readme.txt \
distro/ebuild/sgpemv2-1.0.ebuild \
distro/rpm/SPECS/sgpemv2-1.0.spec \
distro/rpm/readme.txt \
distro/win32/pyloader.vcproj \
distro/win32/sgpemv2.vcproj \
distro/win32/backend.vcproj \
distro/win32/config/config.h \
distro/win32/xmlsave.vcproj \
distro/win32/sgpemv2.sln \
distro/win32/_sgpem.vcproj
EXTRA_DIST += \
gettext.h \
$(install_macros) \
$(macros) \
$(distro_files)
aclocal_DATA = $(install_macros)
MAINTAINERCLEANFILES += doc/API
# ############################################################
#
# desktop files and other distribution data
#
# ############################################################
pkgconfdir = $(libdir)/pkgconfig
pkgconf_DATA = config/sgpemv2.pc
applications_DATA = data/sgpemv2.desktop
icons_DATA = data/scc-sgpemv2.png
EXTRA_DIST += $(applications_DATA) $(icons_DATA)
# ############################################################
#
# documentation
#
# ############################################################
info_TEXINFOS = \
doc/sgpem2uman.texi \
doc/sgpem2dman.texi
sgpem2uman_TEXINFOS = $(licenses) doc/vers-uman.texi
sgpem2dman_TEXINFOS = $(licenses) doc/vers-dman.texi
licenses = doc/fdl.texi doc/gpl.texi
EXTRA_DIST += $(licenses)
# Images for the documentation
gif_images = \
doc/holt_circle.gif \
doc/main-window.gif \
doc/simulation_widget.gif
text_images = \
doc/main-window.txt
# Generate all kind of images needed by texinfo via convert
%.pdf : %.gif
convert "$<" "$(top_srcdir)/$@"
%.eps : %.gif
convert "$<" "$(top_srcdir)/$@"
EXTRA_DIST += $(gif_images:%.gif=%.eps) \
$(gif_images:%.gif=%.pdf) \
$(text_images)
apidox :
test -d 'doc/API' || mkdir -p -- 'doc/API'
if HAVE_DOXYGEN
doxygen config/Doxyfile
else
@echo "** Doxygen not installed. Skipping generating API docs."
endif
distclean-local :
if test -d 'doc/API'; then rm -rf 'doc/API'; fi
# ############################################################
#
# source : libbackend.la
#
# ############################################################
# Program & library names
pkglib_LTLIBRARIES += src/backend/libbackend.la
src_backend_libbackend_la_CPPFLAGS = \
-I@top_srcdir@ \
-I@top_srcdir@/src/backend \
-DPOLDIR="\"$(policiesdir)\"" \
-DPLUGDIR="\"$(plugindir)\"" \
-DLOCALEDIR="\"$(localedir)\"" \
$(GLIBMM_CFLAGS)
src_backend_libbackend_la_CXXFLAGS = \
$(VISIB_HIDDEN)
src_backend_libbackend_la_LDFLAGS = \
$(GLIBMM_LDFLAGS) \
$(LT_LDFLAGS) \
-version-info 1:0:0 \
-export-dynamic
src_backend_libbackend_la_LIBADD = \
$(GLIBMM_LIBS)
# Please keep this in sorted order:
src_backend_libbackend_la_SOURCES = \
src/backend/concrete_environment.cc \
src/backend/concrete_history.cc \
src/backend/concrete_process_statistics.cc \
src/backend/concrete_simulation.cc \
src/backend/concrete_simulation_statistics.cc \
src/backend/concrete_statistics.cc \
src/backend/concrete_thread_statistics.cc \
src/backend/cpp_resource_policy_manager.cc \
src/backend/cpu_policies_gatekeeper.cc \
src/backend/cpu_policy.cc \
src/backend/cpu_policy_exception.cc \
src/backend/cpu_policy_manager.cc \
src/backend/dynamic_process.cc \
src/backend/dynamic_request.cc \
src/backend/dynamic_resource.cc \
src/backend/dynamic_schedulable.cc \
src/backend/dynamic_sub_request.cc \
src/backend/dynamic_thread.cc \
src/backend/environment.cc \
src/backend/global_preferences.cc \
src/backend/history.cc \
src/backend/history_observer.cc \
src/backend/invalid_plugin_exception.cc \
src/backend/key_file.cc \
src/backend/malformed_policy_exception.cc \
src/backend/module.cc \
src/backend/null_policy_exception.cc \
src/backend/plugin_manager.cc \
src/backend/policy_parameters.cc \
src/backend/process.cc \
src/backend/process_statistics.cc \
src/backend/ready_queue.cc \
src/backend/request.cc \
src/backend/resource.cc \
src/backend/resource_policies_gatekeeper.cc \
src/backend/resource_policy.cc \
src/backend/resource_policy_fifo.cc \
src/backend/resource_policy_lifo.cc \
src/backend/resource_policy_manager.cc \
src/backend/resource_policy_priority.cc \
src/backend/resource_policy_priority_inheritance.cc \
src/backend/schedulable.cc \
src/backend/schedulable_statistics.cc \
src/backend/scheduler.cc \
src/backend/serialize_visitor.cc \
src/backend/serializer.cc \
src/backend/serializer_error.cc \
src/backend/serializers_gatekeeper.cc \
src/backend/simulation.cc \
src/backend/simulation_observer.cc \
src/backend/simulation_statistics.cc \
src/backend/static_process.cc \
src/backend/static_request.cc \
src/backend/static_resource.cc \
src/backend/static_schedulable.cc \
src/backend/static_sub_request.cc \
src/backend/static_thread.cc \
src/backend/statistics.cc \
src/backend/string_utils.cc \
src/backend/sub_request.cc \
src/backend/thread.cc \
src/backend/thread_statistics.cc \
src/backend/user_interrupt_exception.cc
# Put here header files that will be installed for the user
# For headers used internally by the backend, see below.
# Please note that the first listed header is generated by
# configure.
pkginclude_HEADERS += \
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/environment.hh \
src/backend/sgpemv2/global_preferences.hh \
src/backend/sgpemv2/history.hh \
src/backend/sgpemv2/history_observer.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/process_statistics.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_manager.hh \
src/backend/sgpemv2/process.hh \
src/backend/sgpemv2/schedulable.hh \
src/backend/sgpemv2/schedulable_statistics.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/sgpemv2-visibility.hh \
src/backend/sgpemv2/simulation.hh \
src/backend/sgpemv2/simulation_observer.hh \
src/backend/sgpemv2/simulation_statistics.hh \
src/backend/sgpemv2/statistics.hh \
src/backend/sgpemv2/string_utils.hh \
src/backend/sgpemv2/sub_request.hh \
src/backend/sgpemv2/thread.hh \
src/backend/sgpemv2/thread_statistics.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.
noinst_HEADERS += \
src/backend/cpp_resource_policy_manager.hh \
src/backend/concrete_environment.hh \
src/backend/concrete_history.hh \
src/backend/concrete_process_statistics.hh \
src/backend/concrete_simulation.hh \
src/backend/concrete_simulation_statistics.hh \
src/backend/concrete_statistics.hh \
src/backend/concrete_thread_statistics.hh \
src/backend/dynamic_process.hh \
src/backend/dynamic_request.hh \
src/backend/dynamic_resource.hh \
src/backend/dynamic_schedulable.hh \
src/backend/dynamic_sub_request.hh \
src/backend/dynamic_thread.hh \
src/backend/resource_policy_fifo.hh \
src/backend/resource_policy_lifo.hh \
src/backend/resource_policy_priority.hh \
src/backend/resource_policy_priority_inheritance.hh \
src/backend/static_process.hh \
src/backend/static_request.hh \
src/backend/static_resource.hh \
src/backend/static_schedulable.hh \
src/backend/static_sub_request.hh \
src/backend/static_thread.hh
# ############################################################
#
# source : main executable
#
# ############################################################
# Program & library names
bin_PROGRAMS += sgpemv2
sgpemv2_CPPFLAGS = \
-I@top_srcdir@ \
-I@top_srcdir@/src/backend \
-DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED \
-DEXAMPLESDIR="\"$(examplesdir)\"" \
-DLOCALEDIR="\"$(localedir)\"" \
-DSHAREDIR="\"$(sharedir)\"" \
-DUIDIR="\"$(uidir)\"" \
$(CAIROMM_CFLAGS) \
$(GTKMM_CFLAGS) \
$(LIBGLADEMM_CFLAGS) \
$(GTHREAD_CFLAGS)
sgpemv2_CXXFLAGS = \
$(VISIB_HIDDEN)
sgpemv2_LDFLAGS = \
-Wl,-rpath -Wl,"$(pkglibdir)"
sgpemv2_LDADD = \
src/backend/libbackend.la \
$(CAIROMM_LIBS) \
$(GTKMM_LIBS) \
$(GTHREAD_LIBS)
# Please keep this in sorted order:
sgpemv2_SOURCES = \
src/add_request_dialog.cc \
src/cairo_elements.cc \
src/cairo_widget.cc \
src/configure_policy_dialog.cc \
src/graphical_preferences_editor.cc \
src/gui_builder.cc \
src/holt_container_window.cc \
src/holt_widget.cc \
src/jump_to_dialog.cc \
src/main.cc \
src/parse_opts.cc \
src/ready_queue_widget.cc \
src/resources_widget.cc \
src/schedulables_statistics_widget.cc \
src/schedulables_tree_widget.cc \
src/simulation_controller.cc \
src/simulation_statistics_widget.cc \
src/simulation_widget.cc \
src/statistics_container_window.cc \
src/text_simulation.cc
noinst_HEADERS += \
src/add_request_dialog.hh \
src/cairo_elements.hh \
src/cairo_widget.hh \
src/configure_policy_dialog.hh \
src/graphical_preferences_editor.hh \
src/gui_builder.hh \
src/holt_container_window.hh \
src/holt_widget.hh \
src/jump_to_dialog.hh \
src/main.hh \
src/parse_opts.hh \
src/ready_queue_widget.hh \
src/resources_widget.hh \
src/schedulables_statistics_widget.hh \
src/schedulables_tree_widget.hh \
src/schedulables_statistics_widget.hh \
src/simulation_controller.hh \
src/simulation_statistics_widget.hh \
src/simulation_widget.hh \
src/statistics_container_window.hh \
src/text_simulation.hh
# ---------- gtkbuilder xml files -----------
ui_DATA = \
data/logo.png \
ui/add-process-dialog.ui \
ui/add-request-dialog.ui \
ui/add-resource-dialog.ui \
ui/add-thread-dialog.ui \
ui/configure-dialog.ui \
ui/jump-to-dialog.ui \
ui/main-window.ui \
ui/statistics-window.ui
EXTRA_DIST += $(ui_DATA)
# ############################################################
#
# source : templates
#
# ############################################################
templates_HEADERS += \
src/backend/sgpemv2/templates/deletor.tcc \
src/backend/sgpemv2/templates/down_cast.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
# ############################################################
#
# check : testsuite
#
# ############################################################
if COND_TESTS
# DEJATOOL = src/testsuite/example-test.exp
noinst_PROGRAMS = \
src/testsuite/test-cairo_widget \
src/testsuite/test-history \
src/testsuite/test-holt_widget \
src/testsuite/test-key_file \
src/testsuite/test-simulation_widget \
src/testsuite/test-statistics
# disable :
# src/testsuite/test-global_preferences_serialization
# src/testsuite/test-parse_command
# src/testsuite/test-stepforward
src_testsuite_test_history_CPPFLAGS = \
-I@top_srcdir@/src/backend \
$(GLIBMM_CFLAGS)
src_testsuite_test_history_LDFLAGS = \
-Wl,-rpath -Wl,"$(pkglibdir)" \
src/backend/libbackend.la \
$(GLIBMM_LIBS)
src_testsuite_test_history_SOURCES = \
src/backend/concrete_environment.cc \
src/backend/concrete_history.cc \
src/backend/dynamic_process.cc \
src/backend/dynamic_request.cc \
src/backend/dynamic_resource.cc \
src/backend/dynamic_schedulable.cc \
src/backend/dynamic_sub_request.cc \
src/backend/dynamic_thread.cc \
src/backend/static_process.cc \
src/backend/static_request.cc \
src/backend/static_resource.cc \
src/backend/static_schedulable.cc \
src/backend/static_sub_request.cc \
src/backend/static_thread.cc \
src/testsuite/test-history.cc
src_testsuite_test_statistics_CPPFLAGS = \
-I@top_srcdir@/src/backend \
$(GLIBMM_CFLAGS) $(GTHREAD_CFLAGS)
src_testsuite_test_statistics_LDFLAGS = \
-Wl,-rpath -Wl,"$(pkglibdir)" \
src/backend/libbackend.la \
$(GLIBMM_LIBS) $(GTHREAD_LIBS)
src_testsuite_test_statistics_SOURCES = \
src/backend/statistics.cc \
src/backend/concrete_process_statistics.cc \
src/backend/concrete_thread_statistics.cc \
src/backend/concrete_simulation_statistics.cc \
src/backend/concrete_statistics.cc \
src/testsuite/test-statistics.cc
#src_testsuite_test_global_preferences_serialization_CPPFLAGS = \
# -I@top_srcdir@/src/backend \
# $(GLIBMM_CFLAGS)
#src_testsuite_test_global_preferences_serialization_LDFLAGS = \
# src/backend/libbackend.la \
# -Wl,-rpath -Wl,"$(pkglibdir)" \
# $(GLIBMM_LIBS)
#src_testsuite_test_global_preferences_serialization_SOURCES = \
# src/testsuite/test-global_preferences_serialization.cc
src_testsuite_test_key_file_CPPFLAGS = \
-I@top_srcdir@/src/backend \
$(GLIBMM_CFLAGS)
src_testsuite_test_key_file_LDFLAGS = \
-Wl,-rpath -Wl,"$(pkglibdir)" \
src/backend/libbackend.la \
$(GLIBMM_LIBS)
src_testsuite_test_key_file_SOURCES = \
src/testsuite/test-key_file.cc
src_testsuite_test_cairo_widget_CPPFLAGS = \
-I@top_srcdir@/src \
-I@top_srcdir@/src/backend \
$(CAIROMM_CFLAGS) \
$(GTKMM_CFLAGS) \
$(GLIBMM_CFLAGS)
src_testsuite_test_cairo_widget_LDFLAGS = \
$(CAIROMM_LIBS) \
$(GTKMM_LIBS) \
$(GLIBMM_LIBS)
src_testsuite_test_cairo_widget_SOURCES = \
src/cairo_elements.cc \
src/cairo_widget.cc \
src/testsuite/test-cairo_widget.cc
src_testsuite_test_simulation_widget_CPPFLAGS = \
-I@top_srcdir@/src \
-I@top_srcdir@/src/backend \
$(CAIROMM_CFLAGS) \
$(GTKMM_CFLAGS) \
$(GLIBMM_CFLAGS) \
$(GTHREAD_CFLAGS)
src_testsuite_test_simulation_widget_LDFLAGS = \
src/backend/libbackend.la \
-Wl,-rpath -Wl,"$(pkglibdir)" \
$(CAIROMM_LIBS) \
$(GTKMM_LIBS) \
$(GLIBMM_LIBS) \
$(GTHREAD_LIBS)
src_testsuite_test_simulation_widget_SOURCES = \
src/cairo_elements.cc \
src/cairo_widget.cc \
src/simulation_widget.cc \
src/testsuite/test-simulation_widget.cc
src_testsuite_test_holt_widget_CPPFLAGS = \
-I@top_srcdir@/src \
-I@top_srcdir@/src/backend \
$(CAIROMM_CFLAGS) \
$(GTKMM_CFLAGS) \
$(GLIBMM_CFLAGS) \
$(GTHREAD_CFLAGS)
src_testsuite_test_holt_widget_LDFLAGS = \
src/backend/libbackend.la \
-Wl,-rpath -Wl,"$(pkglibdir)" \
$(CAIROMM_LIBS) \
$(GTKMM_LIBS) \
$(GLIBMM_LIBS) \
$(GTHREAD_LIBS)
src_testsuite_test_holt_widget_SOURCES = \
src/cairo_elements.cc \
src/cairo_widget.cc \
src/simulation_widget.cc \
src/holt_container_window.cc \
src/holt_widget.cc \
src/testsuite/test-holt_widget.cc
#src_testsuite_test_parse_command_CPPFLAGS = \
# -I@top_srcdir@/src \
# -I@top_srcdir@/src/templates \
# $(GLIBMM_CFLAGS)
#src_testsuite_test_parse_command_LDFLAGS = \
# src/backend/libbackend.la \
# -Wl,-rpath -Wl,"$(pkglibdir)" \
# $(GLIBMM_LIBS)
#src_testsuite_test_parse_command_SOURCES = \
# src/testsuite/test-parse_command.cc
# advice: get dummy_policy from the somewhere in the repository, and compile it in.
#src_testsuite_test_stepforward_CPPFLAGS = \
# -I@top_srcdir@/src \
# -I@top_srcdir@/src/templates \
# $(GLIBMM_CFLAGS)
#src_testsuite_test_stepforward_LDFLAGS = \
# src/backend/libbackend.la \
# -Wl,-rpath -Wl,"$(pkglibdir)" \
# $(GLIBMM_LIBS)
#src_testsuite_test_stepforward_SOURCES = \
# src/testsuite/stubs/history.cc \
# src/testsuite/stubs/prrpolicy.cc \
# src/testsuite/stubs/policy_manager.cc \
# src/backend/scheduler.cc \
# src/testsuite/test-stepforward.cc
# Workaround an automake bug that leaves behind some files
# while it's finishing the distcheck target
CLEANFILES += \
src/testsuite/.libs/test-cairo_widget \
src/testsuite/.libs/test-history \
src/testsuite/.libs/test-holt_widget \
src/testsuite/.libs/test-key_file \
src/testsuite/.libs/test-simulation_widget \
src/testsuite/.libs/test-statistics
# disabled:
# src/testsuite/.libs/test-global_preferences_serialization
endif #~ if COND_TESTS
# ############################################################
#
# extra files to distribute
#
# ############################################################
noinst_DATA += \
src/testsuite/scheduling-wizards/wizard-deadlock-test \
src/testsuite/scheduling-wizards/wizard-gap-fail \
src/testsuite/scheduling-wizards/wizard-assert-fail \
src/testsuite/scheduling-wizards/wizard-unblock-test \
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
examples_DATA = \
src/testsuite/scheduling-wizards/environments/Colori_rr_prio_1_2.xgp \
src/testsuite/scheduling-wizards/environments/DiscWorld_unblock.xgp \
src/testsuite/scheduling-wizards/environments/Ducks_rr_2.xgp \
src/testsuite/scheduling-wizards/environments/FruitsBasket_complex.xgp \
src/testsuite/scheduling-wizards/environments/Fantozzi_lifo_requests.xgp \
src/testsuite/scheduling-wizards/environments/Matteo_deadlock.xgp \
src/testsuite/scheduling-wizards/environments/Matteo_preemption_fail.xgp \
src/testsuite/scheduling-wizards/environments/Modernita_gap_terminated.xgp \
src/testsuite/scheduling-wizards/environments/MyAutoDeadlock.xgp \
src/testsuite/scheduling-wizards/environments/Pensieri_fcfs.xgp \
src/testsuite/scheduling-wizards/environments/Porno_priority_inversion.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/ScuolaDiMileto_gap_fail.xgp \
src/testsuite/scheduling-wizards/environments/TheSecretOfMonkeyIsland.xgp
EXTRA_DIST += $(noinst_DATA) $(examples_DATA)

16
README
View File

@ -9,18 +9,14 @@ For convenience, here's a short glance at the
build process (while the manual isn't finished):
in the source package root directory, type:
mkdir =build && cd =build
../configure --prefix=/path/to/installation/dir
make
su -c "make install"
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/installation/dir
cmake --build .
sudo cmake --build . --target install
if you want to generate API documentation via Doxygen:
if you want to generate API documentation via Doxygen and makeinfo:
make apidox
if you want PDFs of the user and developer manuals,
make pdf
make doc
As simple as that.

0
TODO
View File

View File

@ -1,20 +0,0 @@
#!/bin/sh
# Changelog from SVN (svn2cl)
if [ -d .svn ]; then
if [ "x$no_log" != "x1" ]; then
# only recreate if we're in svn repository
echo "*info* creating ChangeLog from SVN history"
sh ./config/svn2cl.sh
curdir=`pwd`
for i in plugins/*; do
echo "Entering also in directory: ${i}"
cd "${i}" && sh ../../config/svn2cl.sh
cd ${curdir}
done
fi
fi
touch ChangeLog
# run autoreconf
autoreconf -i --warnings=all -B m4 -v

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
#!/bin/sh
#find . -name "*.cc" -or -name "*.hh" -or -name "*.tcc" | \
# xargs indent -v -sc -psl -bls -bad -bap -bbb -nsob \
# -bli0 -cli0 -cbi0 -npcs -cs -nsaf -nsai -nsaw \
# -nprs -i2 -lp -ppi2 -l80 -nbbo -hnl -ss -di8 -nbc
find . -name "*.cc" -or -name "*.hh" -or -name "*.tcc" | \
xargs astyle --style=ansi -s2 -b -N -L -p -O -V \
--mode=c

View File

@ -1,18 +0,0 @@
# pkg-config configuration file for sgpemv2 - UNINSTALLED version
prefix=@prefix@
exec_prefix=${prefix}
libdir=@abs_top_builddir@
includedir=@abs_top_srcdir@/src/backend
datarootdir=@datarootdir@
policies_dir=@datadir@/@PACKAGE@/policies
plugins_dir=@datadir@/@PACKAGE@/plugins
Name: SGPEMv2
Description: An educational simulator for process scheduling and management
Version: @PACKAGE_VERSION@
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}

View File

@ -1,18 +0,0 @@
# pkg-config configuration file for sgpemv2
prefix=@prefix@
exec_prefix=${prefix}
libdir=@libdir@/@PACKAGE@
includedir=${prefix}/include
datarootdir=@datarootdir@
policies_dir=@datadir@/@PACKAGE@/policies
plugins_dir=@datadir@/@PACKAGE@/plugins
Name: SGPEMv2
Description: An educational simulator for process scheduling and management
Version: @PACKAGE_VERSION@
URL: http://www.math.unipd.it/
Requires: glibmm-2.4 >= 2.8 gthread-2.0 >= 2.8
Libs: -L${libdir} -lbackend
Libs.private: -lglibmm-2.4 -lgthread-2.0
Cflags: -I${includedir}

View File

@ -1,130 +0,0 @@
#!/bin/sh
# svn2cl.sh - front end shell script for svn2cl.xsl, calls xsltproc
# with the correct parameters
#
# Copyright (C) 2005 Arthur de Jong.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. The name of the author may not be used to endorse or promote
# products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# exit on any failures
set -e
# svn2cl version
VERSION="0.3"
# set default parameters
STRIPPREFIX=`basename $(pwd)`
LINELEN=75
GROUPBYDAY="no"
INCLUDEREV="no"
CHANGELOG="ChangeLog"
# do command line checking
prog=`basename $0`
while [ -n "$1" ]
do
case "$1" in
--strip-prefix)
STRIPPREFIX="$2"
shift 2
;;
--linelen)
LINELEN="$2";
shift 2
;;
--group-by-day)
GROUPBYDAY="yes";
shift
;;
-r|--include-rev)
INCLUDEREV="yes";
shift
;;
-o|--output)
CHANGELOG="$2"
shift 2
;;
--stdout)
CHANGELOG="-"
shift
;;
-V|--version)
echo "$prog $VERSION";
echo "Written by Arthur de Jong."
echo ""
echo "Copyright (C) 2005 Arthur de Jong."
echo "This is free software; see the source for copying conditions. There is NO"
echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
exit 0
;;
-h|--help)
echo "Usage: $prog [OPTION]..."
echo "Generate a ChangeLog from a checked out subversion repository."
echo ""
echo " --strip-prefix NAME prefix to strip from all entries, defaults"
echo " to the name of the current directory"
echo " --linelen NUM maximum length of an output line"
echo " --group-by-day group changelog entries by day"
echo " -r, --include-rev include revision numbers"
echo " -o, --output FILE output to FILE instead of ChangeLog"
echo " -f, --file FILE alias for -o, --output"
echo " --stdout output to stdout instead of ChangeLog"
echo " -h, --help display this help and exit"
echo " -V, --version output version information and exit"
exit 0
;;
*)
echo "$prog: invalid option -- $1"
echo "Try \`$prog --help' for more information."
exit 1
;;
esac
done
# find the directory that this script resides in
prog="$0"
while [ -h "$prog" ]
do
prog=`ls -ld "$prog" | sed "s/^.*-> \(.*\)/\1/;/^[^/]/s,^,$(dirname "$prog")/,"`
done
dir=`dirname $prog`
dir=`cd $dir && pwd`
XSL="$dir/svn2cl.xsl"
# redirect stdout to the changelog file if needed
if [ "x$CHANGELOG" != "x-" ]
then
exec > "$CHANGELOG"
fi
# actually run the command we need
svn --verbose --xml log | \
xsltproc --stringparam strip-prefix "$STRIPPREFIX" \
--stringparam linelen $LINELEN \
--stringparam groupbyday $GROUPBYDAY \
--stringparam include-rev $INCLUDEREV \
"$XSL" -

View File

@ -1,215 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
svn2cl.xsl - xslt stylesheet for converting svn log to a normal
changelog
This file is based on several implementations of this conversion
that I was not completely happy with and some other common
xslt constructs found on the web.
Copyright (C) 2004 Arthur de Jong.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. The name of the author may not be used to endorse or promote
products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<!--
TODO
- make external lookups of author names possible
- find a place for revision numbers
- mark deleted files as such
- combine paths
- make stripping of characters nicer
-->
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:output
method="text"
encoding="iso-8859-15"
media-type="text/plain"
omit-xml-declaration="yes"
standalone="yes"
indent="no" />
<xsl:strip-space elements="*" />
<!-- the prefix of pathnames to strip -->
<xsl:param name="strip-prefix" select="'/'" />
<!-- format one entry from the log -->
<xsl:template match="logentry">
<!-- date -->
<xsl:apply-templates select="date" />
<!-- two spaces -->
<xsl:text> </xsl:text>
<!-- author's name -->
<xsl:apply-templates select="author" />
<!-- two newlines -->
<xsl:text>
</xsl:text>
<!-- the log message -->
<xsl:apply-templates select="msg" />
<!-- another two newlines -->
<xsl:text>
</xsl:text>
</xsl:template>
<!-- format date -->
<xsl:template match="date">
<xsl:variable name="date" select="normalize-space(.)" />
<xsl:value-of select="substring($date,1,10)" />
<xsl:text> </xsl:text>
<xsl:value-of select="substring($date,12,5)" />
</xsl:template>
<!-- format author -->
<xsl:template match="author">
<xsl:value-of select="normalize-space(.)" />
</xsl:template>
<!-- format log message -->
<xsl:template match="msg">
<!-- first line is indented (other indents are done in wrap template) -->
<xsl:text> * </xsl:text>
<!-- get paths string -->
<xsl:variable name="paths">
<xsl:apply-templates select="../paths" />
</xsl:variable>
<!-- print the paths and message nicely wrapped -->
<xsl:call-template name="wrap">
<xsl:with-param name="txt" select="concat($paths,': ',normalize-space(.))" />
</xsl:call-template>
</xsl:template>
<!-- present paths nice -->
<xsl:template match="paths">
<xsl:for-each select="path">
<xsl:sort select="normalize-space(.)" data-type="text" />
<xsl:if test="not(position()=1)">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:variable name="p1" select="normalize-space(.)" />
<xsl:variable name="p2">
<xsl:choose>
<xsl:when test="starts-with($p1,'/')">
<xsl:value-of select="substring($p1,2)" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$p1" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="p3">
<xsl:choose>
<xsl:when test="starts-with($p2,$strip-prefix)">
<xsl:value-of select="substring($p2,1+string-length($strip-prefix))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$p2" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="p4">
<xsl:choose>
<xsl:when test="starts-with($p3,'/')">
<xsl:value-of select="substring($p3,2)" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$p3" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$p4 = ''">
<xsl:value-of select="'.'" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$p4" />
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<!-- string-wrapping template -->
<xsl:template name="wrap">
<xsl:param name="txt" />
<xsl:variable name="linelen" select="67" />
<xsl:choose>
<xsl:when test="(string-length($txt) &lt; $linelen) or not(contains($txt,' '))">
<!-- this is easy, nothing to do -->
<xsl:value-of select="$txt" />
</xsl:when>
<xsl:otherwise>
<!-- find the first line -->
<xsl:variable name="tmp" select="substring($txt,1,$linelen)" />
<xsl:variable name="line">
<xsl:choose>
<xsl:when test="contains($tmp,' ')">
<xsl:call-template name="find-line">
<xsl:with-param name="txt" select="$tmp" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring-before($txt,' ')" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- print line and newline -->
<xsl:value-of select="$line" />
<xsl:text>
</xsl:text>
<!-- wrap the rest of the text -->
<xsl:call-template name="wrap">
<xsl:with-param name="txt" select="normalize-space(substring($txt,string-length($line)+1))" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- template to trim line to contain space as last char -->
<xsl:template name="find-line">
<xsl:param name="txt" />
<xsl:choose>
<xsl:when test="substring($txt,string-length($txt),1) = ' '">
<xsl:value-of select="normalize-space($txt)" />
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="find-line">
<xsl:with-param name="txt" select="substring($txt,1,string-length($txt)-1)" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,169 +0,0 @@
# configure.ac - Copyright 2005, 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 3 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, see http://www.gnu.org/licenses/.
dnl ----------------- CONFIGURE ---------------------
AC_INIT([sgpemv2],[1.1],[matteo@member.fsf.org])
if test -f "`pwd`/configure.ac"; then
AC_MSG_FAILURE([
** This seems to be the pkg root directory.
** Compiling here your sources is considered
** as unpolite as exploring your nose with
** your pinky whilst attending a wedding party.
** Please create a new dir as described in
** the README file, and then run configure
** into it. If you think you've got it right,
** please inform the mantainer of this error!
** He'll thoroughfully bash his head on the wall.],
-1 )
fi
AC_USE_SYSTEM_EXTENSIONS
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_TARGET
dnl starting automake
AM_INIT_AUTOMAKE([dejagnu dist-bzip2 subdir-objects])
AM_SILENT_RULES([yes])
dnl HACK to avoid multiple definition of macros when
dnl including spgemv2-config.h (autoheader generated)
AH_TOP([#if not defined PACKAGE])
AH_BOTTOM([#endif])
dnl gettext & libtool
LT_INIT
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.17])
dnl various requisites
SIGCPP_VERSION=2.2.9
GLIBMM_VERSION=2.32.0
GTHREAD_VERSION=2.32.0
GTKMM_VERSION=3.4.0
CAIROMM_VERSION=1.10.0
dnl c++ compiler and flags
AC_PROG_CXX
AC_CHECK_CXXFLAG([CXXFLAGS], [Wall])
AC_CHECK_CXXFLAG([CXXFLAGS], [pedantic])
AC_CHECK_CXXFLAG([CXXFLAGS], [Wextra])
AC_CHECK_CXXFLAG([CXXFLAGS], [Wno-long-long])
AC_CHECK_CXXFLAG([CXXFLAGS], [Wno-strict-aliasing])
AC_CHECK_LDFLAG([LDFLAGS], [--as-needed])
dnl test for deprecated Gtk+ features, since 3.0 is coming up the pipe
AC_CHECK_CXXFLAG([CXXFLAGS], [DGTK_DISABLE_DEPRECATED])
AC_CHECK_CXXFLAG([CXXFLAGS], [DGSEAL_ENABLE])
dnl see if we've to enable debug flags
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug],
[turn on debug compiler flags. Disabled by default]),
[enable_debug="$enableval"], [enable_debug="no"])
if test "$enable_debug" = "yes"; then
AC_CHECK_CXXFLAG([CXXFLAGS], [O0])
AC_CHECK_CXXFLAG([CXXFLAGS], [g3])
else
AC_CHECK_CXXFLAG([CXXFLAGS], [DNDEBUG])
fi
dnl see if we have to enable visibility support
AC_ARG_ENABLE([visibility-support],
AS_HELP_STRING([--enable-visibility-support],
[enable the new GCC visibility support; requires GCC >= 4.0 to work.]),
[enable_gcc_visibility="$enableval"],
[enable_gcc_visibility="yes"])
AC_MSG_CHECKING([whether to use new GCC visibility attributes])
AC_MSG_RESULT([$enable_gcc_visibility])
if test "x$enable_gcc_visibility" = "xno"; then
CPPFLAGS="${CPPFLAGS} -DDISABLE_VISIBILITY_SUPPORT"
else
AC_CHECK_CXXFLAG([CXXFLAGS], [fvisibility-inlines-hidden])
fi
AC_PROG_INSTALL
dnl make
AC_PROG_MAKE_SET
dnl check for gtkmm & cairo
PKG_PROG_PKG_CONFIG([0.19])
if test -z "$PKG_CONFIG"; then
AC_MSG_ERROR([You may need to update your pkg-config installation])
fi
PKG_CHECK_MODULES([CAIROMM],
[cairomm-1.0 >= $CAIROMM_VERSION],
:, AC_MSG_ERROR([$CAIROMM_PKG_ERRORS]))
PKG_CHECK_MODULES([GTHREAD],
[gthread-2.0 >= $GTHREAD_VERSION],
:, AC_MSG_ERROR([$GTHREAD_PKG_ERRORS]))
PKG_CHECK_MODULES([SIGCPP],
[sigc++-2.0 >= $SIGCPP_VERSION],
:, AC_MSG_ERROR([$SIGCPP_PKG_ERRORS]))
PKG_CHECK_MODULES([GLIBMM],
[glibmm-2.4 >= $GLIBMM_VERSION],
:, AC_MSG_ERROR([$GLIBMM_PKG_ERRORS]))
PKG_CHECK_MODULES([GTKMM],
[gtkmm-3.0 >= $GTKMM_VERSION],
:, AC_MSG_ERROR([$GTKMM_PKG_ERRORS]))
dnl check for Doxygen
AC_CHECK_PROG([HAVE_DOXYGEN],[doxygen],[yes])
AC_CHECK_PROG([HAVE_DOT],[dot], [yes])
AM_CONDITIONAL([HAVE_DOXYGEN],[test x$HAVE_DOXYGEN = xyes])
dnl see if we've to compile tests
AC_MSG_CHECKING([whether tests have to be built])
AC_ARG_ENABLE([tests],
AS_HELP_STRING([--disable-tests],
[don't compile the tests provided with sgpemv2]),
[compile_tests="$enableval"],
[compile_tests="yes"])
AC_MSG_RESULT([$compile_tests])
AM_CONDITIONAL([COND_TESTS], [test "$compile_tests" = "yes"])
dnl output files
AC_CONFIG_FILES([config/Doxyfile config/sgpemv2.pc \
config/sgpemv2-uninstalled.pc data/sgpemv2.desktop])
AC_CONFIG_HEADERS([config.h:config.h.in])
# force include of configuration header in every compilation unit
CPPFLAGS="${CPPFLAGS} -include config.h"
dnl configure plugin directories
dnl TODO: make this conditional
AC_CONFIG_FILES([plugins/pyloader/config/sgpemv2-uninstalled.pc:config/sgpemv2-uninstalled.pc.in])
AC_CONFIG_FILES([plugins/xmlsave/config/sgpemv2-uninstalled.pc:config/sgpemv2-uninstalled.pc.in])
AC_CONFIG_SUBDIRS([plugins/pyloader plugins/xmlsave])
# Now, output this very package Makefiles:
AC_CONFIG_FILES([
Makefile
po/Makefile.in
])
AC_OUTPUT

View File

@ -1,55 +0,0 @@
#!/bin/sh
curdir="$(pwd)"
if [ "${1}" = "" ]; then
echo "You need to pass the control file as the first parameter of this script."
echo "Usage: ./build.sh <control-file> <package.tar.bz2>"
exit -1
fi
pkgname="$( awk '/^Package/ { print $2; }' "${1}" )"
version="$( awk '/^Version/ { print $2; }' "${1}" )"
echo "Building debian package from ${1}."
tarname="${pkgname}-${version}.tar.bz2"
if [ ! -f "${tarname}" ]; then
echo "Please put the source package ${tarname} in this directory and launch me again."
exit -1
fi
tar -xvjf "${tarname}"
cd "${pkgname}-${version}"
mkdir =build
cd =build
CXXFLAGS="-O3 -pipe" ../configure --disable-tests --disable-debug --disable-static --prefix=/usr
make
make pdf
destdir="${curdir}/inst-root"
make DESTDIR="${destdir}" install-strip
docdir="${destdir}/usr/share/doc/${pkgname}-${version}"
mkdir -p "${docdir}"
cp doc/sgpem2uman.pdf doc/sgpem2dman.pdf "${docdir}"
cd ..
for i in AUTHORS NEWS README COPYING ChangeLog; do
gzip -c "${i}" > "${docdir}/${i}.gz"
done
cd ${curdir}
pkg_size="$( du -sk "${curdir}" | awk '{ print $1; }' )"
mkdir -p "${destdir}/DEBIAN"
sed "s|@SIZE@|${pkg_size}|g" "$1" > "${destdir}/DEBIAN/control"
dpkg -b "${destdir}" .
rm -rf "${pkgname}-${version}"
rm -rf "${destdir}"

View File

@ -1,22 +0,0 @@
Package: sgpemv2
Version: 1.0
Section: misc
Priority: optional
Architecture: i386
Pre-Depends: libstdc++6
Depends: libgtkmm-2.4-1c2a, libglademm-2.4-1c2a, libxml2 (>= 2.6.10), libcairo, python (>= 2.3), python (<< 2.5)
Installed-Size: @SIZE@
Maintainer: Marco Trevisan <evenjn@gmail.com>
Provides: sgpemv2
Description: A graphical process management simulator with educational purposes.
.
SGPEM is an Italian acronym, standing for "Simulatore della Gestione
dei Processi in un Elaboratore Multiprogrammato" (in English, "Process
Management Simulator for a Multitasking Computer"). It was initially
developed for use inside the "Operating Systems" teaching, part of the
Computer Science course of the University of Padova, Italy.
.
The aim of SGPEM is to provide an easy-to-use environment for simulating
process scheduling policies, and for assigning resources in a multitasking
computer. SGPEMv2 is an educational software, and it can help students
to better understand the functionality of operating systems.

View File

@ -1,22 +0,0 @@
Package: sgpemv2
Version: 1.1
Section: misc
Priority: optional
Architecture: i386
Pre-Depends: libstdc++6
Depends: libgtkmm-2.4-1c2a (>= 2.12.1), libxml2 (>= 2.6.10), libcairo, python (>= 2.5)
Installed-Size: @SIZE@
Maintainer: Matteo Settenvini <matteo@member.fsf.org>
Provides: sgpemv2
Description: A graphical process management simulator with educational purposes.
.
SGPEM is an Italian acronym, standing for "Simulatore della Gestione
dei Processi in un Elaboratore Multiprogrammato" (in English, "Process
Management Simulator for a Multitasking Computer"). It was initially
developed for use inside the "Operating Systems" teaching, part of the
Computer Science course of the University of Padova, Italy.
.
The aim of SGPEM is to provide an easy-to-use environment for simulating
process scheduling policies, and for assigning resources in a multitasking
computer. SGPEMv2 is an educational software, and it can help students
to better understand the functionality of operating systems.

View File

@ -1,17 +0,0 @@
.deb files creation
+++++++++++++++++++
To create a debian package from a control file:
* launch the script in this directory "./build.sh",
with the control file as a parameter.
* wait a lot of time
* cross fingers
* wait some more time
* uncross fingers (before they decide to go and
find a new job as tip-tap dancers in Siberia)
* rejoice! you've a package.
For doubts or envy, tell Matteo.
*** TODO: add script in .deb that calls ldconfig during postinst

View File

@ -1,68 +0,0 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
DESCRIPTION="A graphical process management simulator for a multitasking
computer, developed with educational aims for Operating Systems courses at
universities"
HOMEPAGE="http://www.smoking-gnu.net/xhtml/projects.php?sgpemv2"
SRC_URI="http://www.smoking-gnu.net/res/tar-pit/sgpemv2/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="debug doc"
DEPEND="
>=dev-cpp/gtkmm-2.8
>=dev-cpp/glibmm-2.8
>=dev-cpp/libglademm-2.6
>=dev-libs/libxml2-2.6.10
>=x11-libs/cairo-1.0
>=dev-lang/swig-1.3
>=dev-lang/python-2.3
doc? (
app-doc/doxygen
app-text/tetex
sys-apps/texinfo
)"
src_compile() {
if use debug; then
conf_opts="--enable-debug"
else
conf_opts="--disable-tests"
fi
conf_opts="${conf_opts} --enable-visibility-support"
mkdir build && cd build
../configure --prefix=/usr \
--host=${CHOST} \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--datadir=/usr/share \
--sysconfdir=/etc \
--localstatedir=/var/lib \
${EXTRA_ECONF} ${conf_opts} || die "configure failed"
emake || die "make all failed"
if use doc; then
make pdf
fi
}
src_install() {
dodoc AUTHORS COPYING NEWS README ChangeLog
cd build
make install DESTDIR="${D}"
if use doc; then
dohtml -r doc/API/html/*
docinto manuals
dodoc doc/sgpem2dman.pdf doc/sgpem2uman.pdf
fi
}

View File

@ -1,114 +0,0 @@
# initial defines
%define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0)
%define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0)
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
%define dist redhat
%define disttag rh
%if %is_mandrake
%define dist mandrake
%define disttag mdk
%endif
%if %is_suse
%define dist suse
%define disttag suse
%endif
%if %is_fedora
%define dist fedora
%define disttag rhfc
%endif
%define distver %(release="`rpm -q --queryformat='%{VERSION}' %{dist}-release 2> /dev/null | tr . : | sed s/://g`" ; if test $? != 0 ; then release="" ; fi ; echo "$release")
# Please keep this file up-to-date for each release.
# See: http://www.rpm.org/max-rpm/p5208.html for an explanation.
Summary: A graphical process management simulator for a multitasking computer
Name: sgpemv2
Version: 1.0
Release: 1.%{disttag}
Copyright: GPL-2
Group: Applications/Engineering
Source0: http://www.smoking-gnu.net/res/tar-pit/sgpemv2/%{name}-%{version}.tar.bz2
URL: http://www.smoking-gnu.net/xhtml/projects.php?sgpemv2
Packager: Paolo Santi <psanti@studenti.math.unipd.it>
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define _topdir %(curdir="`pwd`"; echo "$curdir")
%description
SGPEM is an Italian acronym, standing for "Simulatore della Gestione
dei Processi in un Elaboratore Multiprogrammato" (in English, "Process
Management Simulator for a Multitasking Computer"). It was initially
developed for use inside the "Operating Systems" teaching, part of the
Computer Science course of the University of Padova, Italy. The aim of
SGPEM is to provide an easy-to-use environment for simulating process
scheduling policies, and for assigning resources in a multitasking
computer. SGPEMv2 is an educational software, and it can help students
to better understand the functionality of operating systems.
%prep
%setup
%build
cd ${RPM_BUILD_DIR}/${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}
mkdir build && cd build
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
../configure --host=%{_host} --build=%{_build} \
--target=%{_target_platform} \
--program-prefix=%{?_program_prefix} \
--prefix=%{_prefix} \
--exec-prefix=%{_exec_prefix} \
--bindir=%{_bindir} \
--sbindir=%{_sbindir} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
--includedir=%{_includedir} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--localstatedir=%{_localstatedir} \
--sharedstatedir=%{_sharedstatedir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--disable-tests \
--disable-debug \
--disable-rpath \
--disable-static \
--disable-visibility-support
make
make pdf
%install
# create docdir:
documents="$RPM_BUILD_ROOT%{_docdir}/%{name}"
mkdir -p "${documents}"
# install standard documentation:
cd ${RPM_BUILD_DIR}/${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}
cp AUTHORS COPYING NEWS ChangeLog "${documents}"
# install everything else
cd build
make DESTDIR="${RPM_BUILD_ROOT}/${_prefix}" install-strip
# install also pdf manuals
cp doc/sgpem2uman.pdf doc/sgpem2dman.pdf "${documents}"
%files
%defattr(-,root,root)
# This works correctly because we're using a build root:
/
%clean
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"
%changelog
* Tue Sep 14 2006 - matteo (at) member.fsf.org
- Prepare first release of SGPEMv2 and build rpm

View File

@ -1,12 +0,0 @@
Building RPMs
-----------------
Launch the build process like:
rpmbuild -bb SPECS/sgpemv2-$(version).spec
where $(version) is the version you want to build
a spec for. You'll need to put the source tbz2 into SOURCES.
**** TODO: ****
- Explicitly list runtime dependencies

View File

@ -1,229 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="_sgpem"
ProjectGUID="{8B810FB6-B138-45B0-AB81-228076316780}"
RootNamespace="_sgpem"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader"
IntermediateDirectory="$(ConfigurationName)\intermediate\plugins\extras\pyloader"
ConfigurationType="2"
InheritedPropertySheets="$(GTKMM_BASEPATH)\MSVC\gtkmm-2.4d.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
Description="Launch SWIG"
CommandLine="swig -python -c++ -Wall -o &quot;$(SolutionDir)..\..\plugins\pyloader\src\sgpem_wrap.cxx&quot; &quot;$(SolutionDir)..\..\plugins\pyloader\src\sgpem.i&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)..\..\plugins\pyloader\src\*.py&quot; &quot;$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader&quot;&#x0D;&#x0A;"
ExcludedFromBuild="false"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)config&quot;;&quot;$(SolutionDir)..\..&quot;;&quot;$(PYTHON_BASEPATH)\include&quot;;&quot;$(SolutionDir)..\..\src\backend&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_SGPEM_EXPORTS;_SECURE_SCL_THROWS;VISIBILITY_SUPPORT_HH"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
DisableSpecificWarnings="4250;4290;4275;4251;4297"
ForcedIncludeFiles="config.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="&#x0D;&#x0A;"
AdditionalDependencies="python27.lib backend.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(PYTHON_BASEPATH)\libs&quot;;&quot;$(SolutionDir)$(ConfigurationName)&quot;"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="move &quot;$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader\_sgpem.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader\_sgpem.pyd&quot;"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader"
IntermediateDirectory="$(ConfigurationName)\intermediate\plugins\extras\pyloader"
ConfigurationType="2"
InheritedPropertySheets="$(GTKMM_BASEPATH)\MSVC\gtkmm-2.4.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
Description="Launch SWIG"
CommandLine="swig -python -c++ -Wall -o &quot;$(SolutionDir)..\..\plugins\pyloader\src\sgpem_wrap.cxx&quot; &quot;$(SolutionDir)..\..\plugins\pyloader\src\sgpem.i&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)..\..\plugins\pyloader\src\*.py&quot; &quot;$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader&quot;&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(SolutionDir)config&quot;;&quot;$(SolutionDir)..\..&quot;;&quot;$(PYTHON_BASEPATH)\include&quot;;&quot;$(SolutionDir)..\..\src\backend&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_SGPEM_EXPORTS;VISIBILITY_SUPPORT_HH"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
DisableSpecificWarnings="4275;4290;4661;4251;4297"
ForcedIncludeFiles="config.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="python27.lib backend.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(PYTHON_BASEPATH)\libs&quot;;&quot;$(SolutionDir)$(ConfigurationName)&quot;"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="move &quot;$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader\_sgpem.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader\_sgpem.pyd&quot;"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\plugins\pyloader\src\sgpem_wrap.cxx"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
<File
RelativePath="..\..\plugins\pyloader\src\sgpem.i"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,721 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="backend"
ProjectGUID="{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}"
RootNamespace="backend"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\intermediate"
ConfigurationType="2"
InheritedPropertySheets="$(GTKMM_BASEPATH)\MSVC\gtkmm-2.4d.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)config&quot;;&quot;$(SolutionDir)..\..\src\backend&quot;;&quot;$(SolutionDir)..\..&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;BACKEND_EXPORTS;VISIBILITY_SUPPORT_HH"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
DisableSpecificWarnings="4290;4275;4250;4251"
ForcedIncludeFiles="config.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\intermediate"
ConfigurationType="2"
InheritedPropertySheets="$(GTKMM_BASEPATH)\MSVC\gtkmm-2.4.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(SolutionDir)config&quot;;&quot;$(SolutionDir)..\..\src\backend&quot;;&quot;$(SolutionDir)..\..&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BACKEND_EXPORTS;VISIBILITY_SUPPORT_HH"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
DisableSpecificWarnings="4275;4290;4661;4251"
ForcedIncludeFiles="config.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\src\backend\concrete_environment.cc"
>
</File>
<File
RelativePath="..\..\src\backend\concrete_history.cc"
>
</File>
<File
RelativePath="..\..\src\backend\concrete_process_statistics.cc"
>
</File>
<File
RelativePath="..\..\src\backend\concrete_simulation.cc"
>
</File>
<File
RelativePath="..\..\src\backend\concrete_simulation_statistics.cc"
>
</File>
<File
RelativePath="..\..\src\backend\concrete_statistics.cc"
>
</File>
<File
RelativePath="..\..\src\backend\concrete_thread_statistics.cc"
>
</File>
<File
RelativePath="..\..\src\backend\cpp_resource_policy_manager.cc"
>
</File>
<File
RelativePath="..\..\src\backend\cpu_policies_gatekeeper.cc"
>
</File>
<File
RelativePath="..\..\src\backend\cpu_policy.cc"
>
</File>
<File
RelativePath="..\..\src\backend\cpu_policy_exception.cc"
>
</File>
<File
RelativePath="..\..\src\backend\cpu_policy_manager.cc"
>
</File>
<File
RelativePath="..\..\src\backend\dynamic_process.cc"
>
</File>
<File
RelativePath="..\..\src\backend\dynamic_request.cc"
>
</File>
<File
RelativePath="..\..\src\backend\dynamic_resource.cc"
>
</File>
<File
RelativePath="..\..\src\backend\dynamic_schedulable.cc"
>
</File>
<File
RelativePath="..\..\src\backend\dynamic_sub_request.cc"
>
</File>
<File
RelativePath="..\..\src\backend\dynamic_thread.cc"
>
</File>
<File
RelativePath="..\..\src\backend\environment.cc"
>
</File>
<File
RelativePath="..\..\src\backend\global_preferences.cc"
>
</File>
<File
RelativePath="..\..\src\backend\history.cc"
>
</File>
<File
RelativePath="..\..\src\backend\history_observer.cc"
>
</File>
<File
RelativePath="..\..\src\backend\invalid_plugin_exception.cc"
>
</File>
<File
RelativePath="..\..\src\backend\key_file.cc"
>
</File>
<File
RelativePath="..\..\src\backend\malformed_policy_exception.cc"
>
</File>
<File
RelativePath="..\..\src\backend\module.cc"
>
</File>
<File
RelativePath="..\..\src\backend\null_policy_exception.cc"
>
</File>
<File
RelativePath="..\..\src\backend\plugin_manager.cc"
>
</File>
<File
RelativePath="..\..\src\backend\policy_parameters.cc"
>
</File>
<File
RelativePath="..\..\src\backend\process.cc"
>
</File>
<File
RelativePath="..\..\src\backend\process_statistics.cc"
>
</File>
<File
RelativePath="..\..\src\backend\ready_queue.cc"
>
</File>
<File
RelativePath="..\..\src\backend\request.cc"
>
</File>
<File
RelativePath="..\..\src\backend\resource.cc"
>
</File>
<File
RelativePath="..\..\src\backend\resource_policies_gatekeeper.cc"
>
</File>
<File
RelativePath="..\..\src\backend\resource_policy.cc"
>
</File>
<File
RelativePath="..\..\src\backend\resource_policy_fifo.cc"
>
</File>
<File
RelativePath="..\..\src\backend\resource_policy_lifo.cc"
>
</File>
<File
RelativePath="..\..\src\backend\resource_policy_manager.cc"
>
</File>
<File
RelativePath="..\..\src\backend\resource_policy_priority.cc"
>
</File>
<File
RelativePath="..\..\src\backend\resource_policy_priority_inheritance.cc"
>
</File>
<File
RelativePath="..\..\src\backend\schedulable.cc"
>
</File>
<File
RelativePath="..\..\src\backend\schedulable_statistics.cc"
>
</File>
<File
RelativePath="..\..\src\backend\scheduler.cc"
>
</File>
<File
RelativePath="..\..\src\backend\serialize_visitor.cc"
>
</File>
<File
RelativePath="..\..\src\backend\serializer.cc"
>
</File>
<File
RelativePath="..\..\src\backend\serializer_error.cc"
>
</File>
<File
RelativePath="..\..\src\backend\serializers_gatekeeper.cc"
>
</File>
<File
RelativePath="..\..\src\backend\simulation.cc"
>
</File>
<File
RelativePath="..\..\src\backend\simulation_observer.cc"
>
</File>
<File
RelativePath="..\..\src\backend\simulation_statistics.cc"
>
</File>
<File
RelativePath="..\..\src\backend\static_process.cc"
>
</File>
<File
RelativePath="..\..\src\backend\static_request.cc"
>
</File>
<File
RelativePath="..\..\src\backend\static_resource.cc"
>
</File>
<File
RelativePath="..\..\src\backend\static_schedulable.cc"
>
</File>
<File
RelativePath="..\..\src\backend\static_sub_request.cc"
>
</File>
<File
RelativePath="..\..\src\backend\static_thread.cc"
>
</File>
<File
RelativePath="..\..\src\backend\statistics.cc"
>
</File>
<File
RelativePath="..\..\src\backend\string_utils.cc"
>
</File>
<File
RelativePath="..\..\src\backend\sub_request.cc"
>
</File>
<File
RelativePath="..\..\src\backend\thread.cc"
>
</File>
<File
RelativePath="..\..\src\backend\thread_statistics.cc"
>
</File>
<File
RelativePath="..\..\src\backend\user_interrupt_exception.cc"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="tcc;h;hpp;hxx;hm;inl;inc;xsd;hh"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\src\backend\concrete_environment.hh"
>
</File>
<File
RelativePath="..\..\src\backend\concrete_history.hh"
>
</File>
<File
RelativePath="..\..\src\backend\concrete_process_statistics.hh"
>
</File>
<File
RelativePath="..\..\src\backend\concrete_simulation.hh"
>
</File>
<File
RelativePath="..\..\src\backend\concrete_simulation_statistics.hh"
>
</File>
<File
RelativePath="..\..\src\backend\concrete_statistics.hh"
>
</File>
<File
RelativePath="..\..\src\backend\concrete_thread_statistics.hh"
>
</File>
<File
RelativePath="..\..\src\backend\cpp_resource_policy_manager.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\cpu_policies_gatekeeper.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\cpu_policy.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\cpu_policy_exception.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\cpu_policy_manager.hh"
>
</File>
<File
RelativePath="..\..\src\backend\dynamic_process.hh"
>
</File>
<File
RelativePath="..\..\src\backend\dynamic_request.hh"
>
</File>
<File
RelativePath="..\..\src\backend\dynamic_resource.hh"
>
</File>
<File
RelativePath="..\..\src\backend\dynamic_schedulable.hh"
>
</File>
<File
RelativePath="..\..\src\backend\dynamic_sub_request.hh"
>
</File>
<File
RelativePath="..\..\src\backend\dynamic_thread.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\environment.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\global_preferences.hh"
>
</File>
<File
RelativePath="..\..\src\backend\global_preferences_serializer.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\history.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\history_observer.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\invalid_plugin_exception.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\key_file.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\malformed_policy_exception.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\module.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\null_policy_exception.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\plugin.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\plugin_manager.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\policy_parameters.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\process.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\process_statistics.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\ready_queue.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\request.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\resource.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\resource_policies_gatekeeper.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\resource_policy.hh"
>
</File>
<File
RelativePath="..\..\src\backend\resource_policy_fifo.hh"
>
</File>
<File
RelativePath="..\..\src\backend\resource_policy_lifo.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\resource_policy_manager.hh"
>
</File>
<File
RelativePath="..\..\src\backend\resource_policy_priority.hh"
>
</File>
<File
RelativePath="..\..\src\backend\resource_policy_priority_inheritance.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\schedulable.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\schedulable_statistics.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\scheduler.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\serialize_visitor.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\serializer.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\serializer_error.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\serializers_gatekeeper.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\simulation.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\simulation_observer.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\simulation_statistics.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\templates\singleton.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\templates\smartp.hh"
>
</File>
<File
RelativePath="..\..\src\backend\static_process.hh"
>
</File>
<File
RelativePath="..\..\src\backend\static_request.hh"
>
</File>
<File
RelativePath="..\..\src\backend\static_resource.hh"
>
</File>
<File
RelativePath="..\..\src\backend\static_schedulable.hh"
>
</File>
<File
RelativePath="..\..\src\backend\static_sub_request.hh"
>
</File>
<File
RelativePath="..\..\src\backend\static_thread.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\statistics.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\string_utils.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\sub_request.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\thread.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\thread_statistics.hh"
>
</File>
<File
RelativePath="..\..\src\backend\sgpemv2\user_interrupt_exception.hh"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,23 +0,0 @@
#ifndef SG_DLLEXPORT
#define SG_DLLEXPORT __declspec(dllexport)
#endif
#ifndef SG_DLLLOCAL
#define SG_DLLLOCAL
#endif
#ifndef PLUGDIR
#define PLUGDIR ".\\plugins"
#endif
#ifndef POLDIR
#define POLDIR ".\\policies"
#endif
#ifndef GLADEDIR
#define GLADEDIR ".\\glade"
#endif
#ifndef SHAREDIR
#define SHAREDIR "\\plugins\\extras\\pyloader"
#endif

View File

@ -1,11 +0,0 @@
PREREQUISITES:
- gtk+-2.8.18 or later (development): http://gladewin32.sourceforge.net/modules/news/
- gtkmm-2.8.8 or later (development): http://www.pcpm.ucl.ac.be/~gustin/win32_ports/binaries/gtkmm-devel-2.8.8-2.exe
- python-2.4: http://www.python.org/download/
- SWIG: www.swig.org
PROCEDURE:
- Be sure that environment variables are updated by the gtk+ and gtkmm installers
- Create a PYTHON_BASEPATH environment variable which points to the python installation directory
- Build. I've never been able to build with a Debug configuration because python doesn't ship
with a debug dll, but in debug it forces you to link against it.

View File

@ -1,229 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="pyloader"
ProjectGUID="{4054CAB1-7F6D-4FC7-884D-9B823F996679}"
RootNamespace="pyloader"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)\plugins"
IntermediateDirectory="$(ConfigurationName)\intermediate\plugins\pyloader"
ConfigurationType="2"
InheritedPropertySheets="$(GTKMM_BASEPATH)\MSVC\gtkmm-2.4d.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
Description="Copy Policies"
CommandLine="copy &quot;$(SolutionDir)..\..\plugins\pyloader\src\builtin-policies\*.py&quot; &quot;$(SolutionDir)$(ConfigurationName)\policies&quot;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\config&quot;;&quot;$(SolutionDir)..\..\src\backend&quot;;&quot;$(SolutionDir)..\..\plugins\pyloader&quot;;&quot;$(PYTHON_BASEPATH)\include&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PYLOADER_EXPORTS;_SECURE_SCL_THROWS;VISIBILITY_SUPPORT_HH"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
DisableSpecificWarnings="4250;4290;4275;4251;4297"
ForcedIncludeFiles="config.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="backend.lib python27.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(PYTHON_BASEPATH)\libs&quot;;&quot;$(SolutionDir)$(ConfigurationName)&quot;"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)\plugins"
IntermediateDirectory="$(ConfigurationName)\intermediate\plugins\pyloader"
ConfigurationType="2"
InheritedPropertySheets="$(GTKMM_BASEPATH)\MSVC\gtkmm-2.4.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
Description="Copy Policies"
CommandLine="copy &quot;$(SolutionDir)..\..\plugins\pyloader\src\builtin-policies\*.py&quot; &quot;$(SolutionDir)$(ConfigurationName)\policies&quot;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(SolutionDir)config&quot;;&quot;$(SolutionDir)..\..\src\backend&quot;;&quot;$(SolutionDir)..\..\plugins\pyloader&quot;;&quot;$(PYTHON_BASEPATH)\include&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PYLOADER_EXPORTS;VISIBILITY_SUPPORT_HH"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
DisableSpecificWarnings="4275;4290;4661;4251"
ForcedIncludeFiles="config.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="backend.lib python27.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(PYTHON_BASEPATH)\libs&quot;;&quot;$(SolutionDir)$(ConfigurationName)&quot;"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\plugins\pyloader\src\plugin.cc"
>
</File>
<File
RelativePath="..\..\plugins\pyloader\src\python_cpu_policy.cc"
>
</File>
<File
RelativePath="..\..\plugins\pyloader\src\python_cpu_policy_manager.cc"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="tcc;h;hh;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\plugins\pyloader\src\python_cpu_policy.hh"
>
</File>
<File
RelativePath="..\..\plugins\pyloader\src\python_cpu_policy_manager.hh"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,56 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "backend", "backend.vcproj", "{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyloader", "pyloader.vcproj", "{4054CAB1-7F6D-4FC7-884D-9B823F996679}"
ProjectSection(ProjectDependencies) = postProject
{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08} = {4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xmlsave", "xmlsave.vcproj", "{7B477FAB-6E10-4347-9244-AC15D3A36670}"
ProjectSection(ProjectDependencies) = postProject
{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08} = {4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sgpemv2", "sgpemv2.vcproj", "{C0BAA36E-0699-4885-8123-9906CC7845E5}"
ProjectSection(ProjectDependencies) = postProject
{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08} = {4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sgpem", "_sgpem.vcproj", "{8B810FB6-B138-45B0-AB81-228076316780}"
ProjectSection(ProjectDependencies) = postProject
{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08} = {4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}.Debug|Win32.ActiveCfg = Debug|Win32
{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}.Debug|Win32.Build.0 = Debug|Win32
{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}.Release|Win32.ActiveCfg = Release|Win32
{4183D2B3-B54F-4C91-AEFD-F68BB9B86C08}.Release|Win32.Build.0 = Release|Win32
{4054CAB1-7F6D-4FC7-884D-9B823F996679}.Debug|Win32.ActiveCfg = Debug|Win32
{4054CAB1-7F6D-4FC7-884D-9B823F996679}.Debug|Win32.Build.0 = Debug|Win32
{4054CAB1-7F6D-4FC7-884D-9B823F996679}.Release|Win32.ActiveCfg = Release|Win32
{4054CAB1-7F6D-4FC7-884D-9B823F996679}.Release|Win32.Build.0 = Release|Win32
{7B477FAB-6E10-4347-9244-AC15D3A36670}.Debug|Win32.ActiveCfg = Debug|Win32
{7B477FAB-6E10-4347-9244-AC15D3A36670}.Debug|Win32.Build.0 = Debug|Win32
{7B477FAB-6E10-4347-9244-AC15D3A36670}.Release|Win32.ActiveCfg = Release|Win32
{7B477FAB-6E10-4347-9244-AC15D3A36670}.Release|Win32.Build.0 = Release|Win32
{C0BAA36E-0699-4885-8123-9906CC7845E5}.Debug|Win32.ActiveCfg = Debug|Win32
{C0BAA36E-0699-4885-8123-9906CC7845E5}.Debug|Win32.Build.0 = Debug|Win32
{C0BAA36E-0699-4885-8123-9906CC7845E5}.Release|Win32.ActiveCfg = Release|Win32
{C0BAA36E-0699-4885-8123-9906CC7845E5}.Release|Win32.Build.0 = Release|Win32
{8B810FB6-B138-45B0-AB81-228076316780}.Debug|Win32.ActiveCfg = Debug|Win32
{8B810FB6-B138-45B0-AB81-228076316780}.Debug|Win32.Build.0 = Debug|Win32
{8B810FB6-B138-45B0-AB81-228076316780}.Release|Win32.ActiveCfg = Release|Win32
{8B810FB6-B138-45B0-AB81-228076316780}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,369 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="sgpemv2"
ProjectGUID="{C0BAA36E-0699-4885-8123-9906CC7845E5}"
RootNamespace="sgpemv2"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\intermediate"
ConfigurationType="1"
InheritedPropertySheets="$(GTKMM_BASEPATH)\MSVC\gtkmm-2.4d.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
Description="Copy stuff"
CommandLine="copy &quot;$(SolutionDir)..\..\ui\*.ui&quot; &quot;$(SolutionDir)$(ConfigurationName)\ui&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)..\..\data\logo.png&quot; &quot;$(SolutionDir)$(ConfigurationName)\ui&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)..\..\src\testsuite\scheduling-wizards\environments&quot; &quot;$(SolutionDir)$(ConfigurationName)\examples&quot;&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\config&quot;;&quot;$(SolutionDir)..\..\src\backend&quot;;&quot;$(SolutionDir)..\..&quot;;&quot;$(GTKMM_BASEPATH)\lib\cairomm-1.0\include&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;VISIBILITY_SUPPORT_HH;UIDIR=&quot;&quot;./ui&quot;&quot;;EXAMPLESDIR=&quot;&quot;./examples&quot;&quot;"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
DisableSpecificWarnings="4250;4290;4275;4251"
ForcedIncludeFiles="config.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="backend.lib gthread-2.0.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\intermediate"
ConfigurationType="1"
InheritedPropertySheets="$(GTKMM_BASEPATH)\MSVC\gtkmm-2.4.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
Description="Copy stuff"
CommandLine="copy &quot;$(SolutionDir)..\..\ui\*.ui&quot; &quot;$(SolutionDir)$(ConfigurationName)\ui&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)..\..\data\logo.png&quot; &quot;$(SolutionDir)$(ConfigurationName)\ui&quot;&#x0D;&#x0A;copy &quot;$(SolutionDir)..\..\src\testsuite\scheduling-wizards\environments&quot; &quot;$(SolutionDir)$(ConfigurationName)\examples&quot;&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(SolutionDir)config&quot;;&quot;$(SolutionDir)..\..\src\backend&quot;;&quot;$(SolutionDir)..\..&quot;;&quot;$(GTKMM_BASEPATH)\lib\cairomm-1.0\include&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;VISIBILITY_SUPPORT_HH;UIDIR=&quot;&quot;./ui&quot;&quot;;EXAMPLESDIR=&quot;&quot;./examples&quot;&quot;"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
DisableSpecificWarnings="4275;4290;4661;4251;4267;4996;4181"
ForcedIncludeFiles="config.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="backend.lib gthread-2.0.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="tcc;cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\src\add_request_dialog.cc"
>
</File>
<File
RelativePath="..\..\src\cairo_elements.cc"
>
</File>
<File
RelativePath="..\..\src\cairo_widget.cc"
>
</File>
<File
RelativePath="..\..\src\configure_policy_dialog.cc"
>
</File>
<File
RelativePath="..\..\src\graphical_preferences_editor.cc"
>
</File>
<File
RelativePath="..\..\src\gui_builder.cc"
>
</File>
<File
RelativePath="..\..\src\holt_container_window.cc"
>
</File>
<File
RelativePath="..\..\src\holt_widget.cc"
>
</File>
<File
RelativePath="..\..\src\jump_to_dialog.cc"
>
</File>
<File
RelativePath="..\..\src\main.cc"
>
</File>
<File
RelativePath="..\..\src\parse_opts.cc"
>
</File>
<File
RelativePath="..\..\src\ready_queue_widget.cc"
>
</File>
<File
RelativePath="..\..\src\resources_widget.cc"
>
</File>
<File
RelativePath="..\..\src\schedulables_statistics_widget.cc"
>
</File>
<File
RelativePath="..\..\src\schedulables_tree_widget.cc"
>
</File>
<File
RelativePath="..\..\src\simulation_controller.cc"
>
</File>
<File
RelativePath="..\..\src\simulation_statistics_widget.cc"
>
</File>
<File
RelativePath="..\..\src\simulation_widget.cc"
>
</File>
<File
RelativePath="..\..\src\statistics_container_window.cc"
>
</File>
<File
RelativePath="..\..\src\text_simulation.cc"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="hh;h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\src\add_request_dialog.hh"
>
</File>
<File
RelativePath="..\..\src\cairo_elements.hh"
>
</File>
<File
RelativePath="..\..\src\cairo_widget.hh"
>
</File>
<File
RelativePath="..\..\src\configure_policy_dialog.hh"
>
</File>
<File
RelativePath="..\..\src\graphical_preferences_editor.hh"
>
</File>
<File
RelativePath="..\..\src\gui_builder.hh"
>
</File>
<File
RelativePath="..\..\src\holt_container_window.hh"
>
</File>
<File
RelativePath="..\..\src\holt_widget.hh"
>
</File>
<File
RelativePath="..\..\src\jump_to_dialog.hh"
>
</File>
<File
RelativePath="..\..\src\main.hh"
>
</File>
<File
RelativePath="..\..\src\parse_opts.hh"
>
</File>
<File
RelativePath="..\..\src\ready_queue_widget.hh"
>
</File>
<File
RelativePath="..\..\src\resources_widget.hh"
>
</File>
<File
RelativePath="..\..\src\schedulables_statistics_widget.hh"
>
</File>
<File
RelativePath="..\..\src\schedulables_tree_widget.hh"
>
</File>
<File
RelativePath="..\..\src\simulation_controller.hh"
>
</File>
<File
RelativePath="..\..\src\simulation_statistics_widget.hh"
>
</File>
<File
RelativePath="..\..\src\simulation_widget.hh"
>
</File>
<File
RelativePath="..\..\src\statistics_container_window.hh"
>
</File>
<File
RelativePath="..\..\src\text_simulation.hh"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,233 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="xmlsave"
ProjectGUID="{7B477FAB-6E10-4347-9244-AC15D3A36670}"
RootNamespace="xmlsave"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)\plugins"
IntermediateDirectory="$(ConfigurationName)\intermediate\plugins\xmlsave"
ConfigurationType="2"
InheritedPropertySheets="$(GTKMM_BASEPATH)\MSVC\gtkmm-2.4d.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(SolutionDir)config&quot;;&quot;$(SolutionDir)..\..\src\backend&quot;;&quot;$(SolutionDir)..\..\plugins\xmlsave&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;XMLSAVE_EXPORTS;VISIBILITY_SUPPORT_HH"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
DisableSpecificWarnings="4290;4275;4251"
ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="backend.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)\plugins"
IntermediateDirectory="$(ConfigurationName)\intermediate\plugins\xmlsave"
ConfigurationType="2"
InheritedPropertySheets="$(GTKMM_BASEPATH)\MSVC\gtkmm-2.4.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(SolutionDir)config&quot;;&quot;$(SolutionDir)..\..\src\backend&quot;;&quot;$(SolutionDir)..\..\plugins\xmlsave&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;XMLSAVE_EXPORTS;VISIBILITY_SUPPORT_HH"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
DisableSpecificWarnings="4275;4290;4661;4251"
ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="backend.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\plugins\xmlsave\src\plugin.cc"
>
</File>
<File
RelativePath="..\..\plugins\xmlsave\src\xml_serializer.cc"
>
</File>
<File
RelativePath="..\..\plugins\xmlsave\src\xml_serializer_factory.cc"
>
</File>
<File
RelativePath="..\..\plugins\xmlsave\src\xml_visitor.cc"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="tcc;hh;h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\plugins\xmlsave\src\xml_serializer.hh"
>
</File>
<File
RelativePath="..\..\plugins\xmlsave\src\xml_serializer_factory.hh"
>
</File>
<File
RelativePath="..\..\plugins\xmlsave\src\xml_visitor.hh"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,60 +0,0 @@
dnl **************************************************
dnl Copyright (C) 2004 Matteo Settenvini
dnl **************************************************
dnl ---------- AC_CHECK_CXXFLAG ---------------------
dnl This macro checks if a particular flag for the
dnl C++ compiler works. If it is so, it puts the flag
dnl into the first macro parameter.
dnl Example of usage : AC_CHECK_CXXFLAG([CXXFLAGS],[Wall])
dnl -------------------------------------------------
AC_DEFUN([AC_CHECK_CXXFLAG],
[ if test -z "$1" -o -z "$2"; then
AC_MSG_FAILURE([Wrong parameters passed to the m4 macro.
Please contact the package mantainer.])
fi
AC_REQUIRE([AC_PROG_CXX])dnl
AC_MSG_CHECKING([whether $CXX supports the -$2 flag])
ac_check_cxxflags=$CXXFLAGS
CXXFLAGS="-$2"
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE(
AC_LANG_PROGRAM([], [return 0;]),
[AC_MSG_RESULT([yes])
CXXFLAGS="$ac_check_cxxflags"
$1="-$2 $[$1]" ],
[AC_MSG_RESULT([no])
CXXFLAGS=$ac_check_cxxflags ]
)
AC_LANG_POP
])dnl ------- AC_CHECK_CXXFLAG ----------------------
dnl ---------- AC_CHECK_CFLAG ---------------------
dnl This macro checks if a particular flag for the
dnl C compiler works. If it is so, it adds the flag
dnl into the first macro parameter.
dnl Example of usage : AC_CHECK_CFLAG([CFLAGS],[Wall])
dnl -------------------------------------------------
AC_DEFUN([AC_CHECK_CFLAG],
[ if test -z "$1" -o -z "$2"; then
AC_MSG_FAILURE([Wrong parameters passed to the m4 macro.
Please contact the package mantainer.])
fi
AC_REQUIRE([AC_PROG_CC])dnl
AC_MSG_CHECKING([whether $CC supports the -$2 flag])
ac_check_cflags=$CFLAGS
CFLAGS="-$2"
AC_LANG_PUSH([C])
AC_COMPILE_IFELSE(
AC_LANG_PROGRAM([], [return 0;]),
[AC_MSG_RESULT([yes])
CFLAGS="$ac_check_cflags"
$1="-$2 $[$1]" ],
[AC_MSG_RESULT([no])
CFLAGS=$ac_check_cflags ]
)
AC_LANG_POP
])dnl ------- AC_CHECK_CFLAG ----------------------

View File

@ -1,31 +0,0 @@
dnl **************************************************
dnl Copyright (C) 2004 Matteo Settenvini
dnl **************************************************
dnl ---------- AX_CHECK_LDFLAG ---------------------
dnl This macro checks if a particular flag for the
dnl C++ compiler works. If it is so, it adds the flag
dnl to the end of the first parameter.
dnl Example of usage : AC_CHECK_LDFLAG([LDFLAGS],[--as-needed])
dnl -------------------------------------------------
AC_DEFUN([AC_CHECK_LDFLAG],
[ if test -z "$1" -o -z "$2"; then
AC_MSG_FAILURE([Wrong parameters passed to the m4 macro.
Please contact the package mantainer.])
fi
AC_REQUIRE([AC_PROG_CC])dnl
AC_MSG_CHECKING([whether the linker supports the $2 flag])
ac_check_ldflags=$LDFLAGS
LDFLAGS="-Wl,$2"
AC_LANG_PUSH([C])
AC_LINK_IFELSE(
AC_LANG_PROGRAM([], [return 0;]),
[AC_MSG_RESULT([yes])
LDFLAGS=$ac_check_ldflags
$1="-Wl,$2 $[$1]" ],
[AC_MSG_RESULT([no])
LDFLAGS=$ac_check_ldflags ]
)
AC_LANG_POP
])dnl ------- AC_CHECK_LDFLAG ----------------------

View File

@ -1,81 +0,0 @@
dnl m4/sgpemv2-dirs.m4 - Copyright 2005, 2006, University
dnl of Padova, dept. of Pure and Applied
dnl Mathematics
dnl
dnl This file is part of SGPEMv2.
dnl
dnl This is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 3 of the License, or
dnl (at your option) any later version.
dnl
dnl SGPEMv2 is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with SGPEMv2. If not, see http://www.gnu.org/licenses/.
dnl ---------- AC_PROG_SGPEMV2 ---------------------
dnl
dnl Synopsis: AC_PROG_SGPEMV2([min_version])
dnl
dnl This macro checks if sgpemv2 is installed, and
dnl AC_SUBSTs the following variables:
dnl
dnl SGPEMV2_CFLAGS -> necessary includes for compiling
dnl plugins
dnl SGPEMV2_LIBS -> libraries to link against when
dnl building a loadable plugin
dnl SGPEMV2_POLICIES_DIR -> global policies directory
dnl SGPEMV2_PLUGINS_DIR -> global plugins directory
dnl
dnl This is particularly useful for plugin installation.
dnl It takes a parameter which is the minimal version
dnl installed of sgpemv2 this macro checks for.
dnl The parameter is mandatory.
dnl
dnl Example of usage: AC_PROG_SGPEMV2([0.1])
dnl ------------------------------------------------
AC_DEFUN([AC_PROG_SGPEMV2],
[
PKG_PROG_PKG_CONFIG([0.20])
if test "x$1" = "x"; then
AC_MSG_FAILURE([Wrong number of parameters passed to macro AC@&t@_PROG_SGPEMV2. Please contact this package mantainer.])
fi
_pkg_sgpemv2_module="sgpemv2 >= $1"
PKG_CHECK_MODULES([SGPEMV2], [$_pkg_sgpemv2_module],
:, AC_MSG_ERROR([$SGPEMV2_PKG_ERRORS]))
AC_MSG_CHECKING([for sgpemv2 compiler flags])
AC_MSG_RESULT([$SGPEMV2_CFLAGS])
AC_MSG_CHECKING([for sgpemv2 linking flags])
AC_MSG_RESULT([$SGPEMV2_LIBS])
AC_MSG_CHECKING([for sgpemv2 policies default installation directory])
SGPEMV2_POLICIES_DIR=`$PKG_CONFIG --variable=policies_dir "$_pkg_sgpemv2_module" 2>/dev/null`
if test "x$SGPEMV2_POLICIES_DIR" = "x"; then
AC_MSG_ERROR([Unable to retrieve value])
else
AC_MSG_RESULT([$SGPEMV2_POLICIES_DIR])
fi
AC_MSG_CHECKING([for sgpemv2 plugins default installation directory])
SGPEMV2_PLUGINS_DIR=`$PKG_CONFIG --variable=plugins_dir "$_pkg_sgpemv2_module" 2>/dev/null`
if test "x$SGPEMV2_PLUGINS_DIR" = "x"; then
AC_MSG_ERROR([Unable to retrieve value])
else
AC_MSG_RESULT([$SGPEMV2_PLUGINS_DIR])
fi
AC_SUBST([SGPEMV2_POLICIES_DIR])
AC_SUBST([SGPEMV2_PLUGINS_DIR])
])dnl ------- AC_PROG_SGPEMV2 ----------------------

View File

@ -1,52 +0,0 @@
# visibility.m4 serial 1 (gettext-0.15)
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
dnl Tests whether the compiler supports the command-line option
dnl -fvisibility=hidden and the function and variable attributes
dnl __attribute__((__visibility__("hidden"))) and
dnl __attribute__((__visibility__("default"))).
dnl Does *not* test for __visibility__("protected") - which has tricky
dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
dnl MacOS X.
dnl Does *not* test for __visibility__("internal") - which has processor
dnl dependent semantics.
dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
dnl "really only recommended for legacy code".
dnl Set the variable CFLAG_VISIBILITY.
dnl Defines and sets the variable HAVE_VISIBILITY.
AC_DEFUN([gl_VISIBILITY],
[
AC_REQUIRE([AC_PROG_CC])
CFLAG_VISIBILITY=
HAVE_VISIBILITY=0
if test -n "$GCC"; then
AC_MSG_CHECKING([for simple visibility declarations])
AC_CACHE_VAL(gl_cv_cc_visibility, [
gl_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fvisibility=hidden"
AC_TRY_COMPILE(
[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
extern __attribute__((__visibility__("default"))) int exportedvar;
extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
extern __attribute__((__visibility__("default"))) int exportedfunc (void);],
[],
gl_cv_cc_visibility=yes,
gl_cv_cc_visibility=no)
CFLAGS="$gl_save_CFLAGS"])
AC_MSG_RESULT([$gl_cv_cc_visibility])
if test $gl_cv_cc_visibility = yes; then
CFLAG_VISIBILITY="-fvisibility=hidden"
HAVE_VISIBILITY=1
fi
fi
AC_SUBST([CFLAG_VISIBILITY])
AC_SUBST([HAVE_VISIBILITY])
AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
[Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
])

View File

@ -26,12 +26,12 @@
using namespace sgpem;
// Is this OK? If not, we must use a function with a local static variable...
PythonCPUPolicyManager* _policy_manager = NULL;
PythonCPUPolicyManager* _policy_manager = nullptr;
void
sgpem__Plugin__on_init()
{
if (_policy_manager == NULL)
if (_policy_manager == nullptr)
_policy_manager = new sgpem::PythonCPUPolicyManager();
}
@ -39,7 +39,7 @@ void
sgpem__Plugin__on_exit()
{
delete _policy_manager;
_policy_manager = NULL;
_policy_manager = nullptr;
}
const char*

View File

@ -63,14 +63,14 @@ namespace sgpem
// WARNING : this class needs extensive and above all
// *strong* exception checking / handling!
PythonCPUPolicy::PythonCPUPolicy(const char* name) throw(MalformedPolicyException)
PythonCPUPolicy::PythonCPUPolicy(const char* name)
: _upolicy_dict(NULL), _adapter(NULL), _name(name), _description()
{
PyObject* pLoadmeStr = PyUnicode_FromString (name);
PyObject* pUserCPUPolicyModule = PyImport_Import(pLoadmeStr);
Py_DECREF(pLoadmeStr);
if (pUserCPUPolicyModule == NULL)
if (pUserCPUPolicyModule == nullptr)
throw MalformedPolicyException(get_exception_information());
// Dictionary with defined ``symbols'' for .pyc file
@ -87,7 +87,7 @@ PythonCPUPolicy::PythonCPUPolicy(const char* name) throw(MalformedPolicyExceptio
// Now takes the user-defined policy class from pUserCPUPolicyDict
PyObject* pCPUPolicyClass = PyDict_GetItemString(_upolicy_dict, name);
if (pCPUPolicyClass == NULL)
if (pCPUPolicyClass == nullptr)
throw new MalformedPolicyException (Glib::ustring::compose (
_("Cannot find a class named %1 into the corresponding .py file."),
name));
@ -109,7 +109,7 @@ PythonCPUPolicy::PythonCPUPolicy(const char* name) throw(MalformedPolicyExceptio
Py_DECREF(pScriptAdapterModule);
if (_adapter == NULL)
if (_adapter == nullptr)
throw MalformedPolicyException(get_exception_information());
// And now, who's your daddy, huh?
@ -127,7 +127,7 @@ PythonCPUPolicy::~PythonCPUPolicy()
}
void
PythonCPUPolicy::activate() throw(UserInterruptException, MalformedPolicyException)
PythonCPUPolicy::activate()
{
Glib::RecMutex::Lock lock(_mtx);;
set_callback_policy(const_cast<PythonCPUPolicy*>(this));
@ -157,12 +157,12 @@ PythonCPUPolicy::deactivate()
void
PythonCPUPolicy::configure() throw(UserInterruptException, MalformedPolicyException)
PythonCPUPolicy::configure()
{
Glib::RecMutex::Lock lock(_mtx);;
set_callback_policy(const_cast<PythonCPUPolicy*>(this));
PyObject* retval = PyObject_CallMethod(_adapter, const_cast<char*>("async_configure"), NULL);
PyObject* retval = PyObject_CallMethod(_adapter, const_cast<char*>("async_configure"), nullptr);
Py_DECREF(retval);
wait_unlock();
@ -172,12 +172,12 @@ PythonCPUPolicy::configure() throw(UserInterruptException, MalformedPolicyExcept
void
PythonCPUPolicy::sort_queue() const throw(UserInterruptException, MalformedPolicyException)
PythonCPUPolicy::sort_queue() const
{
Glib::RecMutex::Lock lock(_mtx);;
set_callback_policy(const_cast<PythonCPUPolicy*>(this));
PyObject* retval = PyObject_CallMethod(_adapter, const_cast<char*>("async_sort_queue"), NULL);
PyObject* retval = PyObject_CallMethod(_adapter, const_cast<char*>("async_sort_queue"), nullptr);
// Do minimal debugging
if (!retval) PyErr_Print();
@ -203,18 +203,18 @@ PythonCPUPolicy::get_name() const
}
bool
PythonCPUPolicy::is_pre_emptive() const throw(UserInterruptException, MalformedPolicyException)
PythonCPUPolicy::is_pre_emptive() const
{
Glib::RecMutex::Lock lock(_mtx);;
set_callback_policy(const_cast<PythonCPUPolicy*>(this));
PyObject* retval = PyObject_CallMethod(_adapter, const_cast<char*>("async_is_preemptive"), NULL);
PyObject* retval = PyObject_CallMethod(_adapter, const_cast<char*>("async_is_preemptive"), nullptr);
Py_DECREF(retval);
wait_unlock();
// Parse return value stored in global Python object
retval = PyObject_CallMethod(_adapter, const_cast<char*>("get_return_value"), NULL);
retval = PyObject_CallMethod(_adapter, const_cast<char*>("get_return_value"), nullptr);
assert(retval);
bool ret = PyObject_IsTrue(retval);
Py_DECREF(retval);
@ -225,12 +225,12 @@ PythonCPUPolicy::is_pre_emptive() const throw(UserInterruptException, MalformedP
int
PythonCPUPolicy::get_time_slice() const throw(UserInterruptException, MalformedPolicyException)
PythonCPUPolicy::get_time_slice() const
{
Glib::RecMutex::Lock lock(_mtx);;
set_callback_policy(const_cast<PythonCPUPolicy*>(this));
PyObject* retval = PyObject_CallMethod(_adapter, const_cast<char*>("async_get_time_slice"), NULL);
PyObject* retval = PyObject_CallMethod(_adapter, const_cast<char*>("async_get_time_slice"), nullptr);
// Do minimal debugging
if (!retval) PyErr_Print();
@ -239,7 +239,7 @@ PythonCPUPolicy::get_time_slice() const throw(UserInterruptException, MalformedP
wait_unlock();
// Parse return value stored in global Python object
retval = PyObject_CallMethod(_adapter, const_cast<char*>("get_return_value"), NULL);
retval = PyObject_CallMethod(_adapter, const_cast<char*>("get_return_value"), nullptr);
assert(retval);
long tmp = PyLong_AsLong(retval);
Py_DECREF(retval);
@ -250,7 +250,7 @@ PythonCPUPolicy::get_time_slice() const throw(UserInterruptException, MalformedP
void
PythonCPUPolicy::wait_unlock() const throw(UserInterruptException, MalformedPolicyException)
PythonCPUPolicy::wait_unlock() const
{
// Polling time
static const int wait_for = 150000;
@ -266,7 +266,7 @@ PythonCPUPolicy::wait_unlock() const throw(UserInterruptException, MalformedPoli
Glib::usleep(wait_for); // hack'a'ton! magggggiccc nummmbeeerrrrrs!!
Py_BLOCK_THREADS;
PyObject* retval = PyObject_CallMethod(_adapter, const_cast<char*>("mutex_test_lock"), NULL);
PyObject* retval = PyObject_CallMethod(_adapter, const_cast<char*>("mutex_test_lock"), nullptr);
assert(retval);
still_locked = PyObject_IsTrue(retval);
Py_DECREF(retval);
@ -279,7 +279,7 @@ PythonCPUPolicy::wait_unlock() const throw(UserInterruptException, MalformedPoli
Py_UNBLOCK_THREADS;
PyEval_RestoreThread(_save);
if(PyErr_Occurred() != NULL)
if(PyErr_Occurred() != nullptr)
abort();
throw UserInterruptException(_("User-defined policy is "
@ -290,9 +290,9 @@ PythonCPUPolicy::wait_unlock() const throw(UserInterruptException, MalformedPoli
// check if there were unhandled exception in the user-defined code
PyObject* pException = PyObject_CallMethod(_adapter, const_cast<char*>("get_last_exception"), NULL);
PyObject* pException = PyObject_CallMethod(_adapter, const_cast<char*>("get_last_exception"), nullptr);
if(pException != NULL)
if(pException != nullptr)
{
if(pException != Py_None)
{
@ -326,18 +326,18 @@ PythonCPUPolicy::wait_unlock() const throw(UserInterruptException, MalformedPoli
string
PythonCPUPolicy::get_exception_information()
{
if (PyErr_Occurred() == NULL)
if (PyErr_Occurred() == nullptr)
return _("no error");
PyObject* pType = NULL;
PyObject* pValue = NULL;
PyObject* pTraceback = NULL;
PyObject* pType = nullptr;
PyObject* pValue = nullptr;
PyObject* pTraceback = nullptr;
PyErr_Fetch(&pType, &pValue, &pTraceback);
string msg;
if (pValue != NULL)
if (pValue != nullptr)
{
msg = sgpem::PyString_AsString(pValue) + "\n";
PyErr_PrintEx (false);
@ -345,9 +345,9 @@ PythonCPUPolicy::get_exception_information()
else
msg = string(_("no available information for this error"));
if (pType != NULL) { Py_DECREF(pType); }
if (pValue != NULL) { Py_DECREF(pValue); }
if (pTraceback != NULL) { Py_DECREF(pTraceback); }
if (pType != nullptr) { Py_DECREF(pType); }
if (pValue != nullptr) { Py_DECREF(pValue); }
if (pTraceback != nullptr) { Py_DECREF(pTraceback); }
PyErr_Clear();

View File

@ -71,7 +71,7 @@ namespace sgpem
/// @see activate().
/// @throw an exception when the policy is malformed and therefore not usable.
/// @param name the name of the policy
PythonCPUPolicy(const char* name) throw(MalformedPolicyException);
PythonCPUPolicy(const char* name);
/// \brief Standard virtual destructor
///
@ -89,7 +89,7 @@ namespace sgpem
/// @throw an exception when the policy is malformed and therefore not usable,
/// or when the policy is taking too long to terminate its work.
/// @see ::CPUPolicy::configure().
void configure() throw(UserInterruptException, MalformedPolicyException);
void configure();
/// \brief Sorts the queue, asynchronously.
///
@ -97,7 +97,7 @@ namespace sgpem
/// @throw an exception when the policy is malformed and therefore not usable,
/// or when the policy is taking too long to terminate its work.
/// @see ::CPUPolicy::sort_queue().
void sort_queue() const throw(UserInterruptException, MalformedPolicyException);
void sort_queue() const;
/// \brief Returns a textual description of the policy.
///
@ -126,7 +126,7 @@ namespace sgpem
/// @return \c TRUE if the policy is preemptive.
/// @return \c FALSE if the policy is not preemptive.
/// @see ::CPUPolicy::is_pre_emptive().
bool is_pre_emptive() const throw(UserInterruptException, MalformedPolicyException);
bool is_pre_emptive() const;
/// \brief Returns the lenght of the time slice, asynchronously.
///
@ -136,7 +136,7 @@ namespace sgpem
/// or when the policy is taking too long to terminate its work.
/// @return the lenght of the time slice.
/// @see ::CPUPolicy::get_time_slice().
int get_time_slice() const throw(UserInterruptException, MalformedPolicyException);
int get_time_slice() const;
/// \brief Load the corresponding Python module and initialize a new Policy object (in Python).
///
@ -144,7 +144,7 @@ namespace sgpem
/// @throw an exception when the policy is malformed and therefore not usable,
/// or when the policy is taking too long to terminate its work.
/// @see ::CPUPolicy::activate().
void activate() throw(UserInterruptException, MalformedPolicyException);
void activate();
/// \brief Activates the policy.
///
@ -168,7 +168,7 @@ namespace sgpem
/// the lock is taken again, and we check if the thread has finished via
/// the mutex present in ::ScriptAdapter. If so, wait_unlock() terminates
/// successfully. Else it stays in its main loop.
void wait_unlock() const throw(UserInterruptException, MalformedPolicyException);
void wait_unlock() const;
/// \brief Returns a brief description of a thrown exception.
/// Returns the description of the exception occurred.

View File

@ -22,8 +22,6 @@
#include <sgpemv2/global_preferences.hh>
#include <sgpemv2/cpu_policies_gatekeeper.hh>
#include <sgpemv2/templates/deletor.tcc>
#include <glibmm/ustring.h>
#include <glibmm/timer.h>
#include <glibmm/fileutils.h>
@ -104,7 +102,7 @@ PythonCPUPolicyManager::PythonCPUPolicyManager()
PythonCPUPolicyManager::~PythonCPUPolicyManager()
{
for_each(_policies.begin(), _policies.end(), memory::deletor<CPUPolicy>());
for_each(_policies.begin(), _policies.end(), [] (auto *p) { delete p; });
}

View File

@ -86,7 +86,7 @@ namespace sgpem {
virtual ~CPUPolicy() = 0;
sgpem::PolicyParameters& get_parameters();
static CPUPolicy* callback_get_policy() throw(std::runtime_error);
static CPUPolicy* callback_get_policy();
};
// --------------------------------------------
@ -237,8 +237,8 @@ namespace sgpem {
sgpem::Thread& get_item_at(position index);
void swap(position a, position b) throw(std::out_of_range);
void bubble_to_front(position x) throw(std::out_of_range);
void swap(position a, position b);
void bubble_to_front(position x);
private:
// Avoid instantiation and copy

View File

@ -49,7 +49,7 @@ find_pol_by_name(const vector<CPUPolicy*>& pols, const Glib::ustring& name)
for ( ; it != pols.end(); it++)
if ((*it)->get_name() == name)
return *it;
return NULL;
return nullptr;
}
@ -89,7 +89,7 @@ main(int argc, char** argv)
try
{
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_configure");
assert(pol != NULL);
assert(pol != nullptr);
// activate_policy will also configure the policy
pgk.activate_policy(&his, pol);
@ -104,7 +104,7 @@ main(int argc, char** argv)
try
{
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_is_preemptive");
assert(pol != NULL);
assert(pol != nullptr);
pgk.activate_policy(&his, pol);
pol->is_pre_emptive();
}
@ -118,7 +118,7 @@ main(int argc, char** argv)
try
{
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_get_time_slice");
assert(pol != NULL);
assert(pol != nullptr);
pgk.activate_policy(&his, pol);
pol->get_time_slice();
}
@ -133,7 +133,7 @@ main(int argc, char** argv)
try
{
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_get_time_slice");
assert(pol != NULL);
assert(pol != nullptr);
pgk.activate_policy(&his, pol);
pol->sort_queue();
}

View File

@ -26,12 +26,12 @@
using namespace sgpem;
sgpem::XMLSerializer* _serializer = NULL;
sgpem::XMLSerializer* _serializer = nullptr;
void
sgpem__Plugin__on_init()
{
if (_serializer == NULL)
if (_serializer == nullptr)
_serializer = new sgpem::XMLSerializer();
}
@ -39,7 +39,7 @@ void
sgpem__Plugin__on_exit()
{
delete _serializer;
_serializer = NULL;
_serializer = nullptr;
}
const char*

View File

@ -38,7 +38,7 @@ XMLSerializer::XMLSerializer()
void XMLSerializer::save_snapshot(const Glib::ustring& filename, const History& hist) throw(SerializerError)
void XMLSerializer::save_snapshot(const Glib::ustring& filename, const History& hist)
{
/* COMPAT: Do not genrate nodes for formatting spaces */
LIBXML_TEST_VERSION
@ -46,7 +46,7 @@ void XMLSerializer::save_snapshot(const Glib::ustring& filename, const History&
xmlDocPtr doc;
doc = xmlNewDoc((const xmlChar *)"1.0");
if (doc != NULL)
if (doc != nullptr)
{
fill_doc(doc, hist);
int nwritten = xmlSaveFormatFile (filename.c_str(), doc, 1);
@ -64,7 +64,7 @@ void XMLSerializer::save_snapshot(const Glib::ustring& filename, const History&
xmlCleanupParser();
}
void XMLSerializer::restore_snapshot(const Glib::ustring& filename, History& hist) throw(SerializerError)
void XMLSerializer::restore_snapshot(const Glib::ustring& filename, History& hist)
{
// TODO - all to do!!
// DEBUG - remove me when finished
@ -82,7 +82,7 @@ void XMLSerializer::restore_snapshot(const Glib::ustring& filename, History& his
* build an XML tree from a the file;
*/
doc = xmlParseFile(filename.c_str());
if (doc == NULL)
if (doc == nullptr)
{
xmlCleanupParser();
throw SerializerError("Parsing Error: doc is invalid.");
@ -127,7 +127,7 @@ const Glib::ustring XMLSerializer::get_filename_description()
void XMLSerializer::fill_doc(xmlDocPtr doc, const History& hist)
{
xmlNodePtr root_node = NULL;/* node pointers */
xmlNodePtr root_node = nullptr;/* node pointers */
/*
* Creates a new document, a node and set it as a root node
*/
@ -137,7 +137,7 @@ void XMLSerializer::fill_doc(xmlDocPtr doc, const History& hist)
/*
* Creates a DTD declaration. Isn't mandatory.
*/
/* xmlDtdPtr dtd = */ xmlCreateIntSubset(doc, (const xmlChar *) "sgpem", NULL, (const xmlChar *) "sgpem.dtd");
/* xmlDtdPtr dtd = */ xmlCreateIntSubset(doc, (const xmlChar *) "sgpem", nullptr, (const xmlChar *) "sgpem.dtd");
//TODO: check for DTD compliance??
@ -146,14 +146,14 @@ void XMLSerializer::fill_doc(xmlDocPtr doc, const History& hist)
}
void XMLSerializer::read_doc(xmlDocPtr doc, XMLSerializerFactory& fact) throw(SerializerError)
void XMLSerializer::read_doc(xmlDocPtr doc, XMLSerializerFactory& fact)
{
/*
* Check the document is of the right kind
*/
xmlNodePtr root;
root = xmlDocGetRootElement(doc);
if (root == NULL)
if (root == nullptr)
{
xmlFreeDoc(doc);
xmlCleanupParser();
@ -162,7 +162,7 @@ void XMLSerializer::read_doc(xmlDocPtr doc, XMLSerializerFactory& fact) throw(Se
xmlNodePtr cur;
cur = root->children;
while (cur != NULL)
while (cur != nullptr)
{
Glib::ustring name((const char *)cur->name);
if (name == "resources")
@ -179,17 +179,17 @@ void XMLSerializer::read_doc(xmlDocPtr doc, XMLSerializerFactory& fact) throw(Se
XMLSerializerFactory::Parameters* read_properties(xmlAttrPtr prop)
{
if (prop == NULL)
return NULL;
if (prop == nullptr)
return nullptr;
XMLSerializerFactory::Parameters* par = new XMLSerializerFactory::Parameters();
while (prop != NULL)
while (prop != nullptr)
{
if (prop->children && xmlNodeIsText(prop->children))
{
xmlChar *key = xmlNodeGetContent (prop->children);
// xmlChar *key = xmlNodeListGetString(doc, prop->children, 1);
if (key != NULL)
if (key != nullptr)
{
std::pair<Glib::ustring, Glib::ustring> key_value(Glib::ustring((const char *)prop->name), Glib::ustring((const char *)key));
par->insert(key_value);
@ -205,14 +205,14 @@ void XMLSerializer::read_resources(xmlNodePtr resources_node, XMLSerializerFacto
{
xmlNodePtr cur;
cur = resources_node->children;
while (cur != NULL)
while (cur != nullptr)
{
Glib::ustring node_name((const char *)cur->name);
if (node_name == "resource")
{
xmlAttrPtr prop = cur->properties;
XMLSerializerFactory::Parameters* par = read_properties(prop);
if (par != NULL)
if (par != nullptr)
{
fact.factory_method(Glib::ustring("Resource"), *par);
}
@ -224,19 +224,19 @@ void XMLSerializer::read_resources(xmlNodePtr resources_node, XMLSerializerFacto
}
void XMLSerializer::read_schedulables(xmlNodePtr schedulables_node, XMLSerializerFactory& fact)
{
if (schedulables_node == NULL)
if (schedulables_node == nullptr)
return;
xmlNodePtr cur;
cur = schedulables_node->children;
while (cur != NULL)
while (cur != nullptr)
{
Glib::ustring node_name((const char *)cur->name);
if (node_name == "process")
{
xmlAttrPtr prop = cur->properties;
XMLSerializerFactory::Parameters* par = read_properties(prop);
if (par != NULL)
if (par != nullptr)
{
fact.factory_method(Glib::ustring("Process"), *par);
}
@ -250,19 +250,19 @@ void XMLSerializer::read_schedulables(xmlNodePtr schedulables_node, XMLSerialize
void XMLSerializer::read_threads(xmlNodePtr threads_node, XMLSerializerFactory& fact)
{
if (threads_node == NULL)
if (threads_node == nullptr)
return;
xmlNodePtr cur;
cur = threads_node->children;
while (cur != NULL)
while (cur != nullptr)
{
Glib::ustring node_name((const char *)cur->name);
if (node_name == "thread")
{
xmlAttrPtr prop = cur->properties;
XMLSerializerFactory::Parameters* par = read_properties(prop);
if (par != NULL)
if (par != nullptr)
{
fact.factory_method(Glib::ustring("Thread"), *par);
}
@ -276,21 +276,21 @@ void XMLSerializer::read_threads(xmlNodePtr threads_node, XMLSerializerFactory&
void XMLSerializer::read_requests(xmlNodePtr requests_node, XMLSerializerFactory& fact)
{
if (requests_node == NULL)
if (requests_node == nullptr)
{
return;
}
xmlNodePtr cur;
cur = requests_node->children;
while (cur != NULL)
while (cur != nullptr)
{
Glib::ustring node_name((const char *)cur->name);
if (node_name == "request")
{
xmlAttrPtr prop = cur->properties;
XMLSerializerFactory::Parameters* par = read_properties(prop);
if (par != NULL)
if (par != nullptr)
{
fact.factory_method(Glib::ustring("Request"), *par);
}
@ -304,21 +304,21 @@ void XMLSerializer::read_requests(xmlNodePtr requests_node, XMLSerializerFactory
void XMLSerializer::read_subrequests(xmlNodePtr subrequest_node, XMLSerializerFactory& fact)
{
if (subrequest_node == NULL)
if (subrequest_node == nullptr)
{
return;
}
xmlNodePtr cur;
cur = subrequest_node;
while (cur != NULL)
while (cur != nullptr)
{
Glib::ustring node_name((const char *)cur->name);
if (node_name == "subrequest")
{
xmlAttrPtr prop = cur->properties;
XMLSerializerFactory::Parameters* par = read_properties(prop);
if (par != NULL)
if (par != nullptr)
{
fact.factory_method(Glib::ustring("SubRequest"), *par);
}

View File

@ -61,7 +61,7 @@ namespace sgpem
\throws backend::SerializerError on error
*/
virtual void save_snapshot(const Glib::ustring& filename, const History& hist) throw(SerializerError);
virtual void save_snapshot(const Glib::ustring& filename, const History& hist);
/**
\brief Re-initialize system status from a saved XML snapshot
@ -72,7 +72,7 @@ namespace sgpem
\throws backend::SerializerError
*/
virtual void restore_snapshot(const Glib::ustring& filename, History& hist) throw(SerializerError);
virtual void restore_snapshot(const Glib::ustring& filename, History& hist);
/**
\return Constant string "xsgp"
@ -99,7 +99,7 @@ namespace sgpem
Traverse the passed (previously readed) xml document and
rebuild the correct image using the XMLSerializerFactory object.
*/
void read_doc(xmlDocPtr doc, XMLSerializerFactory& fact) throw(SerializerError);
void read_doc(xmlDocPtr doc, XMLSerializerFactory& fact);
/**
\brief Restore all the resources from the passed xml node

View File

@ -47,7 +47,7 @@ History* XMLSerializerFactory::get_history()
}
void
XMLSerializerFactory::factory_method(const Glib::ustring& class_name, Parameters& parameters) throw(SerializerError)
XMLSerializerFactory::factory_method(const Glib::ustring& class_name, Parameters& parameters)
{
if (class_name == "Resource")
{

View File

@ -77,7 +77,7 @@ namespace sgpem
\throw SerializerError If not all necessary parameters for an object creation are provided
*/
void factory_method(const Glib::ustring& class_name, Parameters& parameters) throw(SerializerError);
void factory_method(const Glib::ustring& class_name, Parameters& parameters);
protected:
private:
typedef Environment::resource_key_t resource_key_t;

View File

@ -44,7 +44,7 @@ XMLVisitor::~XMLVisitor()
{
}
void XMLVisitor::from_resource(const Resource& /*obj*/) throw(SerializerError)
void XMLVisitor::from_resource(const Resource& /*obj*/)
{
throw SerializerError(
_("XMLVisitor: unsupported method from_resource(const Resource& obj)")
@ -52,50 +52,50 @@ void XMLVisitor::from_resource(const Resource& /*obj*/) throw(SerializerError)
}
void XMLVisitor::from_history(const History& obj) throw(SerializerError)
void XMLVisitor::from_history(const History& obj)
{
from_history(_current, obj);
}
void XMLVisitor::from_environment(const Environment& obj) throw(SerializerError)
void XMLVisitor::from_environment(const Environment& obj)
{
from_environment(_current, obj);
}
void XMLVisitor::from_process(const Process& obj) throw(SerializerError)
void XMLVisitor::from_process(const Process& obj)
{
from_process(_current, obj);
}
void XMLVisitor::from_thread(const Thread& obj) throw(SerializerError)
void XMLVisitor::from_thread(const Thread& obj)
{
from_thread(_current, obj);
}
void XMLVisitor::from_request(const Request& obj) throw(SerializerError)
void XMLVisitor::from_request(const Request& obj)
{
from_request(_current, obj);
}
void XMLVisitor::from_subrequest(const SubRequest& obj) throw(SerializerError)
void XMLVisitor::from_subrequest(const SubRequest& obj)
{
from_subrequest(_current, obj);
}
void XMLVisitor::from_resource(const Resource& obj, const Glib::ustring& key) throw(SerializerError)
void XMLVisitor::from_resource(const Resource& obj, const Glib::ustring& key)
{
from_resource(_current, obj, key);
}
void XMLVisitor::from_history(xmlNodePtr parent, const History& hist) throw(SerializerError)
void XMLVisitor::from_history(xmlNodePtr parent, const History& hist)
{
if (parent != NULL)
if (parent != nullptr)
{
from_environment(parent, hist.get_last_environment());
}
@ -106,9 +106,9 @@ void XMLVisitor::from_history(xmlNodePtr parent, const History& hist) throw(Seri
}
void XMLVisitor::from_environment(xmlNodePtr parent, const Environment& env) throw(SerializerError)
void XMLVisitor::from_environment(xmlNodePtr parent, const Environment& env)
{
if (parent == NULL)
if (parent == nullptr)
{
throw SerializerError(_("Error trying to add data to empty XML node."));
}
@ -116,7 +116,7 @@ void XMLVisitor::from_environment(xmlNodePtr parent, const Environment& env) thr
//Enclosing block - save resources
//
{
xmlNodePtr resources_node = xmlNewChild(parent, NULL, (const xmlChar *) "resources", NULL);
xmlNodePtr resources_node = xmlNewChild(parent, nullptr, (const xmlChar *) "resources", nullptr);
const Environment::Resources& rvect = env.get_resources();
typedef Environment::Resources::const_iterator res_iterator;
@ -136,7 +136,7 @@ void XMLVisitor::from_environment(xmlNodePtr parent, const Environment& env) thr
//Enclosing block - save schedulables
//
{
xmlNodePtr schedulables_node = xmlNewChild(parent, NULL, (const xmlChar *) "schedulables", NULL);
xmlNodePtr schedulables_node = xmlNewChild(parent, nullptr, (const xmlChar *) "schedulables", nullptr);
const Environment::Processes& pvect = env.get_processes();
typedef std::vector<Process*>::const_iterator proc_iterator;
@ -153,9 +153,9 @@ void XMLVisitor::from_environment(xmlNodePtr parent, const Environment& env) thr
}
void XMLVisitor::from_resource(xmlNodePtr parent, const Resource& obj, const Glib::ustring& key) throw(SerializerError)
void XMLVisitor::from_resource(xmlNodePtr parent, const Resource& obj, const Glib::ustring& key)
{
if (parent != NULL)
if (parent != nullptr)
{
Glib::ustring id = "reskey" + key;
Glib::ustring strPreemptible("false"); // fixed??
@ -163,7 +163,7 @@ void XMLVisitor::from_resource(xmlNodePtr parent, const Resource& obj, const Gli
Glib::ustring strPlaces;
to_string<int>(static_cast<int>(obj.get_places()), strPlaces);
xmlNodePtr process_node = xmlNewChild(parent, NULL, (const xmlChar *) "resource", NULL);
xmlNodePtr process_node = xmlNewChild(parent, nullptr, (const xmlChar *) "resource", nullptr);
xmlNewProp(process_node, (const xmlChar *) "name", (const xmlChar *) obj.get_name().c_str());
xmlNewProp(process_node, (const xmlChar *) "id", (const xmlChar *) id.c_str());
xmlNewProp(process_node, (const xmlChar *) "arrival-time", (const xmlChar *) strArrivalTime.c_str());
@ -177,22 +177,22 @@ void XMLVisitor::from_resource(xmlNodePtr parent, const Resource& obj, const Gli
}
void XMLVisitor::from_process(xmlNodePtr parent, const Process& obj) throw(SerializerError)
void XMLVisitor::from_process(xmlNodePtr parent, const Process& obj)
{
if (parent != NULL)
if (parent != nullptr)
{
Glib::ustring strPriority;
Glib::ustring strArrivalTime;
to_string<int>(obj.get_base_priority(), strPriority);
to_string<int>(obj.get_arrival_time(), strArrivalTime);
xmlNodePtr process_node = xmlNewChild(parent, NULL, (const xmlChar *) "process", NULL);
xmlNodePtr process_node = xmlNewChild(parent, nullptr, (const xmlChar *) "process", nullptr);
xmlNewProp(process_node, (const xmlChar *) "name", (const xmlChar *) obj.get_name().c_str());
xmlNewProp(process_node, (const xmlChar *) "priority", (const xmlChar *) strPriority.c_str());
xmlNewProp(process_node, (const xmlChar *) "arrival-time", (const xmlChar *) strArrivalTime.c_str());
// make a threads subnode
xmlNodePtr threads_node = xmlNewChild(process_node, NULL, (const xmlChar *) "threads", NULL);
xmlNodePtr threads_node = xmlNewChild(process_node, nullptr, (const xmlChar *) "threads", nullptr);
// iterate on threads
typedef std::vector<Thread*> Threads;
@ -214,9 +214,9 @@ void XMLVisitor::from_process(xmlNodePtr parent, const Process& obj) throw(Seria
}
void XMLVisitor::from_thread(xmlNodePtr parent, const Thread& obj) throw(SerializerError)
void XMLVisitor::from_thread(xmlNodePtr parent, const Thread& obj)
{
if (parent != NULL)
if (parent != nullptr)
{
Glib::ustring strPriority;
@ -226,14 +226,14 @@ void XMLVisitor::from_thread(xmlNodePtr parent, const Thread& obj) throw(Seriali
to_string<int>(obj.get_arrival_time(), strArrivalTime);
to_string<int>(obj.get_total_cpu_time(), strLastsTime);
xmlNodePtr thread_node = xmlNewChild(parent, NULL, (const xmlChar *) "thread", NULL);
xmlNodePtr thread_node = xmlNewChild(parent, nullptr, (const xmlChar *) "thread", nullptr);
xmlNewProp(thread_node, (const xmlChar *) "name", (const xmlChar *) obj.get_name().c_str());
xmlNewProp(thread_node, (const xmlChar *) "priority", (const xmlChar *) strPriority.c_str());
xmlNewProp(thread_node, (const xmlChar *) "arrival-delta", (const xmlChar *) strArrivalTime.c_str());
xmlNewProp(thread_node, (const xmlChar *) "lasts-for", (const xmlChar *) strLastsTime.c_str());
// make a requests subnode
xmlNodePtr requests_node = xmlNewChild(thread_node, NULL, (const xmlChar *) "requests", NULL);
xmlNodePtr requests_node = xmlNewChild(thread_node, nullptr, (const xmlChar *) "requests", nullptr);
// iterate on requests
typedef std::vector<Request*> Requests;
typedef std::vector<Request*>::const_iterator req_iterator;
@ -254,19 +254,19 @@ void XMLVisitor::from_thread(xmlNodePtr parent, const Thread& obj) throw(Seriali
}
void XMLVisitor::from_request(xmlNodePtr parent, const Request& obj) throw(SerializerError)
void XMLVisitor::from_request(xmlNodePtr parent, const Request& obj)
{
if (parent != NULL)
if (parent != nullptr)
{
Glib::ustring strArrivalTime;
to_string<int>(obj.get_instant(), strArrivalTime);
xmlNodePtr request_node = xmlNewChild(parent, NULL, (const xmlChar *) "request", NULL);
xmlNodePtr request_node = xmlNewChild(parent, nullptr, (const xmlChar *) "request", nullptr);
xmlNewProp(request_node, (const xmlChar *) "arrival-time", (const xmlChar *) strArrivalTime.c_str());
// make a requests subnode
// xmlNodePtr subrequests_node = xmlNewChild(thread_node, NULL, (const xmlChar *) "requests", NULL);
// xmlNodePtr subrequests_node = xmlNewChild(thread_node, nullptr, (const xmlChar *) "requests", nullptr);
// iterate on subrequests
typedef std::vector<SubRequest*> SubRequests;
typedef std::vector<SubRequest*>::const_iterator subreq_iterator;
@ -287,9 +287,9 @@ void XMLVisitor::from_request(xmlNodePtr parent, const Request& obj) throw(Seria
}
void XMLVisitor::from_subrequest(xmlNodePtr parent, const SubRequest& obj) throw(SerializerError)
void XMLVisitor::from_subrequest(xmlNodePtr parent, const SubRequest& obj)
{
if (parent != NULL)
if (parent != nullptr)
{
Glib::ustring strResource;
@ -297,7 +297,7 @@ void XMLVisitor::from_subrequest(xmlNodePtr parent, const SubRequest& obj) throw
to_string<int>(obj.get_resource_key(), strResource);
to_string<int>(obj.get_length(), strLastsFor);
xmlNodePtr subrequest_node = xmlNewChild(parent, NULL, (const xmlChar *) "subrequest", NULL);
xmlNodePtr subrequest_node = xmlNewChild(parent, nullptr, (const xmlChar *) "subrequest", nullptr);
xmlNewProp(subrequest_node, (const xmlChar *) "resource", (const xmlChar *) strResource.c_str());
xmlNewProp(subrequest_node, (const xmlChar *) "lasts-for", (const xmlChar *) strLastsFor.c_str());
}

View File

@ -69,61 +69,61 @@ namespace sgpem
\brief Add output to the serializer taking data from history
Wrapper method: call from_history(xmlNodePtr parent, const History& obj);
*/
virtual void from_history(const History& obj) throw(SerializerError);
virtual void from_history(const History& obj);
/**
\brief Add output to the serializer taking data from environment
Wrapper method: call from_environment(xmlNodePtr parent, const Environment& obj);
*/
virtual void from_environment(const Environment& obj) throw(SerializerError);
virtual void from_environment(const Environment& obj);
/**
\brief Add output to the serializer taking data from resource
BUG: a resource must be saved with her own associated key.
Throw an exception.
*/
virtual void from_resource(const Resource& obj) throw(SerializerError);
virtual void from_resource(const Resource& obj);
/**
\brief Add output to the serializer taking data from resource and key
BUG FIXED: This save a resource with her own associated key.
Wrapper method: call from_resource(xmlNodePtr parent, const Resource& obj, const Glib::ustring& key);
*/
virtual void from_resource(const Resource& obj, const Glib::ustring& key) throw(SerializerError);
virtual void from_resource(const Resource& obj, const Glib::ustring& key);
/**
\brief Add output to the serializer taking data from process
Wrapper method: call from_process(xmlNodePtr parent, const Process& obj);
*/
virtual void from_process(const Process& obj) throw(SerializerError);
virtual void from_process(const Process& obj);
/**
\brief Add output to the serializer taking data from thread
Wrapper method: call from_thread(xmlNodePtr parent, const Thread& obj);
*/
virtual void from_thread(const Thread& obj) throw(SerializerError);
virtual void from_thread(const Thread& obj);
/**
\brief Add output to the serializer taking data from request
Wrapper method: call from_request(xmlNodePtr parent, const Request& obj);
*/
virtual void from_request(const Request& obj) throw(SerializerError);
virtual void from_request(const Request& obj);
/**
\brief Add output to the serializer taking data from subrequest
Wrapper method: call from_subrequest(xmlNodePtr parent, const SubRequest& obj);
*/
virtual void from_subrequest(const SubRequest& obj) throw(SerializerError);
virtual void from_subrequest(const SubRequest& obj);
private:
void from_history(xmlNodePtr parent, const History& obj) throw(SerializerError);
void from_environment(xmlNodePtr parent, const Environment& obj) throw(SerializerError);
void from_resource(xmlNodePtr parent, const Resource& obj, const Glib::ustring& key) throw(SerializerError);
void from_process(xmlNodePtr parent, const Process& obj) throw(SerializerError);
void from_thread(xmlNodePtr parent, const Thread& obj) throw(SerializerError);
void from_request(xmlNodePtr parent, const Request& obj) throw(SerializerError);
void from_subrequest(xmlNodePtr parent, const SubRequest& obj) throw(SerializerError);
void from_history(xmlNodePtr parent, const History& obj);
void from_environment(xmlNodePtr parent, const Environment& obj);
void from_resource(xmlNodePtr parent, const Resource& obj, const Glib::ustring& key);
void from_process(xmlNodePtr parent, const Process& obj);
void from_thread(xmlNodePtr parent, const Thread& obj);
void from_request(xmlNodePtr parent, const Request& obj);
void from_subrequest(xmlNodePtr parent, const SubRequest& obj);
xmlNodePtr _current;
};

View File

@ -104,7 +104,7 @@ AddRequestDialog::run_add(sgpem::Thread& owner)
{
update_combo();
Request* r = NULL;
Request* r = nullptr;
// reset the dialog data
// _list_model->clear();

View File

@ -52,7 +52,7 @@ namespace sgpem
/** \brief Attemts to show the dialog, and constructs a new request
* if response is OK
* \param owner The thread which will own the request
* \return A pointer to the created request, or NULL if the request
* \return A pointer to the created request, or nullptr if the request
* wasn't created
*/
Request* run_add(Thread& owner);

View File

@ -25,7 +25,6 @@
#include <sgpemv2/sub_request.hh>
#include <sgpemv2/thread.hh>
#include <sgpemv2/templates/deletor.tcc>
#include <sgpemv2/templates/down_cast.tcc>
#include <sgpemv2/templates/sequences.tcc>
@ -200,7 +199,7 @@ ConcreteEnvironment::~ConcreteEnvironment()
// This call will invoke the DynamicProcess virtual destructor
// Which will delete on cascade all DynamicThreads and so on.
for_each(_processes.begin(), _processes.end(),
memory::deletor<Process>());
[] (auto *p) { delete p; });
// We do the same with Resources.
for (Resources::iterator it = _resources.begin(); it != _resources.end(); it++)

View File

@ -37,12 +37,11 @@
#include <sgpemv2/history_observer.hh>
#include <sgpemv2/templates/down_cast.tcc>
#include <sgpemv2/templates/deletor.tcc>
#include <sgpemv2/templates/smartp.tcc>
#include <algorithm>
#include <cassert>
#include <functional>
#include <memory>
#ifndef NDEBUG
#include <iostream>
@ -50,9 +49,6 @@
using namespace sgpem;
using namespace std;
using memory::smart_ptr;
using memory::deletor;
// ---------------
// For all you evil-doers on Earth, this is your mighty punishment!
@ -83,7 +79,7 @@ static T* deep_find(const std::vector<T*>& v, const T& obj)
{
return *it;
}
return NULL;
return nullptr;
}
@ -99,7 +95,7 @@ ConcreteHistory::ConcreteHistory()
ConcreteHistory::~ConcreteHistory()
{
for_each(_snapshots.begin(), _snapshots.end(),
deletor<ConcreteEnvironment>());
[] (auto *p) { delete p; });
}
ConcreteHistory::ConcreteHistory(const ConcreteHistory& h) :
@ -136,7 +132,6 @@ ConcreteHistory::get_last_environment() const
const ConcreteEnvironment&
ConcreteHistory::get_environment_at(position index) const
throw(std::out_of_range)
{
return *_snapshots.at(index);
}
@ -226,7 +221,7 @@ ConcreteHistory::remove(Thread& thread)
Process* found = deep_find<Process>(processes, dyn_thr.get_process());
if (found == NULL)
if (found == nullptr)
return; // not found, just return.
DynamicProcess& dynamic_found = down_cast<DynamicProcess&>(*found);
@ -250,10 +245,10 @@ ConcreteHistory::remove(Request& request)
Process* proc_ref = deep_find<Process>(processes, dyn_proc);
DynamicProcess* dyn_proc_ref = down_cast<DynamicProcess*>(proc_ref);
if (dyn_proc_ref == NULL)
if (dyn_proc_ref == nullptr)
return; // not found, just return.
DynamicThread* thr_ref = deep_find<DynamicThread>(dyn_proc_ref->get_dynamic_threads(), dyn_thr);
if (thr_ref == NULL)
if (thr_ref == nullptr)
return; // not found, just return.
bool removed = deep_remove<DynamicRequest>(thr_ref->get_dynamic_requests(), dyn_req);
@ -280,13 +275,13 @@ ConcreteHistory::remove(SubRequest& subrequest)
Process* proc_ref = deep_find<Process>(processes, dyn_proc);
DynamicProcess* dyn_proc_ref = down_cast<DynamicProcess*>(proc_ref);
if (dyn_proc_ref == NULL)
if (dyn_proc_ref == nullptr)
return; // not found, just return.
DynamicThread* thr_ref = deep_find<DynamicThread>(dyn_proc_ref->get_dynamic_threads(), dyn_thr);
if (thr_ref == NULL)
if (thr_ref == nullptr)
return; // not found, just return.
DynamicRequest* req_ref = deep_find<DynamicRequest>(thr_ref->get_dynamic_requests(), dyn_req);
if (req_ref == NULL)
if (req_ref == nullptr)
return; // not found, just return.
bool removed = deep_remove<DynamicSubRequest>(req_ref->get_dynamic_subrequests(), dyn_sub);
@ -505,9 +500,13 @@ ConcreteHistory::set_front(position p)
{
position old_front = _front;
if (p > _snapshots.size() - 1)
{
_front = _snapshots.size() - 1;
}
else
{
_front = p;
}
if(old_front != _front)
notify_change();
@ -526,7 +525,7 @@ ConcreteHistory::reset()
Snapshots::iterator it = _snapshots.begin();
it++; // Skip first environment that we saved
for_each(it, _snapshots.end(), deletor<ConcreteEnvironment>());
for_each(it, _snapshots.end(), [] (auto *p) { delete p; });
_snapshots.resize(1); // Truncate to keep only our "model"
_front = 0;
_sealed = false;

View File

@ -54,7 +54,7 @@ namespace sgpem
virtual void append_new_environment(ConcreteEnvironment* environment);
virtual size_t get_size() const;
virtual const ConcreteEnvironment& get_last_environment() const;
virtual const ConcreteEnvironment& get_environment_at(position index) const throw(std::out_of_range);
virtual const ConcreteEnvironment& get_environment_at(position index) const;
virtual void remove(resource_key_t resource_key);
virtual void remove(Process& process);

View File

@ -27,8 +27,6 @@
#include <cassert>
#include <sgpemv2/templates/smartp.tcc>
#include <algorithm>
#include <cassert>
#include <functional>
@ -36,7 +34,6 @@
#include <iostream>
using namespace sgpem;
using namespace memory;
ConcreteSimulation::ConcreteSimulation() :
Simulation(), _state(state_stopped),
@ -57,7 +54,7 @@ ConcreteSimulation::get_mode() const
}
void
ConcreteSimulation::jump_to(History::position p) throw(UserInterruptException, NullPolicyException, MalformedPolicyException)
ConcreteSimulation::jump_to(History::position p)
{
switch (_state)
{
@ -112,7 +109,7 @@ ConcreteSimulation::stop()
}
void
ConcreteSimulation::run() throw(UserInterruptException, NullPolicyException, MalformedPolicyException)
ConcreteSimulation::run()
{
switch (_state)
{
@ -149,15 +146,14 @@ ConcreteSimulation::run() throw(UserInterruptException, NullPolicyException, Mal
bool
ConcreteSimulation::step()
throw(UserInterruptException, NullPolicyException, MalformedPolicyException)
{
if (get_policy() == NULL)
if (get_policy() == nullptr)
{
stop();
throw NullPolicyException("no CPU policy selected");
}
if (get_resource_policy() == NULL)
if (get_resource_policy() == nullptr)
{
stop();
throw NullPolicyException("no resource policy selected");
@ -214,7 +210,7 @@ ConcreteSimulation::get_history() const
void
ConcreteSimulation::set_policy(CPUPolicy* p) throw(CPUPolicyException)
ConcreteSimulation::set_policy(CPUPolicy* p)
{
stop();
@ -227,12 +223,12 @@ ConcreteSimulation::set_policy(CPUPolicy* p) throw(CPUPolicyException)
{
try
{
// this is a no-op if _policy is NULL
// this is a no-op if _policy is nullptr
CPUPoliciesGatekeeper::get_instance().activate_policy(&_history, _policy);
}
catch(const CPUPolicyException& e2)
{
_policy = NULL;
_policy = nullptr;
std::string msg = _("unable to change policy and to restore the previous: ");
msg += e2.what();

View File

@ -45,7 +45,7 @@ namespace sgpem
* Advances the simulation by one or more steps, depending on the
* actual state and on the value set with set_mode().
*/
void run() throw(UserInterruptException, NullPolicyException, MalformedPolicyException);
void run();
/**
\brief Pauses a running simulation.
@ -62,7 +62,7 @@ namespace sgpem
Pauses the simulation and jumps to the specified instant
\throw UserInterruptException, NullPolicyException, MalformedPolicyException
*/
void jump_to(History::position p) throw(UserInterruptException, NullPolicyException, MalformedPolicyException);
void jump_to(History::position p);
/**
\brief Stops the simulation.
@ -98,7 +98,7 @@ namespace sgpem
/**
\throw An instance of CPUPolicyException, \b not a derived class!!!
*/
void set_policy(CPUPolicy*) throw(CPUPolicyException);
void set_policy(CPUPolicy*);
/**
\brief Setup the resource policy to be used by the system.
@ -133,7 +133,7 @@ namespace sgpem
CPUPolicy* _policy;
ResourcePolicy* _resource_policy;
bool step() throw(UserInterruptException, NullPolicyException, MalformedPolicyException);
bool step();
};
}

View File

@ -41,7 +41,7 @@ using std::runtime_error;
using namespace sgpem;
// Explicit template instantiation to allow to export symbols from the DSO.
template class Singleton<CPUPoliciesGatekeeper>;
template class sgpem::Singleton<CPUPoliciesGatekeeper>;
typedef vector<CPUPolicyManager*>::iterator ManagerIterator;
typedef map<History*, CPUPolicy*>::iterator ActiveIterator;
@ -55,7 +55,7 @@ CPUPoliciesGatekeeper::get_registered() const
void
CPUPoliciesGatekeeper::register_manager(CPUPolicyManager* manager)
{
assert(manager != NULL);
assert(manager != nullptr);
ManagerIterator end = _registered.end();
@ -66,7 +66,7 @@ CPUPoliciesGatekeeper::register_manager(CPUPolicyManager* manager)
void
CPUPoliciesGatekeeper::unregister_manager(CPUPolicyManager* manager)
{
assert(manager != NULL);
assert(manager != nullptr);
ManagerIterator end = _registered.end();
ManagerIterator pos = find(_registered.begin(), end, manager);
@ -79,9 +79,9 @@ CPUPoliciesGatekeeper::unregister_manager(CPUPolicyManager* manager)
}
CPUPolicy*
CPUPoliciesGatekeeper::get_current_policy(History* history) throw(runtime_error)
CPUPoliciesGatekeeper::get_current_policy(History* history)
{
assert(history != NULL);
assert(history != nullptr);
ActiveIterator policy = _active_policies.find(history);
@ -93,9 +93,9 @@ CPUPoliciesGatekeeper::get_current_policy(History* history) throw(runtime_error)
}
void
CPUPoliciesGatekeeper::activate_policy(History *history, CPUPolicy* policy) throw(UserInterruptException, MalformedPolicyException)
CPUPoliciesGatekeeper::activate_policy(History *history, CPUPolicy* policy)
{
assert(history != NULL);
assert(history != nullptr);
ActiveIterator end = _active_policies.end();
ActiveIterator pos = _active_policies.find(history);
@ -110,9 +110,9 @@ CPUPoliciesGatekeeper::activate_policy(History *history, CPUPolicy* policy) thro
pos->second->deactivate();
}
// if policy is NULL, simply erase the entry and return, since we are sure the policy is
// if policy is nullptr, simply erase the entry and return, since we are sure the policy is
// not active due to the previous lines
if(policy == NULL)
if(policy == nullptr)
{
// this is a no-op if history is not a key used in the map
_active_policies.erase(history);

View File

@ -24,7 +24,7 @@ using namespace sgpem;
// Static member data
CPUPolicy* CPUPolicy::_callback_policy = NULL;
CPUPolicy* CPUPolicy::_callback_policy = nullptr;
CPUPolicy::~CPUPolicy()
@ -40,10 +40,10 @@ CPUPolicy::get_parameters()
CPUPolicy*
CPUPolicy::callback_get_policy() throw(std::runtime_error)
CPUPolicy::callback_get_policy()
{
if(_callback_policy == NULL)
throw std::runtime_error("CPUPolicy::callback_get_policy() not used as a callback method. NULL ptr returned.");
if(_callback_policy == nullptr)
throw std::runtime_error("CPUPolicy::callback_get_policy() not used as a callback method. nullptr ptr returned.");
return _callback_policy;
}

View File

@ -23,7 +23,6 @@
#include "dynamic_thread.hh"
#include <sgpemv2/serialize_visitor.hh>
#include <sgpemv2/templates/deletor.tcc>
#include <sgpemv2/templates/sequences.tcc>
#include <algorithm>
@ -41,7 +40,7 @@ typedef std::vector<DynamicThread*>::iterator ThreadIt;
DynamicProcess::DynamicProcess(StaticProcess* core) :
DynamicSchedulable(), _core(core)
{
assert(core != NULL);
assert(core != nullptr);
}
DynamicProcess::DynamicProcess(const DynamicProcess &other) :
@ -56,7 +55,7 @@ DynamicProcess::~DynamicProcess()
{
for_each(_dynamic_threads.begin(),
_dynamic_threads.end(),
memory::deletor<DynamicThread>());
[] (auto *p) { delete p; });
}
std::vector<Thread*>

View File

@ -28,9 +28,9 @@
#include "dynamic_schedulable.hh"
#include "static_process.hh"
#include <sgpemv2/templates/smartp.tcc>
#include <glibmm/ustring.h>
#include <memory>
#include <vector>
namespace sgpem
@ -65,7 +65,7 @@ namespace sgpem
std::vector<DynamicThread*>& get_dynamic_threads();
private:
memory::smart_ptr<StaticProcess> _core;
std::shared_ptr<StaticProcess> _core;
std::vector<DynamicThread*> _dynamic_threads;
};

View File

@ -24,9 +24,7 @@
#include "dynamic_thread.hh"
#include <sgpemv2/serialize_visitor.hh>
#include <sgpemv2/templates/deletor.tcc>
#include <sgpemv2/templates/down_cast.tcc>
#include <sgpemv2/templates/smartp.tcc>
#include <algorithm>
#include <functional>
@ -39,8 +37,8 @@ DynamicRequest::DynamicRequest(StaticRequest *core,
DynamicThread* owner) :
_static_request(core), _dynamic_thread(owner)
{
assert(core != NULL);
assert(owner != NULL);
assert(core != nullptr);
assert(owner != nullptr);
// Leave this line: it helps us with a compiler warning if
// the get_dynamic* method signature changes:
std::vector<DynamicRequest*>& siblings = owner->get_dynamic_requests();
@ -52,7 +50,7 @@ DynamicRequest::DynamicRequest(const DynamicRequest& other, DynamicThread* owner
{
typedef vector<DynamicSubRequest*> SubReqVec;
assert(owner != NULL);
assert(owner != nullptr);
const SubReqVec& other_subs = other._dynamic_subrequests;
@ -72,7 +70,7 @@ DynamicRequest::DynamicRequest(const DynamicRequest& other, DynamicThread* owner
DynamicRequest::~DynamicRequest()
{
for_each(_dynamic_subrequests.begin(), _dynamic_subrequests.end(),
memory::deletor<DynamicSubRequest>());
[] (auto *p) { delete p; });
}

View File

@ -33,8 +33,8 @@ namespace sgpem
#include "dynamic_thread.hh"
#include <sgpemv2/request.hh>
#include <sgpemv2/templates/smartp.hh>
#include <memory>
#include <vector>
namespace sgpem
@ -73,7 +73,7 @@ namespace sgpem
// Undefined
DynamicRequest(const DynamicRequest& other);
memory::smart_ptr<StaticRequest> _static_request;
std::shared_ptr<StaticRequest> _static_request;
DynamicThread* _dynamic_thread;
std::vector<DynamicSubRequest*> _dynamic_subrequests;
};

View File

@ -24,7 +24,6 @@
#include <sgpemv2/serialize_visitor.hh>
#include <sgpemv2/templates/down_cast.tcc>
#include <sgpemv2/templates/smartp.tcc>
#include <cassert>

View File

@ -21,14 +21,13 @@
#ifndef DYNAMIC_RESOURCE_HH
#define DYNAMIC_RESOURCE_HH 1
#include "glibmm/ustring.h"
#include <sgpemv2/templates/smartp.hh>
#include <sgpemv2/resource.hh>
#include "static_resource.hh"
#include <memory>
namespace sgpem
{
@ -90,7 +89,7 @@ namespace sgpem
const StaticResource& get_core() const;
private:
memory::smart_ptr<StaticResource> _static_resource;
std::shared_ptr<StaticResource> _static_resource;
};
}

View File

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

View File

@ -24,7 +24,6 @@
#include <sgpemv2/request.hh>
#include <sgpemv2/serialize_visitor.hh>
#include <sgpemv2/templates/down_cast.tcc>
#include <sgpemv2/templates/smartp.tcc>
#include <algorithm>
#include <cassert>
@ -36,8 +35,8 @@ DynamicSubRequest::DynamicSubRequest(StaticSubRequest* core,
_static_subrequest(core), _owner(owner),
_queue_position(-1), _ran_for(0), _state(Request::state_future)
{
assert(core != NULL);
assert(owner != NULL);
assert(core != nullptr);
assert(owner != nullptr);
// Leave this line: it helps us with a compiler warning if
// the get_dynamic* method signature changes:
@ -51,7 +50,7 @@ DynamicSubRequest::DynamicSubRequest(const DynamicSubRequest& other,
_queue_position(other._queue_position), _ran_for(other._ran_for),
_state(other._state)
{
assert(owner != NULL);
assert(owner != nullptr);
// Leave this line: it helps us with a compiler warning if
// the get_dynamic* method signature changes:

View File

@ -35,7 +35,8 @@ namespace sgpem
#include <sgpemv2/request.hh>
#include <sgpemv2/sub_request.hh>
#include <sgpemv2/templates/smartp.hh>
#include <memory>
namespace sgpem
{
@ -100,7 +101,7 @@ namespace sgpem
// Undefined
DynamicSubRequest(const DynamicSubRequest&);
memory::smart_ptr<StaticSubRequest> _static_subrequest;
std::shared_ptr<StaticSubRequest> _static_subrequest;
DynamicRequest* _owner;
int _queue_position;
unsigned int _ran_for;

View File

@ -27,17 +27,14 @@
#include <functional>
#include <cassert>
#include <sgpemv2/templates/deletor.tcc>
#include <sgpemv2/templates/smartp.tcc>
using namespace sgpem;
DynamicThread::DynamicThread(StaticThread* core, DynamicProcess* parent)
: DynamicSchedulable(), _core(core), _state(state_future), _parent(parent),
_ran_for(0), _last_acquisition(-1), _last_release(-1)
{
assert(core != NULL);
assert(parent != NULL);
assert(core != nullptr);
assert(parent != nullptr);
// Leave this line: it helps us with a compiler warning if
// the get_dynamic* method signature changes:
@ -53,7 +50,7 @@ DynamicThread::DynamicThread(const DynamicThread &other, DynamicProcess* parent)
{
typedef std::vector<DynamicRequest*>::const_iterator ReqIt;
assert(parent != NULL);
assert(parent != nullptr);
const std::vector<DynamicRequest*>& other_req = other._dynamic_requests;
@ -69,7 +66,7 @@ DynamicThread::DynamicThread(const DynamicThread &other, DynamicProcess* parent)
DynamicThread::~DynamicThread()
{
for_each(_dynamic_requests.begin(), _dynamic_requests.end(),
memory::deletor<DynamicRequest>());
[] (auto *p) { delete p; });
}

View File

@ -30,7 +30,7 @@
#include "dynamic_process.hh"
#include "dynamic_schedulable.hh"
#include <sgpemv2/templates/smartp.hh>
#include <memory>
namespace sgpem
{
@ -177,7 +177,7 @@ namespace sgpem
/**
\brief Pointer to static counterpart of this object.
*/
memory::smart_ptr<StaticThread> _core;
std::shared_ptr<StaticThread> _core;
/**
\brief The current state of this thread.

View File

@ -18,12 +18,12 @@
// along with SGPEMv2. If not, see http://www.gnu.org/licenses/.
#include "gettext.h"
#include <glib/gstdio.h>
#include <glibmm/miscutils.h>
#include <sgpemv2/config.h>
#include <sgpemv2/global_preferences.hh>
#include <sgpemv2/key_file.hh>
#include <sgpemv2/string_utils.hh>
@ -40,7 +40,7 @@
using namespace sgpem;
// Explicit template instantiation to allow to export symbols from the DSO.
template class Singleton<GlobalPreferences>;
template class sgpem::Singleton<GlobalPreferences>;
GlobalPreferences::GlobalPreferences()
: _mod_dirs(1, PLUGDIR), _pol_dirs(1, POLDIR), _speed(1000)
@ -48,7 +48,7 @@ GlobalPreferences::GlobalPreferences()
Glib::ustring
GlobalPreferences::get_preferences_dir() const throw(Glib::FileError)
GlobalPreferences::get_preferences_dir() const
{
using namespace Glib;
// windows-specific part, i don't use ifdef WIN32 since I'm not sure how
@ -58,7 +58,7 @@ GlobalPreferences::get_preferences_dir() const throw(Glib::FileError)
if(SUCCEEDED(SHGetFolderPath(NULL,
CSIDL_APPDATA,
NULL,
nullptr,
SHGFP_TYPE_CURRENT,
raw_path)))
{
@ -73,14 +73,14 @@ GlobalPreferences::get_preferences_dir() const throw(Glib::FileError)
// Create "Application Data\sgpemv2". if not present,
// otherwise it is a no-op
CreateDirectory(path.c_str(), NULL);
CreateDirectory(path.c_str(), nullptr);
// if UNICODE, we need to convert to utf-8
// I'm not sure if this part is OK, anyway...
# ifdef UNICODE
char raw_path_utf[MAX_PATH];
WideCharToMultiByte(CP_UTF8, 0, path.c_str(), -1, raw_path_utf, MAX_PATH, NULL, NULL);
WideCharToMultiByte(CP_UTF8, 0, path.c_str(), -1, raw_path_utf, MAX_PATH, nullptr, nullptr);
return Glib::ustring(raw_path_utf);
# else
@ -107,7 +107,7 @@ GlobalPreferences::get_preferences_dir() const throw(Glib::FileError)
Glib::ustring
GlobalPreferences::get_config_filename() const throw(Glib::FileError)
GlobalPreferences::get_config_filename() const
{
const Glib::ustring filename = get_preferences_dir() + G_DIR_SEPARATOR_S + Glib::ustring("sgpemrc");
return filename;
@ -180,7 +180,7 @@ GlobalPreferences::get_request_color(Request::state st) const
}
void
GlobalPreferences::write_configrc() throw(Glib::FileError)
GlobalPreferences::write_configrc()
{
KeyFile kf;
@ -189,7 +189,7 @@ GlobalPreferences::write_configrc() throw(Glib::FileError)
}
void
GlobalPreferences::load_configrc() throw(Glib::FileError)
GlobalPreferences::load_configrc()
{
KeyFile kf;

View File

@ -21,7 +21,7 @@
using namespace sgpem;
Module::Module(const Glib::ustring& identifier) throw(InvalidPluginException) :
Module::Module(const Glib::ustring& identifier) :
Glib::Module(identifier),
_enabled(false),
_id(identifier),

View File

@ -24,7 +24,6 @@
#include <sgpemv2/module.hh>
#include <sgpemv2/global_preferences.hh>
#include <sgpemv2/templates/deletor.tcc>
#include <sgpemv2/templates/singleton.tcc>
#include <glibmm/fileutils.h>
@ -35,7 +34,7 @@
using namespace sgpem;
template class Singleton<PluginManager>;
template class sgpem::Singleton<PluginManager>;
std::vector<Module*>
@ -47,10 +46,10 @@ PluginManager::get_module_list() const
void
PluginManager::rescan_dirs()
{
Module* module = NULL;
Module* module = nullptr;
for_each(_modules.begin(), _modules.end(),
memory::deletor<Module>());
[] (auto *p) { delete p; });
_modules.clear();
GlobalPreferences& prefs = GlobalPreferences::get_instance();
@ -79,7 +78,7 @@ PluginManager::rescan_dirs()
_modules.push_back(module);
std::cerr << "\tSuccess" << std::endl;
}
catch (InvalidPluginException e)
catch (InvalidPluginException& e)
{
std::cerr << "\tFailed, invalid plugin: " << e.what() << std::endl;
}

View File

@ -214,7 +214,7 @@ PolicyParameters::set_string(ustring name, const ustring& value)
\throws A PolicyParametersException if the parameter has not been found.
*/
int
PolicyParameters::get_int(ustring name) const throw(PolicyParametersException)
PolicyParameters::get_int(ustring name) const
{
map<ustring, Parameter<int> >::const_iterator i = int_map.find(name);
if (i == int_map.end())
@ -230,7 +230,7 @@ PolicyParameters::get_int(ustring name) const throw(PolicyParametersException)
\throws A PolicyParametersException if the parameter has not been found.
*/
float
PolicyParameters::get_float(ustring name) const throw(PolicyParametersException)
PolicyParameters::get_float(ustring name) const
{
map<ustring, Parameter<float> >::const_iterator i = float_map.find(name);
if (i == float_map.end())
@ -246,7 +246,7 @@ PolicyParameters::get_float(ustring name) const throw(PolicyParametersException)
\throws A PolicyParametersException if the parameter has not been found.
*/
ustring
PolicyParameters::get_string(ustring name) const throw(PolicyParametersException)
PolicyParameters::get_string(ustring name) const
{
map<ustring, Parameter<ustring> >::const_iterator i = string_map.find(name);
if (i == string_map.end())

View File

@ -25,7 +25,7 @@ using sgpem::Thread;
void
ReadyQueue::swap(position a, position b)
throw (std::out_of_range)
{
if (a == b) return;
@ -49,7 +49,7 @@ ReadyQueue::size() const
sgpem::Thread&
ReadyQueue::get_item_at(position index)
throw (std::out_of_range)
{
// Checks index access
return *_scheds.at(index);
@ -57,7 +57,7 @@ ReadyQueue::get_item_at(position index)
const sgpem::Thread&
ReadyQueue::get_item_at(position index) const
throw (std::out_of_range)
{
// Checks index access
return *_scheds.at(index);
@ -72,7 +72,7 @@ ReadyQueue::append(Thread& thread)
void
ReadyQueue::bubble_to_front(position x)
throw(std::out_of_range)
{
while(x > 0)
{

View File

@ -40,7 +40,7 @@ using std::runtime_error;
using namespace sgpem;
// Explicit template instantiation to allow to export symbols from the DSO.
template class Singleton<ResourcePoliciesGatekeeper>;
template class sgpem::Singleton<ResourcePoliciesGatekeeper>;
typedef vector<ResourcePolicyManager*>::iterator ManagerIterator;
typedef map<History*, ResourcePolicy*>::iterator PolicyIterator;
@ -54,7 +54,7 @@ ResourcePoliciesGatekeeper::get_registered() const
void
ResourcePoliciesGatekeeper::register_manager(ResourcePolicyManager* manager)
{
assert(manager != NULL);
assert(manager != nullptr);
ManagerIterator end = _registered.end();
@ -65,7 +65,7 @@ ResourcePoliciesGatekeeper::register_manager(ResourcePolicyManager* manager)
void
ResourcePoliciesGatekeeper::unregister_manager(ResourcePolicyManager* manager)
{
assert(manager != NULL);
assert(manager != nullptr);
ManagerIterator end = _registered.end();
ManagerIterator pos = find(_registered.begin(), end, manager);
@ -78,9 +78,9 @@ ResourcePoliciesGatekeeper::unregister_manager(ResourcePolicyManager* manager)
}
ResourcePolicy&
ResourcePoliciesGatekeeper::get_current_policy(History* history) throw(runtime_error)
ResourcePoliciesGatekeeper::get_current_policy(History* history)
{
assert(history != NULL);
assert(history != nullptr);
PolicyIterator policy = _active_policies.find(history);
@ -94,7 +94,7 @@ ResourcePoliciesGatekeeper::get_current_policy(History* history) throw(runtime_e
void
ResourcePoliciesGatekeeper::activate_policy(History *history, ResourcePolicy* policy)
{
assert(history != NULL && policy != NULL);
assert(history != nullptr && policy != nullptr);
_active_policies[history] = policy;
// the content of history (if any) is not vaild any more.

View File

@ -30,13 +30,13 @@ ResourcePolicyFiFo::~ResourcePolicyFiFo()
void
ResourcePolicyFiFo::configure()
throw(UserInterruptException)
{
}
void
ResourcePolicyFiFo::enforce(Environment& /*environment*/, Environment::SubRequestQueue& queue, SubRequest& sr)
throw(UserInterruptException)
{
typedef Environment::SubRequestQueue SubRequestQueue;

View File

@ -47,7 +47,7 @@ namespace sgpem
Because it's a pure virtual method, must be re-implemented
in concrete derived classes.
*/
virtual void configure() throw(UserInterruptException);
virtual void configure();
/**
Mixes the queues.
@ -55,7 +55,7 @@ namespace sgpem
Because it's a pure virtual method, must be re-implemented
in concrete derived classes.
*/
virtual void enforce(Environment& environment, Environment::SubRequestQueue& queue, SubRequest& sr) throw(UserInterruptException);
virtual void enforce(Environment& environment, Environment::SubRequestQueue& queue, SubRequest& sr);
/**
Gets a string description of the policy.

View File

@ -29,13 +29,13 @@ ResourcePolicyLiFo::~ResourcePolicyLiFo()
void
ResourcePolicyLiFo::configure()
throw(UserInterruptException)
{
}
void
ResourcePolicyLiFo::enforce(Environment& /*environment*/, Environment::SubRequestQueue& queue, SubRequest& sr)
throw(UserInterruptException)
{
typedef Environment::SubRequestQueue SubRequestQueue;

View File

@ -47,14 +47,14 @@ namespace sgpem
* Because it's a pure virtual method, must be re-implemented
* in concrete derived classes.
*/
virtual void configure() throw(UserInterruptException);
virtual void configure();
/** \brief Mixes the queues.
*
* Because it's a pure virtual method, must be re-implemented
* in concrete derived classes.
*/
virtual void enforce(Environment& environment, Environment::SubRequestQueue& queue, SubRequest& sr) throw(UserInterruptException);
virtual void enforce(Environment& environment, Environment::SubRequestQueue& queue, SubRequest& sr);
/** \brief Gets a string description of the policy.
*

View File

@ -31,13 +31,13 @@ ResourcePolicyPriority::~ResourcePolicyPriority()
void
ResourcePolicyPriority::configure()
throw(UserInterruptException)
{
}
void
ResourcePolicyPriority::enforce(Environment& /*environment*/, Environment::SubRequestQueue& queue, SubRequest& sr)
throw(UserInterruptException)
{
typedef Environment::SubRequestQueue SubRequestQueue;

View File

@ -52,7 +52,7 @@ namespace sgpem
/// \brief Initializes the inner components of the policy.
///
/// Does nothing.
virtual void configure() throw(UserInterruptException);
virtual void configure();
/// \brief Sorts the subrequest queue letting higher priority threads to be the first ones
/// to get the resources.
@ -63,7 +63,7 @@ namespace sgpem
/// \param environment the environment on which the policy applies.
/// \param queue the queue where a subrequest has just been added.
/// \param sr the subrequest which has just been added.
virtual void enforce(Environment& environment, Environment::SubRequestQueue& queue, SubRequest& sr) throw(UserInterruptException);
virtual void enforce(Environment& environment, Environment::SubRequestQueue& queue, SubRequest& sr);
/// \brief Returns a description of the policy.
///

View File

@ -30,13 +30,13 @@ ResourcePolicyPriorityInheritance::~ResourcePolicyPriorityInheritance()
void
ResourcePolicyPriorityInheritance::configure()
throw(UserInterruptException)
{
}
void
ResourcePolicyPriorityInheritance::enforce(Environment& /*environment*/, Environment::SubRequestQueue& queue, SubRequest& sr)
throw(UserInterruptException)
{
typedef Environment::SubRequestQueue SubRequestQueue;

View File

@ -49,7 +49,7 @@ namespace sgpem
Because it's a pure virtual method, must be re-implemented
in concrete derived classes.
*/
virtual void configure() throw(UserInterruptException);
virtual void configure();
/**
\brief Mixes the queues.
@ -59,7 +59,7 @@ namespace sgpem
*/
virtual void enforce(Environment& environment,
Environment::SubRequestQueue& queue,
SubRequest& sr) throw(UserInterruptException);
SubRequest& sr);
/**
\brief Gets a string description of the policy.

View File

@ -49,7 +49,7 @@ using namespace std;
using namespace sgpem;
// Explicit template instantiation to allow to export symbols from the DSO.
template class Singleton<Scheduler>;
template class sgpem::Singleton<Scheduler>;
typedef std::vector<DynamicProcess*> Processes;
@ -78,7 +78,7 @@ static void determine_subr_allocable_status(const Resource& res, const SubReques
bool
is_running(const Thread* running_thread)
{
return running_thread != NULL && running_thread->get_state() == Schedulable::state_running;
return running_thread != nullptr && running_thread->get_state() == Schedulable::state_running;
}
@ -380,7 +380,7 @@ Scheduler::get_policy()
bool
Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy& resource_policy)
throw(UserInterruptException, MalformedPolicyException)
{
// This very method should be exclusive: no concurrent behaviour, from when we
// store a readyqueue and policy pointer for the user-policy to retrieve, to when
@ -396,10 +396,10 @@ Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy&
ConcreteHistory& concrete_history = static_cast<ConcreteHistory&>(history);
// Use an auto_ptr since we've some exceptions in the coming...
auto_ptr<ConcreteEnvironment> new_snapshot(new ConcreteEnvironment(concrete_history.get_environment_at(current_instant)));
unique_ptr<ConcreteEnvironment> new_snapshot(new ConcreteEnvironment(concrete_history.get_environment_at(current_instant)));
Threads all_threads;
DynamicThread* running_thread = NULL;
DynamicThread* running_thread = nullptr;
collect_threads(new_snapshot->get_processes(), all_threads);
@ -431,7 +431,7 @@ Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy&
current.set_state(Schedulable::state_terminated);
current.set_last_release(current_instant);
terminate_all_requests_of(current, *new_snapshot);
running_thread = NULL;
running_thread = nullptr;
}
// if we found the running thread, there isn't another one,
@ -533,7 +533,7 @@ Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy&
{
running_thread->set_last_release(current_instant);
_ready_queue->erase_first();
running_thread = NULL;
running_thread = nullptr;
alive_threads--;
// Proceed to select a new running thread, below
}
@ -587,7 +587,7 @@ Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy&
// new runner.
if(&new_running != running_thread)
{
if(running_thread != NULL)
if(running_thread != nullptr)
{
running_thread->set_state(Schedulable::state_ready);
running_thread->set_last_release(current_instant);
@ -600,8 +600,8 @@ Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy&
catch (const CPUPolicyException& e)
{
// Reset values that the policy doesn't need anymore
_policy = NULL;
_ready_queue = NULL;
_policy = nullptr;
_ready_queue = nullptr;
// Do we need to update/reset something else?
@ -618,8 +618,8 @@ final_cleanup:
concrete_history.append_new_environment(new_snapshot.release());
// Reset values that the policy doesn't need anymore
_policy = NULL;
_ready_queue = NULL;
_policy = nullptr;
_ready_queue = nullptr;
// If we got there, a step has been performed.
// Return if we can perform another step.

View File

@ -35,7 +35,7 @@ using std::runtime_error;
using namespace sgpem;
// Explicit template instantiation to allow to export symbols from the DSO.
template class Singleton<SerializersGatekeeper>;
template class sgpem::Singleton<SerializersGatekeeper>;
typedef vector<Serializer*>::iterator SerializerIterator;
@ -48,7 +48,7 @@ SerializersGatekeeper::get_registered() const
void
SerializersGatekeeper::register_serializer(Serializer* serializer)
{
assert(serializer != NULL);
assert(serializer != nullptr);
SerializerIterator end = _registered.end();
@ -59,7 +59,7 @@ SerializersGatekeeper::register_serializer(Serializer* serializer)
void
SerializersGatekeeper::unregister_serializer(Serializer* serializer)
{
assert(serializer != NULL);
assert(serializer != nullptr);
SerializerIterator end = _registered.end();
SerializerIterator pos = find(_registered.begin(), end, serializer);

View File

@ -0,0 +1,7 @@
#define PACKAGE "@PROJECT_NAME@"
#define LOCALEDIR "@localedir@"
#define UIDIR "@uidir@"
#define POLDIR "@policiesdir@"
#define PLUGDIR "@plugindir@"

View File

@ -80,13 +80,13 @@ namespace sgpem
* If no policy was previously activated for the attached
* ::History, throw an appropriate exception.
*/
CPUPolicy* get_current_policy(History* history) throw(std::runtime_error);
CPUPolicy* get_current_policy(History* history);
/** \brief Associates a policy with history.
* If an exception is thrown, the current associated *policy with this history
* (if there are any), is \b no more active, \b nor associated
*/
void activate_policy(History* history, CPUPolicy* policy) throw(UserInterruptException, MalformedPolicyException);
void activate_policy(History* history, CPUPolicy* policy);
private:

View File

@ -53,7 +53,7 @@ namespace sgpem
Because it's a pure virtual method, must be re-implemented
in concrete derived classes.
*/
virtual void configure() throw(UserInterruptException, MalformedPolicyException) = 0;
virtual void configure() = 0;
/**
Sort the \ref ReadyQueue object that contain all the Schedulable objects
@ -62,7 +62,7 @@ namespace sgpem
Because it's a pure virtual method, must be re-implemented
in concrete derived classes.
*/
virtual void sort_queue() const throw(UserInterruptException, MalformedPolicyException) = 0;
virtual void sort_queue() const = 0;
/**
Gets a string description of the policy.
@ -82,7 +82,7 @@ namespace sgpem
in concrete derived classes.
\return True if this policy is preemptible.
*/
virtual bool is_pre_emptive() const throw(UserInterruptException, MalformedPolicyException) = 0;
virtual bool is_pre_emptive() const = 0;
/**
Gets the time quantum for the policy.
@ -91,9 +91,9 @@ namespace sgpem
in concrete derived classes.
\return Time quantum for the policy.
*/
virtual int get_time_slice() const throw(UserInterruptException, MalformedPolicyException) = 0;
virtual int get_time_slice() const = 0;
virtual void activate() throw(UserInterruptException, MalformedPolicyException) = 0;
virtual void activate() = 0;
virtual void deactivate() = 0;
@ -105,12 +105,12 @@ namespace sgpem
PolicyParameters& get_parameters();
/** This method is used only as a callback by scripting languages */
static CPUPolicy* callback_get_policy() throw(std::runtime_error);
static CPUPolicy* callback_get_policy();
protected:
PolicyParameters _parameters;
static void set_callback_policy(CPUPolicy* ptr = NULL);
static void set_callback_policy(CPUPolicy* ptr = nullptr);
private:
// Used by callback_get_policy:

View File

@ -57,7 +57,7 @@ namespace sgpem
/**
\return GlobalPreferences configuration filename
*/
Glib::ustring get_config_filename() const throw(Glib::FileError);
Glib::ustring get_config_filename() const;
/**
\brief Returns configured Policy directories
@ -110,7 +110,7 @@ namespace sgpem
We advice using a key=value text format.
#- Close the configuration file.
*/
void write_configrc() throw(Glib::FileError);
void write_configrc();
/**
\brief Load global preferences from disk
@ -119,7 +119,7 @@ namespace sgpem
\throw std::io_error
*/
void load_configrc() throw(Glib::FileError);
void load_configrc();
/** \brief Prepare directory to read/write preferences to disk
*
@ -128,7 +128,7 @@ namespace sgpem
* %ApplicationData%/sgpemv2, on *nix systems $HOME/.sgpemv2.
* If it doesn't exist, attempt to create it.
*/
Glib::ustring get_preferences_dir() const throw(Glib::FileError);
Glib::ustring get_preferences_dir() const;
private:
GlobalPreferences();

View File

@ -73,7 +73,7 @@ namespace sgpem
virtual size_t get_size() const = 0;
virtual const Environment& get_last_environment() const = 0;
virtual const Environment& get_environment_at(position index) const throw(std::out_of_range) = 0;
virtual const Environment& get_environment_at(position index) const = 0;
/**
\brief Removes a Resource from the whole History.

View File

@ -51,7 +51,7 @@ namespace sgpem
/// doesn't export a valid SGPEMv2 backend::Plugin interface.
/// \param identifier A string with the DSO name without any file-extension
/// suffix. This is retrieved by PluginManager::rescan_dirs().
Module(const Glib::ustring& identifier) throw(InvalidPluginException);
Module(const Glib::ustring& identifier);
/// \brief Enables or disables a plugin
///

View File

@ -22,8 +22,8 @@
// It could be necessary to do dynamic type-checking when
// catching it (with typeinfo).
#ifndef NULL_POLICY_EXCEPTION
#define NULL_POLICY_EXCEPTION 1
#ifndef nullptr_POLICY_EXCEPTION
#define nullptr_POLICY_EXCEPTION 1
#include <sgpemv2/sgpemv2-visibility.hh>

View File

@ -230,19 +230,19 @@ namespace sgpem
\returns the INTEGER value of the parameter named \e name
\throws PolicyParametersException if the parameter named \e name has not been registered
*/
int get_int(Glib::ustring name) const throw(PolicyParametersException);
int get_int(Glib::ustring name) const;
/** \brief Returns the value of an FLOAT parameter
\returns the FLOAT value of the parameter named \e name
\throws PolicyParametersException if the parameter named \e name has not been registered
*/
float get_float(Glib::ustring name) const throw(PolicyParametersException);
float get_float(Glib::ustring name) const;
/** \brief Returns the value of an STRING parameter
\returns the STRING value of the parameter named \e name
\throws PolicyParametersException if the parameter named \e name has not been registered
*/
Glib::ustring get_string(Glib::ustring name) const throw(PolicyParametersException);
Glib::ustring get_string(Glib::ustring name) const;

View File

@ -43,7 +43,7 @@ namespace sgpem
* \param a first object position
* \param b second object position
*/
void swap(position a, position b) throw (std::out_of_range);
void swap(position a, position b);
/**
* \brief Return the size of the queue.
@ -60,7 +60,7 @@ namespace sgpem
* \return The item at positon \a index.
* \throw std::out_of_range if position is < 1 or > size()-1.
*/
Thread& get_item_at(position index) throw (std::out_of_range);
Thread& get_item_at(position index);
/**
@ -71,7 +71,7 @@ namespace sgpem
* \return A constant reference to the item at positon \a index.
* \throw std::out_of_range if position is < 1 or > size()-1
*/
const Thread& get_item_at(position index) const throw (std::out_of_range);
const Thread& get_item_at(position index) const;
/**
* \brief Add a new ::Thread at the end of the queue.
@ -83,7 +83,7 @@ namespace sgpem
/**
* \brief Bubble element x to the front of the queue
*/
void bubble_to_front(position x) throw(std::out_of_range);
void bubble_to_front(position x);
/**
* \brief Remove the first item from the threads vector.

View File

@ -83,7 +83,7 @@ namespace sgpem
*
* \return The current policy.
*/
ResourcePolicy& get_current_policy(History* history) throw(std::runtime_error);
ResourcePolicy& get_current_policy(History* history);
/**
\brief Given a policy, sets it as the history current one.
Also deactivates the old policy if present, and then activates

View File

@ -57,7 +57,7 @@ namespace sgpem
///
/// Because it's a pure virtual method, must be re-implemented
/// in concrete derived classes.
virtual void configure() throw(UserInterruptException) = 0;
virtual void configure() = 0;
/// \brief Sorts the subrequest queue.
///
@ -67,7 +67,7 @@ namespace sgpem
/// \param environment the environment on which the policy applies.
/// \param queue the queue where a subrequest has just been added.
/// \param sr the subrequest which has just been added.
virtual void enforce(Environment& environment, Environment::SubRequestQueue& queue, SubRequest& sr) throw(UserInterruptException) = 0;
virtual void enforce(Environment& environment, Environment::SubRequestQueue& queue, SubRequest& sr) = 0;
/// \brief Returns a description of the policy.
///

View File

@ -68,14 +68,14 @@ namespace sgpem
\return false If the simulation has ended, true otherwise
*/
bool step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy& resource_policy) throw(UserInterruptException, MalformedPolicyException);
bool step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy& resource_policy);
/**
\brief Returns the policy that will be used to generate the simulation at the next instant.
\warning This is a callback method: it can only be used in methods of CPUPolicy called
by step_forward(). Else, a NULL pointer will be returned.
\return A pointer to the active policy, or NULL if not inside step_forward()
by step_forward(). Else, a nullptr pointer will be returned.
\return A pointer to the active policy, or nullptr if not inside step_forward()
*/
CPUPolicy* get_policy();
@ -84,8 +84,8 @@ namespace sgpem
schedulable objects (for the policy to sort it).
\warning This is a callback method: it can only be used in methods of CPUPolicy called
by step_forward(). Else, a NULL pointer will be returned.
\return A pointer to the queue, or NULL if not inside step_forward()
by step_forward(). Else, a nullptr pointer will be returned.
\return A pointer to the queue, or nullptr if not inside step_forward()
*/
ReadyQueue* get_ready_queue();

View File

@ -56,45 +56,45 @@ namespace sgpem
/**
\brief Add output to the serializer taking data from history
*/
virtual void from_history(const History& obj) throw(SerializerError) = 0;
virtual void from_history(const History& obj) = 0;
/**
\brief Add output to the serializer taking data from environment
*/
virtual void from_environment(const Environment& obj) throw(SerializerError) = 0;
virtual void from_environment(const Environment& obj) = 0;
/**
\brief Add output to the serializer taking data from resource
BUG: a resource must be saved with her own associated key.
*/
virtual void from_resource(const Resource& obj) throw(SerializerError) = 0;
virtual void from_resource(const Resource& obj) = 0;
/**
\brief Add output to the serializer taking data from resource and key
BUG FIXED: This save a resource with her own associated key.
*/
virtual void from_resource(const Resource& obj, const Glib::ustring& key) throw(SerializerError) = 0;
virtual void from_resource(const Resource& obj, const Glib::ustring& key) = 0;
/**
\brief Add output to the serializer taking data from process
*/
virtual void from_process(const Process& obj) throw(SerializerError) = 0;
virtual void from_process(const Process& obj) = 0;
/**
\brief Add output to the serializer taking data from thread
*/
virtual void from_thread(const Thread& obj) throw(SerializerError) = 0;
virtual void from_thread(const Thread& obj) = 0;
/**
\brief Add output to the serializer taking data from request
*/
virtual void from_request(const Request& obj) throw(SerializerError) = 0;
virtual void from_request(const Request& obj) = 0;
/**
\brief Add output to the serializer taking data from subrequest
*/
virtual void from_subrequest(const SubRequest& obj) throw(SerializerError) = 0;
virtual void from_subrequest(const SubRequest& obj) = 0;
};
}

View File

@ -37,8 +37,8 @@ namespace sgpem
Serializer();
virtual ~Serializer() = 0;
virtual void save_snapshot(const Glib::ustring& filename, const History& hist) throw(SerializerError) = 0;
virtual void restore_snapshot(const Glib::ustring& filename, History& hist) throw(SerializerError) = 0;
virtual void save_snapshot(const Glib::ustring& filename, const History& hist) = 0;
virtual void restore_snapshot(const Glib::ustring& filename, History& hist) = 0;
virtual const Glib::ustring get_filename_extension() = 0;
virtual const Glib::ustring get_filename_description() = 0;
protected:

View File

@ -49,12 +49,12 @@ namespace sgpem
std::vector<Serializer*> get_registered() const;
/** \brief Registers a serializer
* \param serializer The serializer, cannot be NULL
* \param serializer The serializer, cannot be nullptr
*/
void register_serializer(Serializer* serializer);
/** \brief Unregisters a serializer
* \param serializer The serializer, cannot be NULL. If the serializer
* \param serializer The serializer, cannot be nullptr. If the serializer
* wasn't previously registered, this method is a no-op.
*/
void unregister_serializer(Serializer* serializer);

View File

@ -91,7 +91,7 @@ namespace sgpem
Advances the simulation by one or more steps, depending on the
actual state and on the value set with set_mode().
*/
virtual void run() throw(UserInterruptException, NullPolicyException, MalformedPolicyException) = 0;
virtual void run() = 0;
/**
\brief Pauses a running simulation.
@ -117,7 +117,7 @@ namespace sgpem
Pauses the simulation and jumps to the specified instant
*/
virtual void jump_to(History::position p) throw(UserInterruptException, NullPolicyException, MalformedPolicyException) = 0;
virtual void jump_to(History::position p) = 0;
/**
@ -146,7 +146,7 @@ namespace sgpem
/**
\brief Setup the CPU policy to be used by the system.
*/
virtual void set_policy(CPUPolicy*) throw(CPUPolicyException) = 0;
virtual void set_policy(CPUPolicy*) = 0;
/**
\brief Setup the resource policy to be used by the system.

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