Replace autotools with CMake at the toplevel, backend now compiles with newer GCC
This commit is contained in:
parent
d50ec337d1
commit
616aef27a8
57
.bzrignore
57
.bzrignore
|
@ -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
|
|
|
@ -1,59 +1,2 @@
|
||||||
*~
|
*~
|
||||||
|
/CMakeLists.txt.user
|
||||||
**/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
|
|
||||||
|
|
|
@ -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
291
INSTALL
|
@ -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.
|
|
||||||
|
|
666
Makefile.am
666
Makefile.am
|
@ -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
16
README
|
@ -9,18 +9,14 @@ For convenience, here's a short glance at the
|
||||||
build process (while the manual isn't finished):
|
build process (while the manual isn't finished):
|
||||||
in the source package root directory, type:
|
in the source package root directory, type:
|
||||||
|
|
||||||
mkdir =build && cd =build
|
mkdir build && cd build
|
||||||
../configure --prefix=/path/to/installation/dir
|
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/installation/dir
|
||||||
make
|
cmake --build .
|
||||||
su -c "make install"
|
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
|
make doc
|
||||||
|
|
||||||
if you want PDFs of the user and developer manuals,
|
|
||||||
|
|
||||||
make pdf
|
|
||||||
|
|
||||||
As simple as that.
|
As simple as that.
|
||||||
|
|
||||||
|
|
20
autogen.sh
20
autogen.sh
|
@ -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
|
|
1237
config/Doxyfile.in
1237
config/Doxyfile.in
File diff suppressed because it is too large
Load Diff
|
@ -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
|
|
|
@ -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}
|
|
|
@ -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}
|
|
130
config/svn2cl.sh
130
config/svn2cl.sh
|
@ -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" -
|
|
|
@ -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) < $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>
|
|
169
configure.ac
169
configure.ac
|
@ -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
|
|
|
@ -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}"
|
|
|
@ -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.
|
|
|
@ -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.
|
|
|
@ -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
|
|
|
@ -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
|
|
||||||
}
|
|
|
@ -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
|
|
||||||
|
|
|
@ -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
|
|
|
@ -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 "$(SolutionDir)..\..\plugins\pyloader\src\sgpem_wrap.cxx" "$(SolutionDir)..\..\plugins\pyloader\src\sgpem.i"
copy "$(SolutionDir)..\..\plugins\pyloader\src\*.py" "$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader"
"
|
|
||||||
ExcludedFromBuild="false"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)config";"$(SolutionDir)..\..";"$(PYTHON_BASEPATH)\include";"$(SolutionDir)..\..\src\backend""
|
|
||||||
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="
"
|
|
||||||
AdditionalDependencies="python27.lib backend.lib"
|
|
||||||
LinkIncremental="2"
|
|
||||||
AdditionalLibraryDirectories=""$(PYTHON_BASEPATH)\libs";"$(SolutionDir)$(ConfigurationName)""
|
|
||||||
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 "$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader\_sgpem.dll" "$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader\_sgpem.pyd""
|
|
||||||
/>
|
|
||||||
</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 "$(SolutionDir)..\..\plugins\pyloader\src\sgpem_wrap.cxx" "$(SolutionDir)..\..\plugins\pyloader\src\sgpem.i"
copy "$(SolutionDir)..\..\plugins\pyloader\src\*.py" "$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader"
"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)config";"$(SolutionDir)..\..";"$(PYTHON_BASEPATH)\include";"$(SolutionDir)..\..\src\backend""
|
|
||||||
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=""$(PYTHON_BASEPATH)\libs";"$(SolutionDir)$(ConfigurationName)""
|
|
||||||
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 "$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader\_sgpem.dll" "$(SolutionDir)$(ConfigurationName)\plugins\extras\pyloader\_sgpem.pyd""
|
|
||||||
/>
|
|
||||||
</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>
|
|
|
@ -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=""$(SolutionDir)config";"$(SolutionDir)..\..\src\backend";"$(SolutionDir)..\..""
|
|
||||||
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=""$(SolutionDir)config";"$(SolutionDir)..\..\src\backend";"$(SolutionDir)..\..""
|
|
||||||
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>
|
|
|
@ -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
|
|
|
@ -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.
|
|
|
@ -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 "$(SolutionDir)..\..\plugins\pyloader\src\builtin-policies\*.py" "$(SolutionDir)$(ConfigurationName)\policies""
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)\config";"$(SolutionDir)..\..\src\backend";"$(SolutionDir)..\..\plugins\pyloader";"$(PYTHON_BASEPATH)\include""
|
|
||||||
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=""$(PYTHON_BASEPATH)\libs";"$(SolutionDir)$(ConfigurationName)""
|
|
||||||
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 "$(SolutionDir)..\..\plugins\pyloader\src\builtin-policies\*.py" "$(SolutionDir)$(ConfigurationName)\policies""
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)config";"$(SolutionDir)..\..\src\backend";"$(SolutionDir)..\..\plugins\pyloader";"$(PYTHON_BASEPATH)\include""
|
|
||||||
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=""$(PYTHON_BASEPATH)\libs";"$(SolutionDir)$(ConfigurationName)""
|
|
||||||
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>
|
|
|
@ -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
|
|
|
@ -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 "$(SolutionDir)..\..\ui\*.ui" "$(SolutionDir)$(ConfigurationName)\ui"
copy "$(SolutionDir)..\..\data\logo.png" "$(SolutionDir)$(ConfigurationName)\ui"
copy "$(SolutionDir)..\..\src\testsuite\scheduling-wizards\environments" "$(SolutionDir)$(ConfigurationName)\examples"
"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)\config";"$(SolutionDir)..\..\src\backend";"$(SolutionDir)..\..";"$(GTKMM_BASEPATH)\lib\cairomm-1.0\include""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;VISIBILITY_SUPPORT_HH;UIDIR=""./ui"";EXAMPLESDIR=""./examples"""
|
|
||||||
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=""$(SolutionDir)$(ConfigurationName)""
|
|
||||||
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 "$(SolutionDir)..\..\ui\*.ui" "$(SolutionDir)$(ConfigurationName)\ui"
copy "$(SolutionDir)..\..\data\logo.png" "$(SolutionDir)$(ConfigurationName)\ui"
copy "$(SolutionDir)..\..\src\testsuite\scheduling-wizards\environments" "$(SolutionDir)$(ConfigurationName)\examples"
"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)config";"$(SolutionDir)..\..\src\backend";"$(SolutionDir)..\..";"$(GTKMM_BASEPATH)\lib\cairomm-1.0\include""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;VISIBILITY_SUPPORT_HH;UIDIR=""./ui"";EXAMPLESDIR=""./examples"""
|
|
||||||
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=""$(SolutionDir)$(ConfigurationName)""
|
|
||||||
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>
|
|
|
@ -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=""$(SolutionDir)config";"$(SolutionDir)..\..\src\backend";"$(SolutionDir)..\..\plugins\xmlsave""
|
|
||||||
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=""$(SolutionDir)$(ConfigurationName)""
|
|
||||||
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=""$(SolutionDir)config";"$(SolutionDir)..\..\src\backend";"$(SolutionDir)..\..\plugins\xmlsave""
|
|
||||||
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=""$(SolutionDir)$(ConfigurationName)""
|
|
||||||
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>
|
|
|
@ -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 ----------------------
|
|
||||||
|
|
|
@ -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 ----------------------
|
|
||||||
|
|
|
@ -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 ----------------------
|
|
||||||
|
|
|
@ -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.])
|
|
||||||
])
|
|
|
@ -26,12 +26,12 @@
|
||||||
using namespace sgpem;
|
using namespace sgpem;
|
||||||
|
|
||||||
// Is this OK? If not, we must use a function with a local static variable...
|
// Is this OK? If not, we must use a function with a local static variable...
|
||||||
PythonCPUPolicyManager* _policy_manager = NULL;
|
PythonCPUPolicyManager* _policy_manager = nullptr;
|
||||||
|
|
||||||
void
|
void
|
||||||
sgpem__Plugin__on_init()
|
sgpem__Plugin__on_init()
|
||||||
{
|
{
|
||||||
if (_policy_manager == NULL)
|
if (_policy_manager == nullptr)
|
||||||
_policy_manager = new sgpem::PythonCPUPolicyManager();
|
_policy_manager = new sgpem::PythonCPUPolicyManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ void
|
||||||
sgpem__Plugin__on_exit()
|
sgpem__Plugin__on_exit()
|
||||||
{
|
{
|
||||||
delete _policy_manager;
|
delete _policy_manager;
|
||||||
_policy_manager = NULL;
|
_policy_manager = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
|
|
|
@ -63,14 +63,14 @@ namespace sgpem
|
||||||
// WARNING : this class needs extensive and above all
|
// WARNING : this class needs extensive and above all
|
||||||
// *strong* exception checking / handling!
|
// *strong* exception checking / handling!
|
||||||
|
|
||||||
PythonCPUPolicy::PythonCPUPolicy(const char* name) throw(MalformedPolicyException)
|
PythonCPUPolicy::PythonCPUPolicy(const char* name)
|
||||||
: _upolicy_dict(NULL), _adapter(NULL), _name(name), _description()
|
: _upolicy_dict(NULL), _adapter(NULL), _name(name), _description()
|
||||||
{
|
{
|
||||||
PyObject* pLoadmeStr = PyUnicode_FromString (name);
|
PyObject* pLoadmeStr = PyUnicode_FromString (name);
|
||||||
PyObject* pUserCPUPolicyModule = PyImport_Import(pLoadmeStr);
|
PyObject* pUserCPUPolicyModule = PyImport_Import(pLoadmeStr);
|
||||||
Py_DECREF(pLoadmeStr);
|
Py_DECREF(pLoadmeStr);
|
||||||
|
|
||||||
if (pUserCPUPolicyModule == NULL)
|
if (pUserCPUPolicyModule == nullptr)
|
||||||
throw MalformedPolicyException(get_exception_information());
|
throw MalformedPolicyException(get_exception_information());
|
||||||
|
|
||||||
// Dictionary with defined ``symbols'' for .pyc file
|
// 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
|
// Now takes the user-defined policy class from pUserCPUPolicyDict
|
||||||
PyObject* pCPUPolicyClass = PyDict_GetItemString(_upolicy_dict, name);
|
PyObject* pCPUPolicyClass = PyDict_GetItemString(_upolicy_dict, name);
|
||||||
if (pCPUPolicyClass == NULL)
|
if (pCPUPolicyClass == nullptr)
|
||||||
throw new MalformedPolicyException (Glib::ustring::compose (
|
throw new MalformedPolicyException (Glib::ustring::compose (
|
||||||
_("Cannot find a class named %1 into the corresponding .py file."),
|
_("Cannot find a class named %1 into the corresponding .py file."),
|
||||||
name));
|
name));
|
||||||
|
@ -109,7 +109,7 @@ PythonCPUPolicy::PythonCPUPolicy(const char* name) throw(MalformedPolicyExceptio
|
||||||
|
|
||||||
Py_DECREF(pScriptAdapterModule);
|
Py_DECREF(pScriptAdapterModule);
|
||||||
|
|
||||||
if (_adapter == NULL)
|
if (_adapter == nullptr)
|
||||||
throw MalformedPolicyException(get_exception_information());
|
throw MalformedPolicyException(get_exception_information());
|
||||||
|
|
||||||
// And now, who's your daddy, huh?
|
// And now, who's your daddy, huh?
|
||||||
|
@ -127,7 +127,7 @@ PythonCPUPolicy::~PythonCPUPolicy()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PythonCPUPolicy::activate() throw(UserInterruptException, MalformedPolicyException)
|
PythonCPUPolicy::activate()
|
||||||
{
|
{
|
||||||
Glib::RecMutex::Lock lock(_mtx);;
|
Glib::RecMutex::Lock lock(_mtx);;
|
||||||
set_callback_policy(const_cast<PythonCPUPolicy*>(this));
|
set_callback_policy(const_cast<PythonCPUPolicy*>(this));
|
||||||
|
@ -157,12 +157,12 @@ PythonCPUPolicy::deactivate()
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PythonCPUPolicy::configure() throw(UserInterruptException, MalformedPolicyException)
|
PythonCPUPolicy::configure()
|
||||||
{
|
{
|
||||||
Glib::RecMutex::Lock lock(_mtx);;
|
Glib::RecMutex::Lock lock(_mtx);;
|
||||||
set_callback_policy(const_cast<PythonCPUPolicy*>(this));
|
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);
|
Py_DECREF(retval);
|
||||||
|
|
||||||
wait_unlock();
|
wait_unlock();
|
||||||
|
@ -172,12 +172,12 @@ PythonCPUPolicy::configure() throw(UserInterruptException, MalformedPolicyExcept
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PythonCPUPolicy::sort_queue() const throw(UserInterruptException, MalformedPolicyException)
|
PythonCPUPolicy::sort_queue() const
|
||||||
{
|
{
|
||||||
Glib::RecMutex::Lock lock(_mtx);;
|
Glib::RecMutex::Lock lock(_mtx);;
|
||||||
set_callback_policy(const_cast<PythonCPUPolicy*>(this));
|
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
|
// Do minimal debugging
|
||||||
if (!retval) PyErr_Print();
|
if (!retval) PyErr_Print();
|
||||||
|
@ -203,18 +203,18 @@ PythonCPUPolicy::get_name() const
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PythonCPUPolicy::is_pre_emptive() const throw(UserInterruptException, MalformedPolicyException)
|
PythonCPUPolicy::is_pre_emptive() const
|
||||||
{
|
{
|
||||||
Glib::RecMutex::Lock lock(_mtx);;
|
Glib::RecMutex::Lock lock(_mtx);;
|
||||||
set_callback_policy(const_cast<PythonCPUPolicy*>(this));
|
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);
|
Py_DECREF(retval);
|
||||||
|
|
||||||
wait_unlock();
|
wait_unlock();
|
||||||
|
|
||||||
// Parse return value stored in global Python object
|
// 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);
|
assert(retval);
|
||||||
bool ret = PyObject_IsTrue(retval);
|
bool ret = PyObject_IsTrue(retval);
|
||||||
Py_DECREF(retval);
|
Py_DECREF(retval);
|
||||||
|
@ -225,12 +225,12 @@ PythonCPUPolicy::is_pre_emptive() const throw(UserInterruptException, MalformedP
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
PythonCPUPolicy::get_time_slice() const throw(UserInterruptException, MalformedPolicyException)
|
PythonCPUPolicy::get_time_slice() const
|
||||||
{
|
{
|
||||||
Glib::RecMutex::Lock lock(_mtx);;
|
Glib::RecMutex::Lock lock(_mtx);;
|
||||||
set_callback_policy(const_cast<PythonCPUPolicy*>(this));
|
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
|
// Do minimal debugging
|
||||||
if (!retval) PyErr_Print();
|
if (!retval) PyErr_Print();
|
||||||
|
@ -239,7 +239,7 @@ PythonCPUPolicy::get_time_slice() const throw(UserInterruptException, MalformedP
|
||||||
wait_unlock();
|
wait_unlock();
|
||||||
|
|
||||||
// Parse return value stored in global Python object
|
// 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);
|
assert(retval);
|
||||||
long tmp = PyLong_AsLong(retval);
|
long tmp = PyLong_AsLong(retval);
|
||||||
Py_DECREF(retval);
|
Py_DECREF(retval);
|
||||||
|
@ -250,7 +250,7 @@ PythonCPUPolicy::get_time_slice() const throw(UserInterruptException, MalformedP
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PythonCPUPolicy::wait_unlock() const throw(UserInterruptException, MalformedPolicyException)
|
PythonCPUPolicy::wait_unlock() const
|
||||||
{
|
{
|
||||||
// Polling time
|
// Polling time
|
||||||
static const int wait_for = 150000;
|
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!!
|
Glib::usleep(wait_for); // hack'a'ton! magggggiccc nummmbeeerrrrrs!!
|
||||||
Py_BLOCK_THREADS;
|
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);
|
assert(retval);
|
||||||
still_locked = PyObject_IsTrue(retval);
|
still_locked = PyObject_IsTrue(retval);
|
||||||
Py_DECREF(retval);
|
Py_DECREF(retval);
|
||||||
|
@ -279,7 +279,7 @@ PythonCPUPolicy::wait_unlock() const throw(UserInterruptException, MalformedPoli
|
||||||
Py_UNBLOCK_THREADS;
|
Py_UNBLOCK_THREADS;
|
||||||
PyEval_RestoreThread(_save);
|
PyEval_RestoreThread(_save);
|
||||||
|
|
||||||
if(PyErr_Occurred() != NULL)
|
if(PyErr_Occurred() != nullptr)
|
||||||
abort();
|
abort();
|
||||||
|
|
||||||
throw UserInterruptException(_("User-defined policy is "
|
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
|
// 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)
|
if(pException != Py_None)
|
||||||
{
|
{
|
||||||
|
@ -326,18 +326,18 @@ PythonCPUPolicy::wait_unlock() const throw(UserInterruptException, MalformedPoli
|
||||||
string
|
string
|
||||||
PythonCPUPolicy::get_exception_information()
|
PythonCPUPolicy::get_exception_information()
|
||||||
{
|
{
|
||||||
if (PyErr_Occurred() == NULL)
|
if (PyErr_Occurred() == nullptr)
|
||||||
return _("no error");
|
return _("no error");
|
||||||
|
|
||||||
PyObject* pType = NULL;
|
PyObject* pType = nullptr;
|
||||||
PyObject* pValue = NULL;
|
PyObject* pValue = nullptr;
|
||||||
PyObject* pTraceback = NULL;
|
PyObject* pTraceback = nullptr;
|
||||||
|
|
||||||
PyErr_Fetch(&pType, &pValue, &pTraceback);
|
PyErr_Fetch(&pType, &pValue, &pTraceback);
|
||||||
|
|
||||||
string msg;
|
string msg;
|
||||||
|
|
||||||
if (pValue != NULL)
|
if (pValue != nullptr)
|
||||||
{
|
{
|
||||||
msg = sgpem::PyString_AsString(pValue) + "\n";
|
msg = sgpem::PyString_AsString(pValue) + "\n";
|
||||||
PyErr_PrintEx (false);
|
PyErr_PrintEx (false);
|
||||||
|
@ -345,9 +345,9 @@ PythonCPUPolicy::get_exception_information()
|
||||||
else
|
else
|
||||||
msg = string(_("no available information for this error"));
|
msg = string(_("no available information for this error"));
|
||||||
|
|
||||||
if (pType != NULL) { Py_DECREF(pType); }
|
if (pType != nullptr) { Py_DECREF(pType); }
|
||||||
if (pValue != NULL) { Py_DECREF(pValue); }
|
if (pValue != nullptr) { Py_DECREF(pValue); }
|
||||||
if (pTraceback != NULL) { Py_DECREF(pTraceback); }
|
if (pTraceback != nullptr) { Py_DECREF(pTraceback); }
|
||||||
|
|
||||||
PyErr_Clear();
|
PyErr_Clear();
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ namespace sgpem
|
||||||
/// @see activate().
|
/// @see activate().
|
||||||
/// @throw an exception when the policy is malformed and therefore not usable.
|
/// @throw an exception when the policy is malformed and therefore not usable.
|
||||||
/// @param name the name of the policy
|
/// @param name the name of the policy
|
||||||
PythonCPUPolicy(const char* name) throw(MalformedPolicyException);
|
PythonCPUPolicy(const char* name);
|
||||||
|
|
||||||
/// \brief Standard virtual destructor
|
/// \brief Standard virtual destructor
|
||||||
///
|
///
|
||||||
|
@ -89,7 +89,7 @@ namespace sgpem
|
||||||
/// @throw an exception when the policy is malformed and therefore not usable,
|
/// @throw an exception when the policy is malformed and therefore not usable,
|
||||||
/// or when the policy is taking too long to terminate its work.
|
/// or when the policy is taking too long to terminate its work.
|
||||||
/// @see ::CPUPolicy::configure().
|
/// @see ::CPUPolicy::configure().
|
||||||
void configure() throw(UserInterruptException, MalformedPolicyException);
|
void configure();
|
||||||
|
|
||||||
/// \brief Sorts the queue, asynchronously.
|
/// \brief Sorts the queue, asynchronously.
|
||||||
///
|
///
|
||||||
|
@ -97,7 +97,7 @@ namespace sgpem
|
||||||
/// @throw an exception when the policy is malformed and therefore not usable,
|
/// @throw an exception when the policy is malformed and therefore not usable,
|
||||||
/// or when the policy is taking too long to terminate its work.
|
/// or when the policy is taking too long to terminate its work.
|
||||||
/// @see ::CPUPolicy::sort_queue().
|
/// @see ::CPUPolicy::sort_queue().
|
||||||
void sort_queue() const throw(UserInterruptException, MalformedPolicyException);
|
void sort_queue() const;
|
||||||
|
|
||||||
/// \brief Returns a textual description of the policy.
|
/// \brief Returns a textual description of the policy.
|
||||||
///
|
///
|
||||||
|
@ -126,7 +126,7 @@ namespace sgpem
|
||||||
/// @return \c TRUE if the policy is preemptive.
|
/// @return \c TRUE if the policy is preemptive.
|
||||||
/// @return \c FALSE if the policy is not preemptive.
|
/// @return \c FALSE if the policy is not preemptive.
|
||||||
/// @see ::CPUPolicy::is_pre_emptive().
|
/// @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.
|
/// \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.
|
/// or when the policy is taking too long to terminate its work.
|
||||||
/// @return the lenght of the time slice.
|
/// @return the lenght of the time slice.
|
||||||
/// @see ::CPUPolicy::get_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).
|
/// \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,
|
/// @throw an exception when the policy is malformed and therefore not usable,
|
||||||
/// or when the policy is taking too long to terminate its work.
|
/// or when the policy is taking too long to terminate its work.
|
||||||
/// @see ::CPUPolicy::activate().
|
/// @see ::CPUPolicy::activate().
|
||||||
void activate() throw(UserInterruptException, MalformedPolicyException);
|
void activate();
|
||||||
|
|
||||||
/// \brief Activates the policy.
|
/// \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 lock is taken again, and we check if the thread has finished via
|
||||||
/// the mutex present in ::ScriptAdapter. If so, wait_unlock() terminates
|
/// the mutex present in ::ScriptAdapter. If so, wait_unlock() terminates
|
||||||
/// successfully. Else it stays in its main loop.
|
/// 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.
|
/// \brief Returns a brief description of a thrown exception.
|
||||||
/// Returns the description of the exception occurred.
|
/// Returns the description of the exception occurred.
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
#include <sgpemv2/global_preferences.hh>
|
#include <sgpemv2/global_preferences.hh>
|
||||||
#include <sgpemv2/cpu_policies_gatekeeper.hh>
|
#include <sgpemv2/cpu_policies_gatekeeper.hh>
|
||||||
|
|
||||||
#include <sgpemv2/templates/deletor.tcc>
|
|
||||||
|
|
||||||
#include <glibmm/ustring.h>
|
#include <glibmm/ustring.h>
|
||||||
#include <glibmm/timer.h>
|
#include <glibmm/timer.h>
|
||||||
#include <glibmm/fileutils.h>
|
#include <glibmm/fileutils.h>
|
||||||
|
@ -104,7 +102,7 @@ PythonCPUPolicyManager::PythonCPUPolicyManager()
|
||||||
|
|
||||||
PythonCPUPolicyManager::~PythonCPUPolicyManager()
|
PythonCPUPolicyManager::~PythonCPUPolicyManager()
|
||||||
{
|
{
|
||||||
for_each(_policies.begin(), _policies.end(), memory::deletor<CPUPolicy>());
|
for_each(_policies.begin(), _policies.end(), [] (auto *p) { delete p; });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -137,7 +135,7 @@ PythonCPUPolicyManager::collect_policies()
|
||||||
if (dot_py.match(*file_it))
|
if (dot_py.match(*file_it))
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
std::clog << *file_it << " appears to be a Python script. Attempting to load..." << std::endl;
|
std::clog << *file_it << " appears to be a Python script. Attempting to load..." << std::endl;
|
||||||
#endif
|
#endif
|
||||||
//strip extension
|
//strip extension
|
||||||
std::string policy_name = (*file_it).substr(0, (*file_it).size() - 3);
|
std::string policy_name = (*file_it).substr(0, (*file_it).size() - 3);
|
||||||
|
|
|
@ -86,7 +86,7 @@ namespace sgpem {
|
||||||
virtual ~CPUPolicy() = 0;
|
virtual ~CPUPolicy() = 0;
|
||||||
sgpem::PolicyParameters& get_parameters();
|
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);
|
sgpem::Thread& get_item_at(position index);
|
||||||
|
|
||||||
void swap(position a, position b) throw(std::out_of_range);
|
void swap(position a, position b);
|
||||||
void bubble_to_front(position x) throw(std::out_of_range);
|
void bubble_to_front(position x);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Avoid instantiation and copy
|
// Avoid instantiation and copy
|
||||||
|
|
|
@ -49,7 +49,7 @@ find_pol_by_name(const vector<CPUPolicy*>& pols, const Glib::ustring& name)
|
||||||
for ( ; it != pols.end(); it++)
|
for ( ; it != pols.end(); it++)
|
||||||
if ((*it)->get_name() == name)
|
if ((*it)->get_name() == name)
|
||||||
return *it;
|
return *it;
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ main(int argc, char** argv)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_configure");
|
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_configure");
|
||||||
assert(pol != NULL);
|
assert(pol != nullptr);
|
||||||
|
|
||||||
// activate_policy will also configure the policy
|
// activate_policy will also configure the policy
|
||||||
pgk.activate_policy(&his, pol);
|
pgk.activate_policy(&his, pol);
|
||||||
|
@ -104,7 +104,7 @@ main(int argc, char** argv)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_is_preemptive");
|
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_is_preemptive");
|
||||||
assert(pol != NULL);
|
assert(pol != nullptr);
|
||||||
pgk.activate_policy(&his, pol);
|
pgk.activate_policy(&his, pol);
|
||||||
pol->is_pre_emptive();
|
pol->is_pre_emptive();
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ main(int argc, char** argv)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_get_time_slice");
|
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_get_time_slice");
|
||||||
assert(pol != NULL);
|
assert(pol != nullptr);
|
||||||
pgk.activate_policy(&his, pol);
|
pgk.activate_policy(&his, pol);
|
||||||
pol->get_time_slice();
|
pol->get_time_slice();
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ main(int argc, char** argv)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_get_time_slice");
|
CPUPolicy* pol = find_pol_by_name(policies, "python_loader_get_time_slice");
|
||||||
assert(pol != NULL);
|
assert(pol != nullptr);
|
||||||
pgk.activate_policy(&his, pol);
|
pgk.activate_policy(&his, pol);
|
||||||
pol->sort_queue();
|
pol->sort_queue();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,12 +26,12 @@
|
||||||
|
|
||||||
using namespace sgpem;
|
using namespace sgpem;
|
||||||
|
|
||||||
sgpem::XMLSerializer* _serializer = NULL;
|
sgpem::XMLSerializer* _serializer = nullptr;
|
||||||
|
|
||||||
void
|
void
|
||||||
sgpem__Plugin__on_init()
|
sgpem__Plugin__on_init()
|
||||||
{
|
{
|
||||||
if (_serializer == NULL)
|
if (_serializer == nullptr)
|
||||||
_serializer = new sgpem::XMLSerializer();
|
_serializer = new sgpem::XMLSerializer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ void
|
||||||
sgpem__Plugin__on_exit()
|
sgpem__Plugin__on_exit()
|
||||||
{
|
{
|
||||||
delete _serializer;
|
delete _serializer;
|
||||||
_serializer = NULL;
|
_serializer = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
|
|
|
@ -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 */
|
/* COMPAT: Do not genrate nodes for formatting spaces */
|
||||||
LIBXML_TEST_VERSION
|
LIBXML_TEST_VERSION
|
||||||
|
@ -46,7 +46,7 @@ void XMLSerializer::save_snapshot(const Glib::ustring& filename, const History&
|
||||||
|
|
||||||
xmlDocPtr doc;
|
xmlDocPtr doc;
|
||||||
doc = xmlNewDoc((const xmlChar *)"1.0");
|
doc = xmlNewDoc((const xmlChar *)"1.0");
|
||||||
if (doc != NULL)
|
if (doc != nullptr)
|
||||||
{
|
{
|
||||||
fill_doc(doc, hist);
|
fill_doc(doc, hist);
|
||||||
int nwritten = xmlSaveFormatFile (filename.c_str(), doc, 1);
|
int nwritten = xmlSaveFormatFile (filename.c_str(), doc, 1);
|
||||||
|
@ -64,7 +64,7 @@ void XMLSerializer::save_snapshot(const Glib::ustring& filename, const History&
|
||||||
xmlCleanupParser();
|
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!!
|
// TODO - all to do!!
|
||||||
// DEBUG - remove me when finished
|
// 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;
|
* build an XML tree from a the file;
|
||||||
*/
|
*/
|
||||||
doc = xmlParseFile(filename.c_str());
|
doc = xmlParseFile(filename.c_str());
|
||||||
if (doc == NULL)
|
if (doc == nullptr)
|
||||||
{
|
{
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
throw SerializerError("Parsing Error: doc is invalid.");
|
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)
|
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
|
* 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.
|
* 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??
|
//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
|
* Check the document is of the right kind
|
||||||
*/
|
*/
|
||||||
xmlNodePtr root;
|
xmlNodePtr root;
|
||||||
root = xmlDocGetRootElement(doc);
|
root = xmlDocGetRootElement(doc);
|
||||||
if (root == NULL)
|
if (root == nullptr)
|
||||||
{
|
{
|
||||||
xmlFreeDoc(doc);
|
xmlFreeDoc(doc);
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
|
@ -162,7 +162,7 @@ void XMLSerializer::read_doc(xmlDocPtr doc, XMLSerializerFactory& fact) throw(Se
|
||||||
|
|
||||||
xmlNodePtr cur;
|
xmlNodePtr cur;
|
||||||
cur = root->children;
|
cur = root->children;
|
||||||
while (cur != NULL)
|
while (cur != nullptr)
|
||||||
{
|
{
|
||||||
Glib::ustring name((const char *)cur->name);
|
Glib::ustring name((const char *)cur->name);
|
||||||
if (name == "resources")
|
if (name == "resources")
|
||||||
|
@ -179,17 +179,17 @@ void XMLSerializer::read_doc(xmlDocPtr doc, XMLSerializerFactory& fact) throw(Se
|
||||||
|
|
||||||
XMLSerializerFactory::Parameters* read_properties(xmlAttrPtr prop)
|
XMLSerializerFactory::Parameters* read_properties(xmlAttrPtr prop)
|
||||||
{
|
{
|
||||||
if (prop == NULL)
|
if (prop == nullptr)
|
||||||
return NULL;
|
return nullptr;
|
||||||
|
|
||||||
XMLSerializerFactory::Parameters* par = new XMLSerializerFactory::Parameters();
|
XMLSerializerFactory::Parameters* par = new XMLSerializerFactory::Parameters();
|
||||||
while (prop != NULL)
|
while (prop != nullptr)
|
||||||
{
|
{
|
||||||
if (prop->children && xmlNodeIsText(prop->children))
|
if (prop->children && xmlNodeIsText(prop->children))
|
||||||
{
|
{
|
||||||
xmlChar *key = xmlNodeGetContent (prop->children);
|
xmlChar *key = xmlNodeGetContent (prop->children);
|
||||||
// xmlChar *key = xmlNodeListGetString(doc, prop->children, 1);
|
// 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));
|
std::pair<Glib::ustring, Glib::ustring> key_value(Glib::ustring((const char *)prop->name), Glib::ustring((const char *)key));
|
||||||
par->insert(key_value);
|
par->insert(key_value);
|
||||||
|
@ -205,14 +205,14 @@ void XMLSerializer::read_resources(xmlNodePtr resources_node, XMLSerializerFacto
|
||||||
{
|
{
|
||||||
xmlNodePtr cur;
|
xmlNodePtr cur;
|
||||||
cur = resources_node->children;
|
cur = resources_node->children;
|
||||||
while (cur != NULL)
|
while (cur != nullptr)
|
||||||
{
|
{
|
||||||
Glib::ustring node_name((const char *)cur->name);
|
Glib::ustring node_name((const char *)cur->name);
|
||||||
if (node_name == "resource")
|
if (node_name == "resource")
|
||||||
{
|
{
|
||||||
xmlAttrPtr prop = cur->properties;
|
xmlAttrPtr prop = cur->properties;
|
||||||
XMLSerializerFactory::Parameters* par = read_properties(prop);
|
XMLSerializerFactory::Parameters* par = read_properties(prop);
|
||||||
if (par != NULL)
|
if (par != nullptr)
|
||||||
{
|
{
|
||||||
fact.factory_method(Glib::ustring("Resource"), *par);
|
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)
|
void XMLSerializer::read_schedulables(xmlNodePtr schedulables_node, XMLSerializerFactory& fact)
|
||||||
{
|
{
|
||||||
if (schedulables_node == NULL)
|
if (schedulables_node == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
xmlNodePtr cur;
|
xmlNodePtr cur;
|
||||||
cur = schedulables_node->children;
|
cur = schedulables_node->children;
|
||||||
while (cur != NULL)
|
while (cur != nullptr)
|
||||||
{
|
{
|
||||||
Glib::ustring node_name((const char *)cur->name);
|
Glib::ustring node_name((const char *)cur->name);
|
||||||
if (node_name == "process")
|
if (node_name == "process")
|
||||||
{
|
{
|
||||||
xmlAttrPtr prop = cur->properties;
|
xmlAttrPtr prop = cur->properties;
|
||||||
XMLSerializerFactory::Parameters* par = read_properties(prop);
|
XMLSerializerFactory::Parameters* par = read_properties(prop);
|
||||||
if (par != NULL)
|
if (par != nullptr)
|
||||||
{
|
{
|
||||||
fact.factory_method(Glib::ustring("Process"), *par);
|
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)
|
void XMLSerializer::read_threads(xmlNodePtr threads_node, XMLSerializerFactory& fact)
|
||||||
{
|
{
|
||||||
if (threads_node == NULL)
|
if (threads_node == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
xmlNodePtr cur;
|
xmlNodePtr cur;
|
||||||
cur = threads_node->children;
|
cur = threads_node->children;
|
||||||
while (cur != NULL)
|
while (cur != nullptr)
|
||||||
{
|
{
|
||||||
Glib::ustring node_name((const char *)cur->name);
|
Glib::ustring node_name((const char *)cur->name);
|
||||||
if (node_name == "thread")
|
if (node_name == "thread")
|
||||||
{
|
{
|
||||||
xmlAttrPtr prop = cur->properties;
|
xmlAttrPtr prop = cur->properties;
|
||||||
XMLSerializerFactory::Parameters* par = read_properties(prop);
|
XMLSerializerFactory::Parameters* par = read_properties(prop);
|
||||||
if (par != NULL)
|
if (par != nullptr)
|
||||||
{
|
{
|
||||||
fact.factory_method(Glib::ustring("Thread"), *par);
|
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)
|
void XMLSerializer::read_requests(xmlNodePtr requests_node, XMLSerializerFactory& fact)
|
||||||
{
|
{
|
||||||
if (requests_node == NULL)
|
if (requests_node == nullptr)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
xmlNodePtr cur;
|
xmlNodePtr cur;
|
||||||
cur = requests_node->children;
|
cur = requests_node->children;
|
||||||
while (cur != NULL)
|
while (cur != nullptr)
|
||||||
{
|
{
|
||||||
Glib::ustring node_name((const char *)cur->name);
|
Glib::ustring node_name((const char *)cur->name);
|
||||||
if (node_name == "request")
|
if (node_name == "request")
|
||||||
{
|
{
|
||||||
xmlAttrPtr prop = cur->properties;
|
xmlAttrPtr prop = cur->properties;
|
||||||
XMLSerializerFactory::Parameters* par = read_properties(prop);
|
XMLSerializerFactory::Parameters* par = read_properties(prop);
|
||||||
if (par != NULL)
|
if (par != nullptr)
|
||||||
{
|
{
|
||||||
fact.factory_method(Glib::ustring("Request"), *par);
|
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)
|
void XMLSerializer::read_subrequests(xmlNodePtr subrequest_node, XMLSerializerFactory& fact)
|
||||||
{
|
{
|
||||||
if (subrequest_node == NULL)
|
if (subrequest_node == nullptr)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
xmlNodePtr cur;
|
xmlNodePtr cur;
|
||||||
cur = subrequest_node;
|
cur = subrequest_node;
|
||||||
while (cur != NULL)
|
while (cur != nullptr)
|
||||||
{
|
{
|
||||||
Glib::ustring node_name((const char *)cur->name);
|
Glib::ustring node_name((const char *)cur->name);
|
||||||
if (node_name == "subrequest")
|
if (node_name == "subrequest")
|
||||||
{
|
{
|
||||||
xmlAttrPtr prop = cur->properties;
|
xmlAttrPtr prop = cur->properties;
|
||||||
XMLSerializerFactory::Parameters* par = read_properties(prop);
|
XMLSerializerFactory::Parameters* par = read_properties(prop);
|
||||||
if (par != NULL)
|
if (par != nullptr)
|
||||||
{
|
{
|
||||||
fact.factory_method(Glib::ustring("SubRequest"), *par);
|
fact.factory_method(Glib::ustring("SubRequest"), *par);
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace sgpem
|
||||||
|
|
||||||
\throws backend::SerializerError on error
|
\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
|
\brief Re-initialize system status from a saved XML snapshot
|
||||||
|
@ -72,7 +72,7 @@ namespace sgpem
|
||||||
|
|
||||||
\throws backend::SerializerError
|
\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"
|
\return Constant string "xsgp"
|
||||||
|
@ -99,7 +99,7 @@ namespace sgpem
|
||||||
Traverse the passed (previously readed) xml document and
|
Traverse the passed (previously readed) xml document and
|
||||||
rebuild the correct image using the XMLSerializerFactory object.
|
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
|
\brief Restore all the resources from the passed xml node
|
||||||
|
|
|
@ -47,7 +47,7 @@ History* XMLSerializerFactory::get_history()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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")
|
if (class_name == "Resource")
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,7 +77,7 @@ namespace sgpem
|
||||||
|
|
||||||
\throw SerializerError If not all necessary parameters for an object creation are provided
|
\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:
|
protected:
|
||||||
private:
|
private:
|
||||||
typedef Environment::resource_key_t resource_key_t;
|
typedef Environment::resource_key_t resource_key_t;
|
||||||
|
|
|
@ -44,7 +44,7 @@ XMLVisitor::~XMLVisitor()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void XMLVisitor::from_resource(const Resource& /*obj*/) throw(SerializerError)
|
void XMLVisitor::from_resource(const Resource& /*obj*/)
|
||||||
{
|
{
|
||||||
throw SerializerError(
|
throw SerializerError(
|
||||||
_("XMLVisitor: unsupported method from_resource(const Resource& obj)")
|
_("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);
|
from_history(_current, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void XMLVisitor::from_environment(const Environment& obj) throw(SerializerError)
|
void XMLVisitor::from_environment(const Environment& obj)
|
||||||
{
|
{
|
||||||
from_environment(_current, 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);
|
from_process(_current, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void XMLVisitor::from_thread(const Thread& obj) throw(SerializerError)
|
void XMLVisitor::from_thread(const Thread& obj)
|
||||||
{
|
{
|
||||||
from_thread(_current, 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);
|
from_request(_current, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void XMLVisitor::from_subrequest(const SubRequest& obj) throw(SerializerError)
|
void XMLVisitor::from_subrequest(const SubRequest& obj)
|
||||||
{
|
{
|
||||||
from_subrequest(_current, 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);
|
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());
|
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."));
|
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
|
//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();
|
const Environment::Resources& rvect = env.get_resources();
|
||||||
typedef Environment::Resources::const_iterator res_iterator;
|
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
|
//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();
|
const Environment::Processes& pvect = env.get_processes();
|
||||||
typedef std::vector<Process*>::const_iterator proc_iterator;
|
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 id = "reskey" + key;
|
||||||
Glib::ustring strPreemptible("false"); // fixed??
|
Glib::ustring strPreemptible("false"); // fixed??
|
||||||
|
@ -163,7 +163,7 @@ void XMLVisitor::from_resource(xmlNodePtr parent, const Resource& obj, const Gli
|
||||||
Glib::ustring strPlaces;
|
Glib::ustring strPlaces;
|
||||||
to_string<int>(static_cast<int>(obj.get_places()), 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 *) "name", (const xmlChar *) obj.get_name().c_str());
|
||||||
xmlNewProp(process_node, (const xmlChar *) "id", (const xmlChar *) id.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());
|
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 strPriority;
|
||||||
Glib::ustring strArrivalTime;
|
Glib::ustring strArrivalTime;
|
||||||
to_string<int>(obj.get_base_priority(), strPriority);
|
to_string<int>(obj.get_base_priority(), strPriority);
|
||||||
to_string<int>(obj.get_arrival_time(), strArrivalTime);
|
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 *) "name", (const xmlChar *) obj.get_name().c_str());
|
||||||
xmlNewProp(process_node, (const xmlChar *) "priority", (const xmlChar *) strPriority.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());
|
xmlNewProp(process_node, (const xmlChar *) "arrival-time", (const xmlChar *) strArrivalTime.c_str());
|
||||||
|
|
||||||
// make a threads subnode
|
// 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
|
// iterate on threads
|
||||||
typedef std::vector<Thread*> 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;
|
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_arrival_time(), strArrivalTime);
|
||||||
to_string<int>(obj.get_total_cpu_time(), strLastsTime);
|
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 *) "name", (const xmlChar *) obj.get_name().c_str());
|
||||||
xmlNewProp(thread_node, (const xmlChar *) "priority", (const xmlChar *) strPriority.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 *) "arrival-delta", (const xmlChar *) strArrivalTime.c_str());
|
||||||
xmlNewProp(thread_node, (const xmlChar *) "lasts-for", (const xmlChar *) strLastsTime.c_str());
|
xmlNewProp(thread_node, (const xmlChar *) "lasts-for", (const xmlChar *) strLastsTime.c_str());
|
||||||
|
|
||||||
// make a requests subnode
|
// 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
|
// iterate on requests
|
||||||
typedef std::vector<Request*> Requests;
|
typedef std::vector<Request*> Requests;
|
||||||
typedef std::vector<Request*>::const_iterator req_iterator;
|
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;
|
Glib::ustring strArrivalTime;
|
||||||
to_string<int>(obj.get_instant(), 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());
|
xmlNewProp(request_node, (const xmlChar *) "arrival-time", (const xmlChar *) strArrivalTime.c_str());
|
||||||
|
|
||||||
// make a requests subnode
|
// 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
|
// iterate on subrequests
|
||||||
typedef std::vector<SubRequest*> SubRequests;
|
typedef std::vector<SubRequest*> SubRequests;
|
||||||
typedef std::vector<SubRequest*>::const_iterator subreq_iterator;
|
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;
|
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_resource_key(), strResource);
|
||||||
to_string<int>(obj.get_length(), strLastsFor);
|
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 *) "resource", (const xmlChar *) strResource.c_str());
|
||||||
xmlNewProp(subrequest_node, (const xmlChar *) "lasts-for", (const xmlChar *) strLastsFor.c_str());
|
xmlNewProp(subrequest_node, (const xmlChar *) "lasts-for", (const xmlChar *) strLastsFor.c_str());
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,61 +69,61 @@ namespace sgpem
|
||||||
\brief Add output to the serializer taking data from history
|
\brief Add output to the serializer taking data from history
|
||||||
Wrapper method: call from_history(xmlNodePtr parent, const History& obj);
|
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
|
\brief Add output to the serializer taking data from environment
|
||||||
Wrapper method: call from_environment(xmlNodePtr parent, const Environment& obj);
|
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
|
\brief Add output to the serializer taking data from resource
|
||||||
BUG: a resource must be saved with her own associated key.
|
BUG: a resource must be saved with her own associated key.
|
||||||
Throw an exception.
|
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
|
\brief Add output to the serializer taking data from resource and key
|
||||||
BUG FIXED: This save a resource with her own associated 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);
|
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
|
\brief Add output to the serializer taking data from process
|
||||||
Wrapper method: call from_process(xmlNodePtr parent, const Process& obj);
|
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
|
\brief Add output to the serializer taking data from thread
|
||||||
Wrapper method: call from_thread(xmlNodePtr parent, const Thread& obj);
|
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
|
\brief Add output to the serializer taking data from request
|
||||||
Wrapper method: call from_request(xmlNodePtr parent, const Request& obj);
|
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
|
\brief Add output to the serializer taking data from subrequest
|
||||||
Wrapper method: call from_subrequest(xmlNodePtr parent, const SubRequest& obj);
|
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:
|
private:
|
||||||
void from_history(xmlNodePtr parent, const History& obj) throw(SerializerError);
|
void from_history(xmlNodePtr parent, const History& obj);
|
||||||
void from_environment(xmlNodePtr parent, const Environment& obj) throw(SerializerError);
|
void from_environment(xmlNodePtr parent, const Environment& obj);
|
||||||
void from_resource(xmlNodePtr parent, const Resource& obj, const Glib::ustring& key) throw(SerializerError);
|
void from_resource(xmlNodePtr parent, const Resource& obj, const Glib::ustring& key);
|
||||||
void from_process(xmlNodePtr parent, const Process& obj) throw(SerializerError);
|
void from_process(xmlNodePtr parent, const Process& obj);
|
||||||
void from_thread(xmlNodePtr parent, const Thread& obj) throw(SerializerError);
|
void from_thread(xmlNodePtr parent, const Thread& obj);
|
||||||
void from_request(xmlNodePtr parent, const Request& obj) throw(SerializerError);
|
void from_request(xmlNodePtr parent, const Request& obj);
|
||||||
void from_subrequest(xmlNodePtr parent, const SubRequest& obj) throw(SerializerError);
|
void from_subrequest(xmlNodePtr parent, const SubRequest& obj);
|
||||||
|
|
||||||
xmlNodePtr _current;
|
xmlNodePtr _current;
|
||||||
};
|
};
|
||||||
|
|
|
@ -104,7 +104,7 @@ AddRequestDialog::run_add(sgpem::Thread& owner)
|
||||||
{
|
{
|
||||||
update_combo();
|
update_combo();
|
||||||
|
|
||||||
Request* r = NULL;
|
Request* r = nullptr;
|
||||||
|
|
||||||
// reset the dialog data
|
// reset the dialog data
|
||||||
// _list_model->clear();
|
// _list_model->clear();
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace sgpem
|
||||||
/** \brief Attemts to show the dialog, and constructs a new request
|
/** \brief Attemts to show the dialog, and constructs a new request
|
||||||
* if response is OK
|
* if response is OK
|
||||||
* \param owner The thread which will own the request
|
* \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
|
* wasn't created
|
||||||
*/
|
*/
|
||||||
Request* run_add(Thread& owner);
|
Request* run_add(Thread& owner);
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include <sgpemv2/sub_request.hh>
|
#include <sgpemv2/sub_request.hh>
|
||||||
#include <sgpemv2/thread.hh>
|
#include <sgpemv2/thread.hh>
|
||||||
|
|
||||||
#include <sgpemv2/templates/deletor.tcc>
|
|
||||||
#include <sgpemv2/templates/down_cast.tcc>
|
#include <sgpemv2/templates/down_cast.tcc>
|
||||||
#include <sgpemv2/templates/sequences.tcc>
|
#include <sgpemv2/templates/sequences.tcc>
|
||||||
|
|
||||||
|
@ -200,7 +199,7 @@ ConcreteEnvironment::~ConcreteEnvironment()
|
||||||
// This call will invoke the DynamicProcess virtual destructor
|
// This call will invoke the DynamicProcess virtual destructor
|
||||||
// Which will delete on cascade all DynamicThreads and so on.
|
// Which will delete on cascade all DynamicThreads and so on.
|
||||||
for_each(_processes.begin(), _processes.end(),
|
for_each(_processes.begin(), _processes.end(),
|
||||||
memory::deletor<Process>());
|
[] (auto *p) { delete p; });
|
||||||
|
|
||||||
// We do the same with Resources.
|
// We do the same with Resources.
|
||||||
for (Resources::iterator it = _resources.begin(); it != _resources.end(); it++)
|
for (Resources::iterator it = _resources.begin(); it != _resources.end(); it++)
|
||||||
|
|
|
@ -37,12 +37,11 @@
|
||||||
#include <sgpemv2/history_observer.hh>
|
#include <sgpemv2/history_observer.hh>
|
||||||
|
|
||||||
#include <sgpemv2/templates/down_cast.tcc>
|
#include <sgpemv2/templates/down_cast.tcc>
|
||||||
#include <sgpemv2/templates/deletor.tcc>
|
|
||||||
#include <sgpemv2/templates/smartp.tcc>
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -50,9 +49,6 @@
|
||||||
|
|
||||||
using namespace sgpem;
|
using namespace sgpem;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using memory::smart_ptr;
|
|
||||||
using memory::deletor;
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------
|
// ---------------
|
||||||
// For all you evil-doers on Earth, this is your mighty punishment!
|
// 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 *it;
|
||||||
}
|
}
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,7 +95,7 @@ ConcreteHistory::ConcreteHistory()
|
||||||
ConcreteHistory::~ConcreteHistory()
|
ConcreteHistory::~ConcreteHistory()
|
||||||
{
|
{
|
||||||
for_each(_snapshots.begin(), _snapshots.end(),
|
for_each(_snapshots.begin(), _snapshots.end(),
|
||||||
deletor<ConcreteEnvironment>());
|
[] (auto *p) { delete p; });
|
||||||
}
|
}
|
||||||
|
|
||||||
ConcreteHistory::ConcreteHistory(const ConcreteHistory& h) :
|
ConcreteHistory::ConcreteHistory(const ConcreteHistory& h) :
|
||||||
|
@ -136,7 +132,6 @@ ConcreteHistory::get_last_environment() const
|
||||||
|
|
||||||
const ConcreteEnvironment&
|
const ConcreteEnvironment&
|
||||||
ConcreteHistory::get_environment_at(position index) const
|
ConcreteHistory::get_environment_at(position index) const
|
||||||
throw(std::out_of_range)
|
|
||||||
{
|
{
|
||||||
return *_snapshots.at(index);
|
return *_snapshots.at(index);
|
||||||
}
|
}
|
||||||
|
@ -226,7 +221,7 @@ ConcreteHistory::remove(Thread& thread)
|
||||||
|
|
||||||
Process* found = deep_find<Process>(processes, dyn_thr.get_process());
|
Process* found = deep_find<Process>(processes, dyn_thr.get_process());
|
||||||
|
|
||||||
if (found == NULL)
|
if (found == nullptr)
|
||||||
return; // not found, just return.
|
return; // not found, just return.
|
||||||
|
|
||||||
DynamicProcess& dynamic_found = down_cast<DynamicProcess&>(*found);
|
DynamicProcess& dynamic_found = down_cast<DynamicProcess&>(*found);
|
||||||
|
@ -250,10 +245,10 @@ ConcreteHistory::remove(Request& request)
|
||||||
|
|
||||||
Process* proc_ref = deep_find<Process>(processes, dyn_proc);
|
Process* proc_ref = deep_find<Process>(processes, dyn_proc);
|
||||||
DynamicProcess* dyn_proc_ref = down_cast<DynamicProcess*>(proc_ref);
|
DynamicProcess* dyn_proc_ref = down_cast<DynamicProcess*>(proc_ref);
|
||||||
if (dyn_proc_ref == NULL)
|
if (dyn_proc_ref == nullptr)
|
||||||
return; // not found, just return.
|
return; // not found, just return.
|
||||||
DynamicThread* thr_ref = deep_find<DynamicThread>(dyn_proc_ref->get_dynamic_threads(), dyn_thr);
|
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.
|
return; // not found, just return.
|
||||||
|
|
||||||
bool removed = deep_remove<DynamicRequest>(thr_ref->get_dynamic_requests(), dyn_req);
|
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);
|
Process* proc_ref = deep_find<Process>(processes, dyn_proc);
|
||||||
DynamicProcess* dyn_proc_ref = down_cast<DynamicProcess*>(proc_ref);
|
DynamicProcess* dyn_proc_ref = down_cast<DynamicProcess*>(proc_ref);
|
||||||
if (dyn_proc_ref == NULL)
|
if (dyn_proc_ref == nullptr)
|
||||||
return; // not found, just return.
|
return; // not found, just return.
|
||||||
DynamicThread* thr_ref = deep_find<DynamicThread>(dyn_proc_ref->get_dynamic_threads(), dyn_thr);
|
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.
|
return; // not found, just return.
|
||||||
DynamicRequest* req_ref = deep_find<DynamicRequest>(thr_ref->get_dynamic_requests(), dyn_req);
|
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.
|
return; // not found, just return.
|
||||||
|
|
||||||
bool removed = deep_remove<DynamicSubRequest>(req_ref->get_dynamic_subrequests(), dyn_sub);
|
bool removed = deep_remove<DynamicSubRequest>(req_ref->get_dynamic_subrequests(), dyn_sub);
|
||||||
|
@ -505,11 +500,15 @@ ConcreteHistory::set_front(position p)
|
||||||
{
|
{
|
||||||
position old_front = _front;
|
position old_front = _front;
|
||||||
if (p > _snapshots.size() - 1)
|
if (p > _snapshots.size() - 1)
|
||||||
|
{
|
||||||
_front = _snapshots.size() - 1;
|
_front = _snapshots.size() - 1;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
_front = p;
|
_front = p;
|
||||||
|
}
|
||||||
|
|
||||||
if(old_front != _front)
|
if(old_front != _front)
|
||||||
notify_change();
|
notify_change();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -526,7 +525,7 @@ ConcreteHistory::reset()
|
||||||
Snapshots::iterator it = _snapshots.begin();
|
Snapshots::iterator it = _snapshots.begin();
|
||||||
it++; // Skip first environment that we saved
|
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"
|
_snapshots.resize(1); // Truncate to keep only our "model"
|
||||||
_front = 0;
|
_front = 0;
|
||||||
_sealed = false;
|
_sealed = false;
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace sgpem
|
||||||
virtual void append_new_environment(ConcreteEnvironment* environment);
|
virtual void append_new_environment(ConcreteEnvironment* environment);
|
||||||
virtual size_t get_size() const;
|
virtual size_t get_size() const;
|
||||||
virtual const ConcreteEnvironment& get_last_environment() 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(resource_key_t resource_key);
|
||||||
virtual void remove(Process& process);
|
virtual void remove(Process& process);
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include <sgpemv2/templates/smartp.tcc>
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
@ -36,7 +34,6 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace sgpem;
|
using namespace sgpem;
|
||||||
using namespace memory;
|
|
||||||
|
|
||||||
ConcreteSimulation::ConcreteSimulation() :
|
ConcreteSimulation::ConcreteSimulation() :
|
||||||
Simulation(), _state(state_stopped),
|
Simulation(), _state(state_stopped),
|
||||||
|
@ -57,13 +54,13 @@ ConcreteSimulation::get_mode() const
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ConcreteSimulation::jump_to(History::position p) throw(UserInterruptException, NullPolicyException, MalformedPolicyException)
|
ConcreteSimulation::jump_to(History::position p)
|
||||||
{
|
{
|
||||||
switch (_state)
|
switch (_state)
|
||||||
{
|
{
|
||||||
case state_running:
|
case state_running:
|
||||||
// pauses the simulation (done below)
|
// pauses the simulation (done below)
|
||||||
break;
|
break;
|
||||||
case state_stopped:
|
case state_stopped:
|
||||||
_history.set_front(0);
|
_history.set_front(0);
|
||||||
break;
|
break;
|
||||||
|
@ -76,18 +73,18 @@ ConcreteSimulation::jump_to(History::position p) throw(UserInterruptException, N
|
||||||
History::LockNotify h_lock(_history);
|
History::LockNotify h_lock(_history);
|
||||||
Simulation::LockNotify s_lock(*this);
|
Simulation::LockNotify s_lock(*this);
|
||||||
|
|
||||||
pause();
|
pause();
|
||||||
|
|
||||||
bool yet_to_finish = true;
|
bool yet_to_finish = true;
|
||||||
History::position increment = 0;
|
History::position increment = 0;
|
||||||
while (yet_to_finish && p > _history.get_front() + increment)
|
while (yet_to_finish && p > _history.get_front() + increment)
|
||||||
{
|
{
|
||||||
yet_to_finish = step();
|
yet_to_finish = step();
|
||||||
increment++;
|
increment++;
|
||||||
}
|
}
|
||||||
get_history().set_front(std::min(p, _history.get_size()));
|
get_history().set_front(std::min(p, _history.get_size()));
|
||||||
if (!yet_to_finish)
|
if (!yet_to_finish)
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -112,7 +109,7 @@ ConcreteSimulation::stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ConcreteSimulation::run() throw(UserInterruptException, NullPolicyException, MalformedPolicyException)
|
ConcreteSimulation::run()
|
||||||
{
|
{
|
||||||
switch (_state)
|
switch (_state)
|
||||||
{
|
{
|
||||||
|
@ -149,15 +146,14 @@ ConcreteSimulation::run() throw(UserInterruptException, NullPolicyException, Mal
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ConcreteSimulation::step()
|
ConcreteSimulation::step()
|
||||||
throw(UserInterruptException, NullPolicyException, MalformedPolicyException)
|
|
||||||
{
|
{
|
||||||
if (get_policy() == NULL)
|
if (get_policy() == nullptr)
|
||||||
{
|
{
|
||||||
stop();
|
stop();
|
||||||
throw NullPolicyException("no CPU policy selected");
|
throw NullPolicyException("no CPU policy selected");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get_resource_policy() == NULL)
|
if (get_resource_policy() == nullptr)
|
||||||
{
|
{
|
||||||
stop();
|
stop();
|
||||||
throw NullPolicyException("no resource policy selected");
|
throw NullPolicyException("no resource policy selected");
|
||||||
|
@ -184,7 +180,7 @@ ConcreteSimulation::step()
|
||||||
if (_history.get_front() == _history.get_size() - 2 && _history.is_sealed())
|
if (_history.get_front() == _history.get_size() - 2 && _history.is_sealed())
|
||||||
yet_to_finish = false;
|
yet_to_finish = false;
|
||||||
|
|
||||||
return yet_to_finish;
|
return yet_to_finish;
|
||||||
}
|
}
|
||||||
catch (const CPUPolicyException& e)
|
catch (const CPUPolicyException& e)
|
||||||
{
|
{
|
||||||
|
@ -214,7 +210,7 @@ ConcreteSimulation::get_history() const
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ConcreteSimulation::set_policy(CPUPolicy* p) throw(CPUPolicyException)
|
ConcreteSimulation::set_policy(CPUPolicy* p)
|
||||||
{
|
{
|
||||||
stop();
|
stop();
|
||||||
|
|
||||||
|
@ -227,12 +223,12 @@ ConcreteSimulation::set_policy(CPUPolicy* p) throw(CPUPolicyException)
|
||||||
{
|
{
|
||||||
try
|
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);
|
CPUPoliciesGatekeeper::get_instance().activate_policy(&_history, _policy);
|
||||||
}
|
}
|
||||||
catch(const CPUPolicyException& e2)
|
catch(const CPUPolicyException& e2)
|
||||||
{
|
{
|
||||||
_policy = NULL;
|
_policy = nullptr;
|
||||||
|
|
||||||
std::string msg = _("unable to change policy and to restore the previous: ");
|
std::string msg = _("unable to change policy and to restore the previous: ");
|
||||||
msg += e2.what();
|
msg += e2.what();
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace sgpem
|
||||||
* Advances the simulation by one or more steps, depending on the
|
* Advances the simulation by one or more steps, depending on the
|
||||||
* actual state and on the value set with set_mode().
|
* actual state and on the value set with set_mode().
|
||||||
*/
|
*/
|
||||||
void run() throw(UserInterruptException, NullPolicyException, MalformedPolicyException);
|
void run();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Pauses a running simulation.
|
\brief Pauses a running simulation.
|
||||||
|
@ -62,7 +62,7 @@ namespace sgpem
|
||||||
Pauses the simulation and jumps to the specified instant
|
Pauses the simulation and jumps to the specified instant
|
||||||
\throw UserInterruptException, NullPolicyException, MalformedPolicyException
|
\throw UserInterruptException, NullPolicyException, MalformedPolicyException
|
||||||
*/
|
*/
|
||||||
void jump_to(History::position p) throw(UserInterruptException, NullPolicyException, MalformedPolicyException);
|
void jump_to(History::position p);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Stops the simulation.
|
\brief Stops the simulation.
|
||||||
|
@ -98,7 +98,7 @@ namespace sgpem
|
||||||
/**
|
/**
|
||||||
\throw An instance of CPUPolicyException, \b not a derived class!!!
|
\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.
|
\brief Setup the resource policy to be used by the system.
|
||||||
|
@ -133,7 +133,7 @@ namespace sgpem
|
||||||
CPUPolicy* _policy;
|
CPUPolicy* _policy;
|
||||||
ResourcePolicy* _resource_policy;
|
ResourcePolicy* _resource_policy;
|
||||||
|
|
||||||
bool step() throw(UserInterruptException, NullPolicyException, MalformedPolicyException);
|
bool step();
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ using std::runtime_error;
|
||||||
using namespace sgpem;
|
using namespace sgpem;
|
||||||
|
|
||||||
// Explicit template instantiation to allow to export symbols from the DSO.
|
// 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 vector<CPUPolicyManager*>::iterator ManagerIterator;
|
||||||
typedef map<History*, CPUPolicy*>::iterator ActiveIterator;
|
typedef map<History*, CPUPolicy*>::iterator ActiveIterator;
|
||||||
|
@ -55,7 +55,7 @@ CPUPoliciesGatekeeper::get_registered() const
|
||||||
void
|
void
|
||||||
CPUPoliciesGatekeeper::register_manager(CPUPolicyManager* manager)
|
CPUPoliciesGatekeeper::register_manager(CPUPolicyManager* manager)
|
||||||
{
|
{
|
||||||
assert(manager != NULL);
|
assert(manager != nullptr);
|
||||||
|
|
||||||
ManagerIterator end = _registered.end();
|
ManagerIterator end = _registered.end();
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ CPUPoliciesGatekeeper::register_manager(CPUPolicyManager* manager)
|
||||||
void
|
void
|
||||||
CPUPoliciesGatekeeper::unregister_manager(CPUPolicyManager* manager)
|
CPUPoliciesGatekeeper::unregister_manager(CPUPolicyManager* manager)
|
||||||
{
|
{
|
||||||
assert(manager != NULL);
|
assert(manager != nullptr);
|
||||||
|
|
||||||
ManagerIterator end = _registered.end();
|
ManagerIterator end = _registered.end();
|
||||||
ManagerIterator pos = find(_registered.begin(), end, manager);
|
ManagerIterator pos = find(_registered.begin(), end, manager);
|
||||||
|
@ -79,9 +79,9 @@ CPUPoliciesGatekeeper::unregister_manager(CPUPolicyManager* manager)
|
||||||
}
|
}
|
||||||
|
|
||||||
CPUPolicy*
|
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);
|
ActiveIterator policy = _active_policies.find(history);
|
||||||
|
|
||||||
|
@ -93,9 +93,9 @@ CPUPoliciesGatekeeper::get_current_policy(History* history) throw(runtime_error)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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 end = _active_policies.end();
|
||||||
ActiveIterator pos = _active_policies.find(history);
|
ActiveIterator pos = _active_policies.find(history);
|
||||||
|
@ -110,9 +110,9 @@ CPUPoliciesGatekeeper::activate_policy(History *history, CPUPolicy* policy) thro
|
||||||
pos->second->deactivate();
|
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
|
// 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
|
// this is a no-op if history is not a key used in the map
|
||||||
_active_policies.erase(history);
|
_active_policies.erase(history);
|
||||||
|
@ -156,10 +156,10 @@ CPUPoliciesGatekeeper::deactivate_policies(CPUPolicyManager* manager)
|
||||||
if (act_it->second == *avail_it)
|
if (act_it->second == *avail_it)
|
||||||
{
|
{
|
||||||
act_it->second->deactivate();
|
act_it->second->deactivate();
|
||||||
// Please note the postfix increment
|
// Please note the postfix increment
|
||||||
// (operating on the old, now invalidated by
|
// (operating on the old, now invalidated by
|
||||||
// erase, iterator object):
|
// erase, iterator object):
|
||||||
_active_policies.erase(act_it++);
|
_active_policies.erase(act_it++);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
++act_it;
|
++act_it;
|
||||||
|
|
|
@ -24,7 +24,7 @@ using namespace sgpem;
|
||||||
|
|
||||||
|
|
||||||
// Static member data
|
// Static member data
|
||||||
CPUPolicy* CPUPolicy::_callback_policy = NULL;
|
CPUPolicy* CPUPolicy::_callback_policy = nullptr;
|
||||||
|
|
||||||
|
|
||||||
CPUPolicy::~CPUPolicy()
|
CPUPolicy::~CPUPolicy()
|
||||||
|
@ -40,10 +40,10 @@ CPUPolicy::get_parameters()
|
||||||
|
|
||||||
|
|
||||||
CPUPolicy*
|
CPUPolicy*
|
||||||
CPUPolicy::callback_get_policy() throw(std::runtime_error)
|
CPUPolicy::callback_get_policy()
|
||||||
{
|
{
|
||||||
if(_callback_policy == NULL)
|
if(_callback_policy == nullptr)
|
||||||
throw std::runtime_error("CPUPolicy::callback_get_policy() not used as a callback method. NULL ptr returned.");
|
throw std::runtime_error("CPUPolicy::callback_get_policy() not used as a callback method. nullptr ptr returned.");
|
||||||
return _callback_policy;
|
return _callback_policy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include "dynamic_thread.hh"
|
#include "dynamic_thread.hh"
|
||||||
|
|
||||||
#include <sgpemv2/serialize_visitor.hh>
|
#include <sgpemv2/serialize_visitor.hh>
|
||||||
#include <sgpemv2/templates/deletor.tcc>
|
|
||||||
#include <sgpemv2/templates/sequences.tcc>
|
#include <sgpemv2/templates/sequences.tcc>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
@ -41,7 +40,7 @@ typedef std::vector<DynamicThread*>::iterator ThreadIt;
|
||||||
DynamicProcess::DynamicProcess(StaticProcess* core) :
|
DynamicProcess::DynamicProcess(StaticProcess* core) :
|
||||||
DynamicSchedulable(), _core(core)
|
DynamicSchedulable(), _core(core)
|
||||||
{
|
{
|
||||||
assert(core != NULL);
|
assert(core != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
DynamicProcess::DynamicProcess(const DynamicProcess &other) :
|
DynamicProcess::DynamicProcess(const DynamicProcess &other) :
|
||||||
|
@ -56,7 +55,7 @@ DynamicProcess::~DynamicProcess()
|
||||||
{
|
{
|
||||||
for_each(_dynamic_threads.begin(),
|
for_each(_dynamic_threads.begin(),
|
||||||
_dynamic_threads.end(),
|
_dynamic_threads.end(),
|
||||||
memory::deletor<DynamicThread>());
|
[] (auto *p) { delete p; });
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<Thread*>
|
std::vector<Thread*>
|
||||||
|
|
|
@ -28,9 +28,9 @@
|
||||||
#include "dynamic_schedulable.hh"
|
#include "dynamic_schedulable.hh"
|
||||||
#include "static_process.hh"
|
#include "static_process.hh"
|
||||||
|
|
||||||
#include <sgpemv2/templates/smartp.tcc>
|
|
||||||
|
|
||||||
#include <glibmm/ustring.h>
|
#include <glibmm/ustring.h>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace sgpem
|
namespace sgpem
|
||||||
|
@ -65,7 +65,7 @@ namespace sgpem
|
||||||
std::vector<DynamicThread*>& get_dynamic_threads();
|
std::vector<DynamicThread*>& get_dynamic_threads();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
memory::smart_ptr<StaticProcess> _core;
|
std::shared_ptr<StaticProcess> _core;
|
||||||
std::vector<DynamicThread*> _dynamic_threads;
|
std::vector<DynamicThread*> _dynamic_threads;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,7 @@
|
||||||
#include "dynamic_thread.hh"
|
#include "dynamic_thread.hh"
|
||||||
#include <sgpemv2/serialize_visitor.hh>
|
#include <sgpemv2/serialize_visitor.hh>
|
||||||
|
|
||||||
#include <sgpemv2/templates/deletor.tcc>
|
|
||||||
#include <sgpemv2/templates/down_cast.tcc>
|
#include <sgpemv2/templates/down_cast.tcc>
|
||||||
#include <sgpemv2/templates/smartp.tcc>
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
@ -39,8 +37,8 @@ DynamicRequest::DynamicRequest(StaticRequest *core,
|
||||||
DynamicThread* owner) :
|
DynamicThread* owner) :
|
||||||
_static_request(core), _dynamic_thread(owner)
|
_static_request(core), _dynamic_thread(owner)
|
||||||
{
|
{
|
||||||
assert(core != NULL);
|
assert(core != nullptr);
|
||||||
assert(owner != NULL);
|
assert(owner != nullptr);
|
||||||
// Leave this line: it helps us with a compiler warning if
|
// Leave this line: it helps us with a compiler warning if
|
||||||
// the get_dynamic* method signature changes:
|
// the get_dynamic* method signature changes:
|
||||||
std::vector<DynamicRequest*>& siblings = owner->get_dynamic_requests();
|
std::vector<DynamicRequest*>& siblings = owner->get_dynamic_requests();
|
||||||
|
@ -52,7 +50,7 @@ DynamicRequest::DynamicRequest(const DynamicRequest& other, DynamicThread* owner
|
||||||
{
|
{
|
||||||
typedef vector<DynamicSubRequest*> SubReqVec;
|
typedef vector<DynamicSubRequest*> SubReqVec;
|
||||||
|
|
||||||
assert(owner != NULL);
|
assert(owner != nullptr);
|
||||||
|
|
||||||
const SubReqVec& other_subs = other._dynamic_subrequests;
|
const SubReqVec& other_subs = other._dynamic_subrequests;
|
||||||
|
|
||||||
|
@ -72,7 +70,7 @@ DynamicRequest::DynamicRequest(const DynamicRequest& other, DynamicThread* owner
|
||||||
DynamicRequest::~DynamicRequest()
|
DynamicRequest::~DynamicRequest()
|
||||||
{
|
{
|
||||||
for_each(_dynamic_subrequests.begin(), _dynamic_subrequests.end(),
|
for_each(_dynamic_subrequests.begin(), _dynamic_subrequests.end(),
|
||||||
memory::deletor<DynamicSubRequest>());
|
[] (auto *p) { delete p; });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,8 @@ namespace sgpem
|
||||||
#include "dynamic_thread.hh"
|
#include "dynamic_thread.hh"
|
||||||
|
|
||||||
#include <sgpemv2/request.hh>
|
#include <sgpemv2/request.hh>
|
||||||
#include <sgpemv2/templates/smartp.hh>
|
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace sgpem
|
namespace sgpem
|
||||||
|
@ -73,7 +73,7 @@ namespace sgpem
|
||||||
// Undefined
|
// Undefined
|
||||||
DynamicRequest(const DynamicRequest& other);
|
DynamicRequest(const DynamicRequest& other);
|
||||||
|
|
||||||
memory::smart_ptr<StaticRequest> _static_request;
|
std::shared_ptr<StaticRequest> _static_request;
|
||||||
DynamicThread* _dynamic_thread;
|
DynamicThread* _dynamic_thread;
|
||||||
std::vector<DynamicSubRequest*> _dynamic_subrequests;
|
std::vector<DynamicSubRequest*> _dynamic_subrequests;
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include <sgpemv2/serialize_visitor.hh>
|
#include <sgpemv2/serialize_visitor.hh>
|
||||||
|
|
||||||
#include <sgpemv2/templates/down_cast.tcc>
|
#include <sgpemv2/templates/down_cast.tcc>
|
||||||
#include <sgpemv2/templates/smartp.tcc>
|
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
|
|
@ -21,14 +21,13 @@
|
||||||
#ifndef DYNAMIC_RESOURCE_HH
|
#ifndef DYNAMIC_RESOURCE_HH
|
||||||
#define DYNAMIC_RESOURCE_HH 1
|
#define DYNAMIC_RESOURCE_HH 1
|
||||||
|
|
||||||
|
|
||||||
#include "glibmm/ustring.h"
|
#include "glibmm/ustring.h"
|
||||||
|
|
||||||
#include <sgpemv2/templates/smartp.hh>
|
|
||||||
|
|
||||||
#include <sgpemv2/resource.hh>
|
#include <sgpemv2/resource.hh>
|
||||||
#include "static_resource.hh"
|
#include "static_resource.hh"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace sgpem
|
namespace sgpem
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -90,7 +89,7 @@ namespace sgpem
|
||||||
const StaticResource& get_core() const;
|
const StaticResource& get_core() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
memory::smart_ptr<StaticResource> _static_resource;
|
std::shared_ptr<StaticResource> _static_resource;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include "dynamic_schedulable.hh"
|
#include "dynamic_schedulable.hh"
|
||||||
|
|
||||||
#include <sgpemv2/templates/down_cast.tcc>
|
#include <sgpemv2/templates/down_cast.tcc>
|
||||||
#include <sgpemv2/templates/smartp.tcc>
|
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include <sgpemv2/request.hh>
|
#include <sgpemv2/request.hh>
|
||||||
#include <sgpemv2/serialize_visitor.hh>
|
#include <sgpemv2/serialize_visitor.hh>
|
||||||
#include <sgpemv2/templates/down_cast.tcc>
|
#include <sgpemv2/templates/down_cast.tcc>
|
||||||
#include <sgpemv2/templates/smartp.tcc>
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
@ -36,8 +35,8 @@ DynamicSubRequest::DynamicSubRequest(StaticSubRequest* core,
|
||||||
_static_subrequest(core), _owner(owner),
|
_static_subrequest(core), _owner(owner),
|
||||||
_queue_position(-1), _ran_for(0), _state(Request::state_future)
|
_queue_position(-1), _ran_for(0), _state(Request::state_future)
|
||||||
{
|
{
|
||||||
assert(core != NULL);
|
assert(core != nullptr);
|
||||||
assert(owner != NULL);
|
assert(owner != nullptr);
|
||||||
|
|
||||||
// Leave this line: it helps us with a compiler warning if
|
// Leave this line: it helps us with a compiler warning if
|
||||||
// the get_dynamic* method signature changes:
|
// 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),
|
_queue_position(other._queue_position), _ran_for(other._ran_for),
|
||||||
_state(other._state)
|
_state(other._state)
|
||||||
{
|
{
|
||||||
assert(owner != NULL);
|
assert(owner != nullptr);
|
||||||
|
|
||||||
// Leave this line: it helps us with a compiler warning if
|
// Leave this line: it helps us with a compiler warning if
|
||||||
// the get_dynamic* method signature changes:
|
// the get_dynamic* method signature changes:
|
||||||
|
|
|
@ -35,7 +35,8 @@ namespace sgpem
|
||||||
|
|
||||||
#include <sgpemv2/request.hh>
|
#include <sgpemv2/request.hh>
|
||||||
#include <sgpemv2/sub_request.hh>
|
#include <sgpemv2/sub_request.hh>
|
||||||
#include <sgpemv2/templates/smartp.hh>
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace sgpem
|
namespace sgpem
|
||||||
{
|
{
|
||||||
|
@ -100,7 +101,7 @@ namespace sgpem
|
||||||
// Undefined
|
// Undefined
|
||||||
DynamicSubRequest(const DynamicSubRequest&);
|
DynamicSubRequest(const DynamicSubRequest&);
|
||||||
|
|
||||||
memory::smart_ptr<StaticSubRequest> _static_subrequest;
|
std::shared_ptr<StaticSubRequest> _static_subrequest;
|
||||||
DynamicRequest* _owner;
|
DynamicRequest* _owner;
|
||||||
int _queue_position;
|
int _queue_position;
|
||||||
unsigned int _ran_for;
|
unsigned int _ran_for;
|
||||||
|
|
|
@ -27,17 +27,14 @@
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include <sgpemv2/templates/deletor.tcc>
|
|
||||||
#include <sgpemv2/templates/smartp.tcc>
|
|
||||||
|
|
||||||
using namespace sgpem;
|
using namespace sgpem;
|
||||||
|
|
||||||
DynamicThread::DynamicThread(StaticThread* core, DynamicProcess* parent)
|
DynamicThread::DynamicThread(StaticThread* core, DynamicProcess* parent)
|
||||||
: DynamicSchedulable(), _core(core), _state(state_future), _parent(parent),
|
: DynamicSchedulable(), _core(core), _state(state_future), _parent(parent),
|
||||||
_ran_for(0), _last_acquisition(-1), _last_release(-1)
|
_ran_for(0), _last_acquisition(-1), _last_release(-1)
|
||||||
{
|
{
|
||||||
assert(core != NULL);
|
assert(core != nullptr);
|
||||||
assert(parent != NULL);
|
assert(parent != nullptr);
|
||||||
|
|
||||||
// Leave this line: it helps us with a compiler warning if
|
// Leave this line: it helps us with a compiler warning if
|
||||||
// the get_dynamic* method signature changes:
|
// the get_dynamic* method signature changes:
|
||||||
|
@ -51,9 +48,9 @@ DynamicThread::DynamicThread(const DynamicThread &other, DynamicProcess* parent)
|
||||||
_ran_for(other._ran_for), _last_acquisition(other._last_acquisition),
|
_ran_for(other._ran_for), _last_acquisition(other._last_acquisition),
|
||||||
_last_release(other._last_release)
|
_last_release(other._last_release)
|
||||||
{
|
{
|
||||||
typedef std::vector<DynamicRequest*>::const_iterator ReqIt;
|
typedef std::vector<DynamicRequest*>::const_iterator ReqIt;
|
||||||
|
|
||||||
assert(parent != NULL);
|
assert(parent != nullptr);
|
||||||
|
|
||||||
const std::vector<DynamicRequest*>& other_req = other._dynamic_requests;
|
const std::vector<DynamicRequest*>& other_req = other._dynamic_requests;
|
||||||
|
|
||||||
|
@ -69,7 +66,7 @@ DynamicThread::DynamicThread(const DynamicThread &other, DynamicProcess* parent)
|
||||||
DynamicThread::~DynamicThread()
|
DynamicThread::~DynamicThread()
|
||||||
{
|
{
|
||||||
for_each(_dynamic_requests.begin(), _dynamic_requests.end(),
|
for_each(_dynamic_requests.begin(), _dynamic_requests.end(),
|
||||||
memory::deletor<DynamicRequest>());
|
[] (auto *p) { delete p; });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,7 +94,7 @@ DynamicThread::set_state(state new_state)
|
||||||
std::vector<Request*>
|
std::vector<Request*>
|
||||||
DynamicThread::get_requests()
|
DynamicThread::get_requests()
|
||||||
{
|
{
|
||||||
return std::vector<Request*>(_dynamic_requests.begin(), _dynamic_requests.end());
|
return std::vector<Request*>(_dynamic_requests.begin(), _dynamic_requests.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "dynamic_process.hh"
|
#include "dynamic_process.hh"
|
||||||
#include "dynamic_schedulable.hh"
|
#include "dynamic_schedulable.hh"
|
||||||
|
|
||||||
#include <sgpemv2/templates/smartp.hh>
|
#include <memory>
|
||||||
|
|
||||||
namespace sgpem
|
namespace sgpem
|
||||||
{
|
{
|
||||||
|
@ -177,7 +177,7 @@ namespace sgpem
|
||||||
/**
|
/**
|
||||||
\brief Pointer to static counterpart of this object.
|
\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.
|
\brief The current state of this thread.
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
// along with SGPEMv2. If not, see http://www.gnu.org/licenses/.
|
// along with SGPEMv2. If not, see http://www.gnu.org/licenses/.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
|
|
||||||
#include <glib/gstdio.h>
|
#include <glib/gstdio.h>
|
||||||
#include <glibmm/miscutils.h>
|
#include <glibmm/miscutils.h>
|
||||||
|
|
||||||
|
#include <sgpemv2/config.h>
|
||||||
#include <sgpemv2/global_preferences.hh>
|
#include <sgpemv2/global_preferences.hh>
|
||||||
#include <sgpemv2/key_file.hh>
|
#include <sgpemv2/key_file.hh>
|
||||||
#include <sgpemv2/string_utils.hh>
|
#include <sgpemv2/string_utils.hh>
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
using namespace sgpem;
|
using namespace sgpem;
|
||||||
|
|
||||||
// Explicit template instantiation to allow to export symbols from the DSO.
|
// Explicit template instantiation to allow to export symbols from the DSO.
|
||||||
template class Singleton<GlobalPreferences>;
|
template class sgpem::Singleton<GlobalPreferences>;
|
||||||
|
|
||||||
GlobalPreferences::GlobalPreferences()
|
GlobalPreferences::GlobalPreferences()
|
||||||
: _mod_dirs(1, PLUGDIR), _pol_dirs(1, POLDIR), _speed(1000)
|
: _mod_dirs(1, PLUGDIR), _pol_dirs(1, POLDIR), _speed(1000)
|
||||||
|
@ -48,7 +48,7 @@ GlobalPreferences::GlobalPreferences()
|
||||||
|
|
||||||
|
|
||||||
Glib::ustring
|
Glib::ustring
|
||||||
GlobalPreferences::get_preferences_dir() const throw(Glib::FileError)
|
GlobalPreferences::get_preferences_dir() const
|
||||||
{
|
{
|
||||||
using namespace Glib;
|
using namespace Glib;
|
||||||
// windows-specific part, i don't use ifdef WIN32 since I'm not sure how
|
// 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,
|
if(SUCCEEDED(SHGetFolderPath(NULL,
|
||||||
CSIDL_APPDATA,
|
CSIDL_APPDATA,
|
||||||
NULL,
|
nullptr,
|
||||||
SHGFP_TYPE_CURRENT,
|
SHGFP_TYPE_CURRENT,
|
||||||
raw_path)))
|
raw_path)))
|
||||||
{
|
{
|
||||||
|
@ -73,23 +73,23 @@ GlobalPreferences::get_preferences_dir() const throw(Glib::FileError)
|
||||||
|
|
||||||
// Create "Application Data\sgpemv2". if not present,
|
// Create "Application Data\sgpemv2". if not present,
|
||||||
// otherwise it is a no-op
|
// 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
|
// if UNICODE, we need to convert to utf-8
|
||||||
// I'm not sure if this part is OK, anyway...
|
// I'm not sure if this part is OK, anyway...
|
||||||
# ifdef UNICODE
|
# ifdef UNICODE
|
||||||
char raw_path_utf[MAX_PATH];
|
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);
|
return Glib::ustring(raw_path_utf);
|
||||||
# else
|
# else
|
||||||
// no UNICODE, simply return plain string
|
// no UNICODE, simply return plain string
|
||||||
return path;
|
return path;
|
||||||
# endif //~UNICODE
|
# endif //~UNICODE
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw FileError(FileError::FAILED, _("Unable to obtain Application Data directory"));
|
throw FileError(FileError::FAILED, _("Unable to obtain Application Data directory"));
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ GlobalPreferences::get_preferences_dir() const throw(Glib::FileError)
|
||||||
|
|
||||||
|
|
||||||
Glib::ustring
|
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");
|
const Glib::ustring filename = get_preferences_dir() + G_DIR_SEPARATOR_S + Glib::ustring("sgpemrc");
|
||||||
return filename;
|
return filename;
|
||||||
|
@ -180,7 +180,7 @@ GlobalPreferences::get_request_color(Request::state st) const
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GlobalPreferences::write_configrc() throw(Glib::FileError)
|
GlobalPreferences::write_configrc()
|
||||||
{
|
{
|
||||||
KeyFile kf;
|
KeyFile kf;
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ GlobalPreferences::write_configrc() throw(Glib::FileError)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GlobalPreferences::load_configrc() throw(Glib::FileError)
|
GlobalPreferences::load_configrc()
|
||||||
{
|
{
|
||||||
KeyFile kf;
|
KeyFile kf;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
using namespace sgpem;
|
using namespace sgpem;
|
||||||
|
|
||||||
Module::Module(const Glib::ustring& identifier) throw(InvalidPluginException) :
|
Module::Module(const Glib::ustring& identifier) :
|
||||||
Glib::Module(identifier),
|
Glib::Module(identifier),
|
||||||
_enabled(false),
|
_enabled(false),
|
||||||
_id(identifier),
|
_id(identifier),
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include <sgpemv2/module.hh>
|
#include <sgpemv2/module.hh>
|
||||||
#include <sgpemv2/global_preferences.hh>
|
#include <sgpemv2/global_preferences.hh>
|
||||||
|
|
||||||
#include <sgpemv2/templates/deletor.tcc>
|
|
||||||
#include <sgpemv2/templates/singleton.tcc>
|
#include <sgpemv2/templates/singleton.tcc>
|
||||||
|
|
||||||
#include <glibmm/fileutils.h>
|
#include <glibmm/fileutils.h>
|
||||||
|
@ -35,7 +34,7 @@
|
||||||
|
|
||||||
using namespace sgpem;
|
using namespace sgpem;
|
||||||
|
|
||||||
template class Singleton<PluginManager>;
|
template class sgpem::Singleton<PluginManager>;
|
||||||
|
|
||||||
|
|
||||||
std::vector<Module*>
|
std::vector<Module*>
|
||||||
|
@ -47,10 +46,10 @@ PluginManager::get_module_list() const
|
||||||
void
|
void
|
||||||
PluginManager::rescan_dirs()
|
PluginManager::rescan_dirs()
|
||||||
{
|
{
|
||||||
Module* module = NULL;
|
Module* module = nullptr;
|
||||||
|
|
||||||
for_each(_modules.begin(), _modules.end(),
|
for_each(_modules.begin(), _modules.end(),
|
||||||
memory::deletor<Module>());
|
[] (auto *p) { delete p; });
|
||||||
_modules.clear();
|
_modules.clear();
|
||||||
|
|
||||||
GlobalPreferences& prefs = GlobalPreferences::get_instance();
|
GlobalPreferences& prefs = GlobalPreferences::get_instance();
|
||||||
|
@ -79,7 +78,7 @@ PluginManager::rescan_dirs()
|
||||||
_modules.push_back(module);
|
_modules.push_back(module);
|
||||||
std::cerr << "\tSuccess" << std::endl;
|
std::cerr << "\tSuccess" << std::endl;
|
||||||
}
|
}
|
||||||
catch (InvalidPluginException e)
|
catch (InvalidPluginException& e)
|
||||||
{
|
{
|
||||||
std::cerr << "\tFailed, invalid plugin: " << e.what() << std::endl;
|
std::cerr << "\tFailed, invalid plugin: " << e.what() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -214,7 +214,7 @@ PolicyParameters::set_string(ustring name, const ustring& value)
|
||||||
\throws A PolicyParametersException if the parameter has not been found.
|
\throws A PolicyParametersException if the parameter has not been found.
|
||||||
*/
|
*/
|
||||||
int
|
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);
|
map<ustring, Parameter<int> >::const_iterator i = int_map.find(name);
|
||||||
if (i == int_map.end())
|
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.
|
\throws A PolicyParametersException if the parameter has not been found.
|
||||||
*/
|
*/
|
||||||
float
|
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);
|
map<ustring, Parameter<float> >::const_iterator i = float_map.find(name);
|
||||||
if (i == float_map.end())
|
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.
|
\throws A PolicyParametersException if the parameter has not been found.
|
||||||
*/
|
*/
|
||||||
ustring
|
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);
|
map<ustring, Parameter<ustring> >::const_iterator i = string_map.find(name);
|
||||||
if (i == string_map.end())
|
if (i == string_map.end())
|
||||||
|
|
|
@ -25,7 +25,7 @@ using sgpem::Thread;
|
||||||
|
|
||||||
void
|
void
|
||||||
ReadyQueue::swap(position a, position b)
|
ReadyQueue::swap(position a, position b)
|
||||||
throw (std::out_of_range)
|
|
||||||
{
|
{
|
||||||
if (a == b) return;
|
if (a == b) return;
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ ReadyQueue::size() const
|
||||||
|
|
||||||
sgpem::Thread&
|
sgpem::Thread&
|
||||||
ReadyQueue::get_item_at(position index)
|
ReadyQueue::get_item_at(position index)
|
||||||
throw (std::out_of_range)
|
|
||||||
{
|
{
|
||||||
// Checks index access
|
// Checks index access
|
||||||
return *_scheds.at(index);
|
return *_scheds.at(index);
|
||||||
|
@ -57,7 +57,7 @@ ReadyQueue::get_item_at(position index)
|
||||||
|
|
||||||
const sgpem::Thread&
|
const sgpem::Thread&
|
||||||
ReadyQueue::get_item_at(position index) const
|
ReadyQueue::get_item_at(position index) const
|
||||||
throw (std::out_of_range)
|
|
||||||
{
|
{
|
||||||
// Checks index access
|
// Checks index access
|
||||||
return *_scheds.at(index);
|
return *_scheds.at(index);
|
||||||
|
@ -72,7 +72,7 @@ ReadyQueue::append(Thread& thread)
|
||||||
|
|
||||||
void
|
void
|
||||||
ReadyQueue::bubble_to_front(position x)
|
ReadyQueue::bubble_to_front(position x)
|
||||||
throw(std::out_of_range)
|
|
||||||
{
|
{
|
||||||
while(x > 0)
|
while(x > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,7 @@ using std::runtime_error;
|
||||||
using namespace sgpem;
|
using namespace sgpem;
|
||||||
|
|
||||||
// Explicit template instantiation to allow to export symbols from the DSO.
|
// 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 vector<ResourcePolicyManager*>::iterator ManagerIterator;
|
||||||
typedef map<History*, ResourcePolicy*>::iterator PolicyIterator;
|
typedef map<History*, ResourcePolicy*>::iterator PolicyIterator;
|
||||||
|
@ -54,7 +54,7 @@ ResourcePoliciesGatekeeper::get_registered() const
|
||||||
void
|
void
|
||||||
ResourcePoliciesGatekeeper::register_manager(ResourcePolicyManager* manager)
|
ResourcePoliciesGatekeeper::register_manager(ResourcePolicyManager* manager)
|
||||||
{
|
{
|
||||||
assert(manager != NULL);
|
assert(manager != nullptr);
|
||||||
|
|
||||||
ManagerIterator end = _registered.end();
|
ManagerIterator end = _registered.end();
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ ResourcePoliciesGatekeeper::register_manager(ResourcePolicyManager* manager)
|
||||||
void
|
void
|
||||||
ResourcePoliciesGatekeeper::unregister_manager(ResourcePolicyManager* manager)
|
ResourcePoliciesGatekeeper::unregister_manager(ResourcePolicyManager* manager)
|
||||||
{
|
{
|
||||||
assert(manager != NULL);
|
assert(manager != nullptr);
|
||||||
|
|
||||||
ManagerIterator end = _registered.end();
|
ManagerIterator end = _registered.end();
|
||||||
ManagerIterator pos = find(_registered.begin(), end, manager);
|
ManagerIterator pos = find(_registered.begin(), end, manager);
|
||||||
|
@ -78,9 +78,9 @@ ResourcePoliciesGatekeeper::unregister_manager(ResourcePolicyManager* manager)
|
||||||
}
|
}
|
||||||
|
|
||||||
ResourcePolicy&
|
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);
|
PolicyIterator policy = _active_policies.find(history);
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ ResourcePoliciesGatekeeper::get_current_policy(History* history) throw(runtime_e
|
||||||
void
|
void
|
||||||
ResourcePoliciesGatekeeper::activate_policy(History *history, ResourcePolicy* policy)
|
ResourcePoliciesGatekeeper::activate_policy(History *history, ResourcePolicy* policy)
|
||||||
{
|
{
|
||||||
assert(history != NULL && policy != NULL);
|
assert(history != nullptr && policy != nullptr);
|
||||||
|
|
||||||
_active_policies[history] = policy;
|
_active_policies[history] = policy;
|
||||||
// the content of history (if any) is not vaild any more.
|
// the content of history (if any) is not vaild any more.
|
||||||
|
@ -116,7 +116,7 @@ ResourcePoliciesGatekeeper::deactivate_policies(const ResourcePolicyManager& man
|
||||||
for (PolicyIterator it = _active_policies.begin(); it != _active_policies.end();)
|
for (PolicyIterator it = _active_policies.begin(); it != _active_policies.end();)
|
||||||
if (it->second == *avail_it)
|
if (it->second == *avail_it)
|
||||||
// Please note the postfix increment (operating
|
// Please note the postfix increment (operating
|
||||||
// on the old iterator, now invalidated by erase)
|
// on the old iterator, now invalidated by erase)
|
||||||
_active_policies.erase(it++);
|
_active_policies.erase(it++);
|
||||||
else
|
else
|
||||||
++it;
|
++it;
|
||||||
|
|
|
@ -30,13 +30,13 @@ ResourcePolicyFiFo::~ResourcePolicyFiFo()
|
||||||
|
|
||||||
void
|
void
|
||||||
ResourcePolicyFiFo::configure()
|
ResourcePolicyFiFo::configure()
|
||||||
throw(UserInterruptException)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ResourcePolicyFiFo::enforce(Environment& /*environment*/, Environment::SubRequestQueue& queue, SubRequest& sr)
|
ResourcePolicyFiFo::enforce(Environment& /*environment*/, Environment::SubRequestQueue& queue, SubRequest& sr)
|
||||||
throw(UserInterruptException)
|
|
||||||
{
|
{
|
||||||
typedef Environment::SubRequestQueue SubRequestQueue;
|
typedef Environment::SubRequestQueue SubRequestQueue;
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace sgpem
|
||||||
Because it's a pure virtual method, must be re-implemented
|
Because it's a pure virtual method, must be re-implemented
|
||||||
in concrete derived classes.
|
in concrete derived classes.
|
||||||
*/
|
*/
|
||||||
virtual void configure() throw(UserInterruptException);
|
virtual void configure();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Mixes the queues.
|
Mixes the queues.
|
||||||
|
@ -55,7 +55,7 @@ namespace sgpem
|
||||||
Because it's a pure virtual method, must be re-implemented
|
Because it's a pure virtual method, must be re-implemented
|
||||||
in concrete derived classes.
|
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.
|
Gets a string description of the policy.
|
||||||
|
|
|
@ -29,13 +29,13 @@ ResourcePolicyLiFo::~ResourcePolicyLiFo()
|
||||||
|
|
||||||
void
|
void
|
||||||
ResourcePolicyLiFo::configure()
|
ResourcePolicyLiFo::configure()
|
||||||
throw(UserInterruptException)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ResourcePolicyLiFo::enforce(Environment& /*environment*/, Environment::SubRequestQueue& queue, SubRequest& sr)
|
ResourcePolicyLiFo::enforce(Environment& /*environment*/, Environment::SubRequestQueue& queue, SubRequest& sr)
|
||||||
throw(UserInterruptException)
|
|
||||||
{
|
{
|
||||||
typedef Environment::SubRequestQueue SubRequestQueue;
|
typedef Environment::SubRequestQueue SubRequestQueue;
|
||||||
|
|
||||||
|
|
|
@ -47,14 +47,14 @@ namespace sgpem
|
||||||
* Because it's a pure virtual method, must be re-implemented
|
* Because it's a pure virtual method, must be re-implemented
|
||||||
* in concrete derived classes.
|
* in concrete derived classes.
|
||||||
*/
|
*/
|
||||||
virtual void configure() throw(UserInterruptException);
|
virtual void configure();
|
||||||
|
|
||||||
/** \brief Mixes the queues.
|
/** \brief Mixes the queues.
|
||||||
*
|
*
|
||||||
* Because it's a pure virtual method, must be re-implemented
|
* Because it's a pure virtual method, must be re-implemented
|
||||||
* in concrete derived classes.
|
* 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.
|
/** \brief Gets a string description of the policy.
|
||||||
*
|
*
|
||||||
|
|
|
@ -31,13 +31,13 @@ ResourcePolicyPriority::~ResourcePolicyPriority()
|
||||||
|
|
||||||
void
|
void
|
||||||
ResourcePolicyPriority::configure()
|
ResourcePolicyPriority::configure()
|
||||||
throw(UserInterruptException)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ResourcePolicyPriority::enforce(Environment& /*environment*/, Environment::SubRequestQueue& queue, SubRequest& sr)
|
ResourcePolicyPriority::enforce(Environment& /*environment*/, Environment::SubRequestQueue& queue, SubRequest& sr)
|
||||||
throw(UserInterruptException)
|
|
||||||
{
|
{
|
||||||
typedef Environment::SubRequestQueue SubRequestQueue;
|
typedef Environment::SubRequestQueue SubRequestQueue;
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace sgpem
|
||||||
/// \brief Initializes the inner components of the policy.
|
/// \brief Initializes the inner components of the policy.
|
||||||
///
|
///
|
||||||
/// Does nothing.
|
/// Does nothing.
|
||||||
virtual void configure() throw(UserInterruptException);
|
virtual void configure();
|
||||||
|
|
||||||
/// \brief Sorts the subrequest queue letting higher priority threads to be the first ones
|
/// \brief Sorts the subrequest queue letting higher priority threads to be the first ones
|
||||||
/// to get the resources.
|
/// to get the resources.
|
||||||
|
@ -63,7 +63,7 @@ namespace sgpem
|
||||||
/// \param environment the environment on which the policy applies.
|
/// \param environment the environment on which the policy applies.
|
||||||
/// \param queue the queue where a subrequest has just been added.
|
/// \param queue the queue where a subrequest has just been added.
|
||||||
/// \param sr the subrequest which 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.
|
/// \brief Returns a description of the policy.
|
||||||
///
|
///
|
||||||
|
|
|
@ -30,13 +30,13 @@ ResourcePolicyPriorityInheritance::~ResourcePolicyPriorityInheritance()
|
||||||
|
|
||||||
void
|
void
|
||||||
ResourcePolicyPriorityInheritance::configure()
|
ResourcePolicyPriorityInheritance::configure()
|
||||||
throw(UserInterruptException)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ResourcePolicyPriorityInheritance::enforce(Environment& /*environment*/, Environment::SubRequestQueue& queue, SubRequest& sr)
|
ResourcePolicyPriorityInheritance::enforce(Environment& /*environment*/, Environment::SubRequestQueue& queue, SubRequest& sr)
|
||||||
throw(UserInterruptException)
|
|
||||||
{
|
{
|
||||||
typedef Environment::SubRequestQueue SubRequestQueue;
|
typedef Environment::SubRequestQueue SubRequestQueue;
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace sgpem
|
||||||
Because it's a pure virtual method, must be re-implemented
|
Because it's a pure virtual method, must be re-implemented
|
||||||
in concrete derived classes.
|
in concrete derived classes.
|
||||||
*/
|
*/
|
||||||
virtual void configure() throw(UserInterruptException);
|
virtual void configure();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Mixes the queues.
|
\brief Mixes the queues.
|
||||||
|
@ -59,7 +59,7 @@ namespace sgpem
|
||||||
*/
|
*/
|
||||||
virtual void enforce(Environment& environment,
|
virtual void enforce(Environment& environment,
|
||||||
Environment::SubRequestQueue& queue,
|
Environment::SubRequestQueue& queue,
|
||||||
SubRequest& sr) throw(UserInterruptException);
|
SubRequest& sr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Gets a string description of the policy.
|
\brief Gets a string description of the policy.
|
||||||
|
|
|
@ -49,7 +49,7 @@ using namespace std;
|
||||||
using namespace sgpem;
|
using namespace sgpem;
|
||||||
|
|
||||||
// Explicit template instantiation to allow to export symbols from the DSO.
|
// 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;
|
typedef std::vector<DynamicProcess*> Processes;
|
||||||
|
@ -78,7 +78,7 @@ static void determine_subr_allocable_status(const Resource& res, const SubReques
|
||||||
bool
|
bool
|
||||||
is_running(const Thread* running_thread)
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ terminate_all_requests_of(DynamicThread& thread,
|
||||||
// For the current thread, see if there are requests that are exhausted
|
// For the current thread, see if there are requests that are exhausted
|
||||||
void
|
void
|
||||||
update_allocated_requests(DynamicThread& running_thread,
|
update_allocated_requests(DynamicThread& running_thread,
|
||||||
ConcreteEnvironment& environment)
|
ConcreteEnvironment& environment)
|
||||||
{
|
{
|
||||||
// Go for all dynamic requests of this thread
|
// Go for all dynamic requests of this thread
|
||||||
Requests& reqs = running_thread.get_dynamic_requests();
|
Requests& reqs = running_thread.get_dynamic_requests();
|
||||||
|
@ -193,7 +193,7 @@ raise_new_requests(DynamicThread& running_thread, ConcreteEnvironment& environme
|
||||||
/// TODO: right here, right now we should call the resource policy to
|
/// TODO: right here, right now we should call the resource policy to
|
||||||
/// update the queue. Updates the state of the subrequest depending
|
/// update the queue. Updates the state of the subrequest depending
|
||||||
/// on the position in the queue, as explained before.
|
/// on the position in the queue, as explained before.
|
||||||
resource_policy.enforce(environment, queue, cur_subr);
|
resource_policy.enforce(environment, queue, cur_subr);
|
||||||
|
|
||||||
// Get the number of places for the corresponding resource
|
// Get the number of places for the corresponding resource
|
||||||
Resource& resource = *environment.get_resources().find(rkey)->second;
|
Resource& resource = *environment.get_resources().find(rkey)->second;
|
||||||
|
@ -215,12 +215,12 @@ raise_new_requests(DynamicThread& running_thread, ConcreteEnvironment& environme
|
||||||
|
|
||||||
// A request may be ALLOCATED only when it is ALLOCABLE, i.e. when all its subrequests
|
// A request may be ALLOCATED only when it is ALLOCABLE, i.e. when all its subrequests
|
||||||
// are ALLOCABLE. A request is allocated when all its subrequests are either TERMINATED
|
// are ALLOCABLE. A request is allocated when all its subrequests are either TERMINATED
|
||||||
// or ALLOCATED, but at least one is ALLOCATED.
|
// or ALLOCATED, but at least one is ALLOCATED.
|
||||||
// Now, since the thread is willing to run, we must allocate the request if possible.
|
// Now, since the thread is willing to run, we must allocate the request if possible.
|
||||||
|
|
||||||
// All requests we treat are at the moment non-preemptable, so it is not permitted to temporarily
|
// All requests we treat are at the moment non-preemptable, so it is not permitted to temporarily
|
||||||
// preempt a resource to a thread to free a place and potentially allow one other thread
|
// preempt a resource to a thread to free a place and potentially allow one other thread
|
||||||
// to use that place. This is why we need to allocate requests (which means allocating
|
// to use that place. This is why we need to allocate requests (which means allocating
|
||||||
// resources to threads).
|
// resources to threads).
|
||||||
|
|
||||||
// If it is actually allocable, allocate it
|
// If it is actually allocable, allocate it
|
||||||
|
@ -380,7 +380,7 @@ Scheduler::get_policy()
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy& resource_policy)
|
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
|
// 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
|
// store a readyqueue and policy pointer for the user-policy to retrieve, to when
|
||||||
|
@ -396,17 +396,17 @@ Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy&
|
||||||
ConcreteHistory& concrete_history = static_cast<ConcreteHistory&>(history);
|
ConcreteHistory& concrete_history = static_cast<ConcreteHistory&>(history);
|
||||||
|
|
||||||
// Use an auto_ptr since we've some exceptions in the coming...
|
// 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;
|
Threads all_threads;
|
||||||
DynamicThread* running_thread = NULL;
|
DynamicThread* running_thread = nullptr;
|
||||||
|
|
||||||
collect_threads(new_snapshot->get_processes(), all_threads);
|
collect_threads(new_snapshot->get_processes(), all_threads);
|
||||||
|
|
||||||
// The first thing we've to do is to update the state of the old
|
// The first thing we've to do is to update the state of the old
|
||||||
// running thread, if there's one.
|
// running thread, if there's one.
|
||||||
for (Iseq<Threads::iterator> it = iseq(all_threads); it; ++it)
|
for (Iseq<Threads::iterator> it = iseq(all_threads); it; ++it)
|
||||||
{
|
{
|
||||||
DynamicThread& current = **it;
|
DynamicThread& current = **it;
|
||||||
|
|
||||||
// Save the current running thread for future usage, if it hasn't ended
|
// Save the current running thread for future usage, if it hasn't ended
|
||||||
|
@ -431,7 +431,7 @@ Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy&
|
||||||
current.set_state(Schedulable::state_terminated);
|
current.set_state(Schedulable::state_terminated);
|
||||||
current.set_last_release(current_instant);
|
current.set_last_release(current_instant);
|
||||||
terminate_all_requests_of(current, *new_snapshot);
|
terminate_all_requests_of(current, *new_snapshot);
|
||||||
running_thread = NULL;
|
running_thread = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we found the running thread, there isn't another one,
|
// if we found the running thread, there isn't another one,
|
||||||
|
@ -442,10 +442,10 @@ Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy&
|
||||||
} //~ for over all threads
|
} //~ for over all threads
|
||||||
|
|
||||||
|
|
||||||
// When a new instant cames, we could have to update the state of future
|
// When a new instant cames, we could have to update the state of future
|
||||||
// threads to make them ready. We also keep a count of alive threads
|
// threads to make them ready. We also keep a count of alive threads
|
||||||
for (Iseq<Threads::iterator> it = iseq(all_threads); it; ++it)
|
for (Iseq<Threads::iterator> it = iseq(all_threads); it; ++it)
|
||||||
{
|
{
|
||||||
DynamicThread& current = **it;
|
DynamicThread& current = **it;
|
||||||
|
|
||||||
// 1. mark future threads as ready, if appropriate
|
// 1. mark future threads as ready, if appropriate
|
||||||
|
@ -533,7 +533,7 @@ Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy&
|
||||||
{
|
{
|
||||||
running_thread->set_last_release(current_instant);
|
running_thread->set_last_release(current_instant);
|
||||||
_ready_queue->erase_first();
|
_ready_queue->erase_first();
|
||||||
running_thread = NULL;
|
running_thread = nullptr;
|
||||||
alive_threads--;
|
alive_threads--;
|
||||||
// Proceed to select a new running thread, below
|
// Proceed to select a new running thread, below
|
||||||
}
|
}
|
||||||
|
@ -587,7 +587,7 @@ Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy&
|
||||||
// new runner.
|
// new runner.
|
||||||
if(&new_running != running_thread)
|
if(&new_running != running_thread)
|
||||||
{
|
{
|
||||||
if(running_thread != NULL)
|
if(running_thread != nullptr)
|
||||||
{
|
{
|
||||||
running_thread->set_state(Schedulable::state_ready);
|
running_thread->set_state(Schedulable::state_ready);
|
||||||
running_thread->set_last_release(current_instant);
|
running_thread->set_last_release(current_instant);
|
||||||
|
@ -600,8 +600,8 @@ Scheduler::step_forward(History& history, CPUPolicy& cpu_policy, ResourcePolicy&
|
||||||
catch (const CPUPolicyException& e)
|
catch (const CPUPolicyException& e)
|
||||||
{
|
{
|
||||||
// Reset values that the policy doesn't need anymore
|
// Reset values that the policy doesn't need anymore
|
||||||
_policy = NULL;
|
_policy = nullptr;
|
||||||
_ready_queue = NULL;
|
_ready_queue = nullptr;
|
||||||
|
|
||||||
// Do we need to update/reset something else?
|
// Do we need to update/reset something else?
|
||||||
|
|
||||||
|
@ -618,8 +618,8 @@ final_cleanup:
|
||||||
concrete_history.append_new_environment(new_snapshot.release());
|
concrete_history.append_new_environment(new_snapshot.release());
|
||||||
|
|
||||||
// Reset values that the policy doesn't need anymore
|
// Reset values that the policy doesn't need anymore
|
||||||
_policy = NULL;
|
_policy = nullptr;
|
||||||
_ready_queue = NULL;
|
_ready_queue = nullptr;
|
||||||
|
|
||||||
// If we got there, a step has been performed.
|
// If we got there, a step has been performed.
|
||||||
// Return if we can perform another step.
|
// Return if we can perform another step.
|
||||||
|
|
|
@ -35,7 +35,7 @@ using std::runtime_error;
|
||||||
using namespace sgpem;
|
using namespace sgpem;
|
||||||
|
|
||||||
// Explicit template instantiation to allow to export symbols from the DSO.
|
// 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;
|
typedef vector<Serializer*>::iterator SerializerIterator;
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ SerializersGatekeeper::get_registered() const
|
||||||
void
|
void
|
||||||
SerializersGatekeeper::register_serializer(Serializer* serializer)
|
SerializersGatekeeper::register_serializer(Serializer* serializer)
|
||||||
{
|
{
|
||||||
assert(serializer != NULL);
|
assert(serializer != nullptr);
|
||||||
|
|
||||||
SerializerIterator end = _registered.end();
|
SerializerIterator end = _registered.end();
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ SerializersGatekeeper::register_serializer(Serializer* serializer)
|
||||||
void
|
void
|
||||||
SerializersGatekeeper::unregister_serializer(Serializer* serializer)
|
SerializersGatekeeper::unregister_serializer(Serializer* serializer)
|
||||||
{
|
{
|
||||||
assert(serializer != NULL);
|
assert(serializer != nullptr);
|
||||||
|
|
||||||
SerializerIterator end = _registered.end();
|
SerializerIterator end = _registered.end();
|
||||||
SerializerIterator pos = find(_registered.begin(), end, serializer);
|
SerializerIterator pos = find(_registered.begin(), end, serializer);
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#define PACKAGE "@PROJECT_NAME@"
|
||||||
|
|
||||||
|
#define LOCALEDIR "@localedir@"
|
||||||
|
#define UIDIR "@uidir@"
|
||||||
|
#define POLDIR "@policiesdir@"
|
||||||
|
#define PLUGDIR "@plugindir@"
|
||||||
|
|
|
@ -80,13 +80,13 @@ namespace sgpem
|
||||||
* If no policy was previously activated for the attached
|
* If no policy was previously activated for the attached
|
||||||
* ::History, throw an appropriate exception.
|
* ::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.
|
/** \brief Associates a policy with history.
|
||||||
* If an exception is thrown, the current associated *policy with this 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
|
* (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:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace sgpem
|
||||||
Because it's a pure virtual method, must be re-implemented
|
Because it's a pure virtual method, must be re-implemented
|
||||||
in concrete derived classes.
|
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
|
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
|
Because it's a pure virtual method, must be re-implemented
|
||||||
in concrete derived classes.
|
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.
|
Gets a string description of the policy.
|
||||||
|
@ -82,7 +82,7 @@ namespace sgpem
|
||||||
in concrete derived classes.
|
in concrete derived classes.
|
||||||
\return True if this policy is preemptible.
|
\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.
|
Gets the time quantum for the policy.
|
||||||
|
@ -91,9 +91,9 @@ namespace sgpem
|
||||||
in concrete derived classes.
|
in concrete derived classes.
|
||||||
\return Time quantum for the policy.
|
\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;
|
virtual void deactivate() = 0;
|
||||||
|
|
||||||
|
@ -105,12 +105,12 @@ namespace sgpem
|
||||||
PolicyParameters& get_parameters();
|
PolicyParameters& get_parameters();
|
||||||
|
|
||||||
/** This method is used only as a callback by scripting languages */
|
/** 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:
|
protected:
|
||||||
PolicyParameters _parameters;
|
PolicyParameters _parameters;
|
||||||
|
|
||||||
static void set_callback_policy(CPUPolicy* ptr = NULL);
|
static void set_callback_policy(CPUPolicy* ptr = nullptr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Used by callback_get_policy:
|
// Used by callback_get_policy:
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace sgpem
|
||||||
/**
|
/**
|
||||||
\return GlobalPreferences configuration filename
|
\return GlobalPreferences configuration filename
|
||||||
*/
|
*/
|
||||||
Glib::ustring get_config_filename() const throw(Glib::FileError);
|
Glib::ustring get_config_filename() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Returns configured Policy directories
|
\brief Returns configured Policy directories
|
||||||
|
@ -110,7 +110,7 @@ namespace sgpem
|
||||||
We advice using a key=value text format.
|
We advice using a key=value text format.
|
||||||
#- Close the configuration file.
|
#- Close the configuration file.
|
||||||
*/
|
*/
|
||||||
void write_configrc() throw(Glib::FileError);
|
void write_configrc();
|
||||||
/**
|
/**
|
||||||
\brief Load global preferences from disk
|
\brief Load global preferences from disk
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ namespace sgpem
|
||||||
|
|
||||||
\throw std::io_error
|
\throw std::io_error
|
||||||
*/
|
*/
|
||||||
void load_configrc() throw(Glib::FileError);
|
void load_configrc();
|
||||||
|
|
||||||
/** \brief Prepare directory to read/write preferences to disk
|
/** \brief Prepare directory to read/write preferences to disk
|
||||||
*
|
*
|
||||||
|
@ -128,7 +128,7 @@ namespace sgpem
|
||||||
* %ApplicationData%/sgpemv2, on *nix systems $HOME/.sgpemv2.
|
* %ApplicationData%/sgpemv2, on *nix systems $HOME/.sgpemv2.
|
||||||
* If it doesn't exist, attempt to create it.
|
* 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:
|
private:
|
||||||
GlobalPreferences();
|
GlobalPreferences();
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace sgpem
|
||||||
|
|
||||||
virtual size_t get_size() const = 0;
|
virtual size_t get_size() const = 0;
|
||||||
virtual const Environment& get_last_environment() 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.
|
\brief Removes a Resource from the whole History.
|
||||||
|
@ -299,7 +299,7 @@ namespace sgpem
|
||||||
*/
|
*/
|
||||||
void notify_change();
|
void notify_change();
|
||||||
|
|
||||||
position _front;
|
position _front;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** \brief Enable/disable notifications to registered observers
|
/** \brief Enable/disable notifications to registered observers
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace sgpem
|
||||||
/// doesn't export a valid SGPEMv2 backend::Plugin interface.
|
/// doesn't export a valid SGPEMv2 backend::Plugin interface.
|
||||||
/// \param identifier A string with the DSO name without any file-extension
|
/// \param identifier A string with the DSO name without any file-extension
|
||||||
/// suffix. This is retrieved by PluginManager::rescan_dirs().
|
/// 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
|
/// \brief Enables or disables a plugin
|
||||||
///
|
///
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
// It could be necessary to do dynamic type-checking when
|
// It could be necessary to do dynamic type-checking when
|
||||||
// catching it (with typeinfo).
|
// catching it (with typeinfo).
|
||||||
|
|
||||||
#ifndef NULL_POLICY_EXCEPTION
|
#ifndef nullptr_POLICY_EXCEPTION
|
||||||
#define NULL_POLICY_EXCEPTION 1
|
#define nullptr_POLICY_EXCEPTION 1
|
||||||
|
|
||||||
#include <sgpemv2/sgpemv2-visibility.hh>
|
#include <sgpemv2/sgpemv2-visibility.hh>
|
||||||
|
|
||||||
|
|
|
@ -230,19 +230,19 @@ namespace sgpem
|
||||||
\returns the INTEGER value of the parameter named \e name
|
\returns the INTEGER value of the parameter named \e name
|
||||||
\throws PolicyParametersException if the parameter named \e name has not been registered
|
\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
|
/** \brief Returns the value of an FLOAT parameter
|
||||||
\returns the FLOAT value of the parameter named \e name
|
\returns the FLOAT value of the parameter named \e name
|
||||||
\throws PolicyParametersException if the parameter named \e name has not been registered
|
\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
|
/** \brief Returns the value of an STRING parameter
|
||||||
\returns the STRING value of the parameter named \e name
|
\returns the STRING value of the parameter named \e name
|
||||||
\throws PolicyParametersException if the parameter named \e name has not been registered
|
\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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace sgpem
|
||||||
* \param a first object position
|
* \param a first object position
|
||||||
* \param b second 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.
|
* \brief Return the size of the queue.
|
||||||
|
@ -60,7 +60,7 @@ namespace sgpem
|
||||||
* \return The item at positon \a index.
|
* \return The item at positon \a index.
|
||||||
* \throw std::out_of_range if position is < 1 or > size()-1.
|
* \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.
|
* \return A constant reference to the item at positon \a index.
|
||||||
* \throw std::out_of_range if position is < 1 or > size()-1
|
* \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.
|
* \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
|
* \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.
|
* \brief Remove the first item from the threads vector.
|
||||||
|
|
|
@ -83,7 +83,7 @@ namespace sgpem
|
||||||
*
|
*
|
||||||
* \return The current policy.
|
* \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.
|
\brief Given a policy, sets it as the history current one.
|
||||||
Also deactivates the old policy if present, and then activates
|
Also deactivates the old policy if present, and then activates
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace sgpem
|
||||||
///
|
///
|
||||||
/// Because it's a pure virtual method, must be re-implemented
|
/// Because it's a pure virtual method, must be re-implemented
|
||||||
/// in concrete derived classes.
|
/// in concrete derived classes.
|
||||||
virtual void configure() throw(UserInterruptException) = 0;
|
virtual void configure() = 0;
|
||||||
|
|
||||||
/// \brief Sorts the subrequest queue.
|
/// \brief Sorts the subrequest queue.
|
||||||
///
|
///
|
||||||
|
@ -67,7 +67,7 @@ namespace sgpem
|
||||||
/// \param environment the environment on which the policy applies.
|
/// \param environment the environment on which the policy applies.
|
||||||
/// \param queue the queue where a subrequest has just been added.
|
/// \param queue the queue where a subrequest has just been added.
|
||||||
/// \param sr the subrequest which 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.
|
/// \brief Returns a description of the policy.
|
||||||
///
|
///
|
||||||
|
|
|
@ -68,14 +68,14 @@ namespace sgpem
|
||||||
|
|
||||||
\return false If the simulation has ended, true otherwise
|
\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.
|
\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
|
\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.
|
by step_forward(). Else, a nullptr pointer will be returned.
|
||||||
\return A pointer to the active policy, or NULL if not inside step_forward()
|
\return A pointer to the active policy, or nullptr if not inside step_forward()
|
||||||
*/
|
*/
|
||||||
CPUPolicy* get_policy();
|
CPUPolicy* get_policy();
|
||||||
|
|
||||||
|
@ -84,8 +84,8 @@ namespace sgpem
|
||||||
schedulable objects (for the policy to sort it).
|
schedulable objects (for the policy to sort it).
|
||||||
|
|
||||||
\warning This is a callback method: it can only be used in methods of CPUPolicy called
|
\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.
|
by step_forward(). Else, a nullptr pointer will be returned.
|
||||||
\return A pointer to the queue, or NULL if not inside step_forward()
|
\return A pointer to the queue, or nullptr if not inside step_forward()
|
||||||
*/
|
*/
|
||||||
ReadyQueue* get_ready_queue();
|
ReadyQueue* get_ready_queue();
|
||||||
|
|
||||||
|
|
|
@ -56,45 +56,45 @@ namespace sgpem
|
||||||
/**
|
/**
|
||||||
\brief Add output to the serializer taking data from history
|
\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
|
\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
|
\brief Add output to the serializer taking data from resource
|
||||||
BUG: a resource must be saved with her own associated key.
|
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
|
\brief Add output to the serializer taking data from resource and key
|
||||||
BUG FIXED: This save a resource with her own associated 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
|
\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
|
\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
|
\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
|
\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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,8 @@ namespace sgpem
|
||||||
Serializer();
|
Serializer();
|
||||||
virtual ~Serializer() = 0;
|
virtual ~Serializer() = 0;
|
||||||
|
|
||||||
virtual void save_snapshot(const Glib::ustring& filename, const 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) throw(SerializerError) = 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_extension() = 0;
|
||||||
virtual const Glib::ustring get_filename_description() = 0;
|
virtual const Glib::ustring get_filename_description() = 0;
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -49,12 +49,12 @@ namespace sgpem
|
||||||
std::vector<Serializer*> get_registered() const;
|
std::vector<Serializer*> get_registered() const;
|
||||||
|
|
||||||
/** \brief Registers a serializer
|
/** \brief Registers a serializer
|
||||||
* \param serializer The serializer, cannot be NULL
|
* \param serializer The serializer, cannot be nullptr
|
||||||
*/
|
*/
|
||||||
void register_serializer(Serializer* serializer);
|
void register_serializer(Serializer* serializer);
|
||||||
|
|
||||||
/** \brief Unregisters a 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.
|
* wasn't previously registered, this method is a no-op.
|
||||||
*/
|
*/
|
||||||
void unregister_serializer(Serializer* serializer);
|
void unregister_serializer(Serializer* serializer);
|
||||||
|
|
|
@ -91,7 +91,7 @@ namespace sgpem
|
||||||
Advances the simulation by one or more steps, depending on the
|
Advances the simulation by one or more steps, depending on the
|
||||||
actual state and on the value set with set_mode().
|
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.
|
\brief Pauses a running simulation.
|
||||||
|
@ -117,7 +117,7 @@ namespace sgpem
|
||||||
|
|
||||||
Pauses the simulation and jumps to the specified instant
|
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.
|
\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.
|
\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
Loading…
Reference in New Issue