diff --git a/src/settings/SettingsManager.cpp b/src/settings/SettingsManager.cpp index 97209c43d..bb1883209 100644 --- a/src/settings/SettingsManager.cpp +++ b/src/settings/SettingsManager.cpp @@ -488,5 +488,24 @@ namespace storm { return dynamic_cast(mutableManager().getModule(storm::settings::modules::GeneralSettings::moduleName)); } + void initializeAll(std::string const& name, std::string const& executableName) { + storm::settings::mutableManager().setName(name, executableName); + + // Register all known settings modules. + storm::settings::addModule(); + storm::settings::addModule(); + storm::settings::addModule(); + storm::settings::addModule(); + storm::settings::addModule(); + storm::settings::addModule(); + storm::settings::addModule(); + storm::settings::addModule(); + storm::settings::addModule(); + storm::settings::addModule(); + storm::settings::addModule(); + storm::settings::addModule(); + storm::settings::addModule(); + } + } } \ No newline at end of file diff --git a/src/settings/SettingsManager.h b/src/settings/SettingsManager.h index 5fe7c82dc..69d91899f 100644 --- a/src/settings/SettingsManager.h +++ b/src/settings/SettingsManager.h @@ -102,6 +102,7 @@ namespace storm { * @return The only existing instance of a settings manager */ static SettingsManager& manager(); + /*! * Sets the name of the tool. * @param name Name of the tool. @@ -257,6 +258,13 @@ namespace storm { mutableManager().addModule(std::unique_ptr(new SettingsType())); } + /*! + * Initialize the settings manager with all available modules. + * @param name Name of the tool. + * @param executableName Filename of the executable. + */ + void initializeAll(std::string const& name, std::string const& executableName); + /*! * Get module. The type of the module is given as a template argument. * diff --git a/src/storm.cpp b/src/storm.cpp index b665d48a6..464dda56f 100644 --- a/src/storm.cpp +++ b/src/storm.cpp @@ -4,44 +4,7 @@ #include "src/cli/cli.h" #include "src/utility/initialize.h" -#include "src/settings/modules/GeneralSettings.h" -#include "src/settings/modules/DebugSettings.h" -#include "src/settings/modules/CounterexampleGeneratorSettings.h" -#include "src/settings/modules/CuddSettings.h" -#include "src/settings/modules/SylvanSettings.h" -#include "src/settings/modules/GmmxxEquationSolverSettings.h" -#include "src/settings/modules/NativeEquationSolverSettings.h" -#include "src/settings/modules/BisimulationSettings.h" -#include "src/settings/modules/GlpkSettings.h" -#include "src/settings/modules/GurobiSettings.h" -#include "src/settings/modules/TopologicalValueIterationEquationSolverSettings.h" -#include "src/settings/modules/ParametricSettings.h" -#include "src/settings/modules/SparseDtmcEliminationModelCheckerSettings.h" - - -/*! - * Initialize the settings manager. - */ -void initializeSettings() { - storm::settings::mutableManager().setName("SToRM", "storm"); - - // Register all known settings modules. - storm::settings::addModule(); - storm::settings::addModule(); - storm::settings::addModule(); - storm::settings::addModule(); - storm::settings::addModule(); - storm::settings::addModule(); - storm::settings::addModule(); - storm::settings::addModule(); - storm::settings::addModule(); - storm::settings::addModule(); - storm::settings::addModule(); - storm::settings::addModule(); - storm::settings::addModule(); -} - - +#include "src/settings/SettingsManager.h" /*! * Main entry point of the executable storm. @@ -51,7 +14,7 @@ int main(const int argc, const char** argv) { try { storm::utility::setUp(); storm::cli::printHeader("SToRM", argc, argv); - initializeSettings(); + storm::settings::initializeAll("SToRM", "storm"); bool optionsCorrect = storm::cli::parseOptions(argc, argv); if (!optionsCorrect) { return -1; diff --git a/test/functional/storm-functional-tests.cpp b/test/functional/storm-functional-tests.cpp index e206561e0..47c802bfc 100644 --- a/test/functional/storm-functional-tests.cpp +++ b/test/functional/storm-functional-tests.cpp @@ -38,6 +38,7 @@ void setUpLogging() { int main(int argc, char* argv[]) { setUpLogging(); + storm::settings::initializeAll("StoRM (Functional) Testing Suite", "storm-functional-tests"); std::cout << "StoRM (Functional) Testing Suite" << std::endl; testing::InitGoogleTest(&argc, argv); diff --git a/test/performance/storm-performance-tests.cpp b/test/performance/storm-performance-tests.cpp index 3291d6823..36414410b 100644 --- a/test/performance/storm-performance-tests.cpp +++ b/test/performance/storm-performance-tests.cpp @@ -36,6 +36,7 @@ void setUpLogging() { int main(int argc, char* argv[]) { setUpLogging(); + storm::settings::initializeAll("StoRM (Performance) Testing Suite", "storm-performance-tests"); std::cout << "StoRM (Performance) Testing Suite" << std::endl; testing::InitGoogleTest(&argc, argv);