diff --git a/src/settings/modules/JaniExportSettings.cpp b/src/settings/modules/JaniExportSettings.cpp new file mode 100644 index 000000000..faa68b0b0 --- /dev/null +++ b/src/settings/modules/JaniExportSettings.cpp @@ -0,0 +1,42 @@ +#include "JaniExportSettings.h" + +#include "src/settings/SettingsManager.h" +#include "src/settings/SettingMemento.h" +#include "src/settings/Option.h" +#include "src/settings/OptionBuilder.h" +#include "src/settings/ArgumentBuilder.h" +#include "src/settings/Argument.h" + +#include "src/exceptions/InvalidSettingsException.h" + +namespace storm { + namespace settings { + namespace modules { + const std::string JaniExportSettings::moduleName = "exportJani"; + + const std::string JaniExportSettings::janiFileOptionName = "jani-output"; + const std::string JaniExportSettings::janiFileOptionShortName = "output"; + + + JaniExportSettings::JaniExportSettings() : ModuleSettings(moduleName) { + this->addOption(storm::settings::OptionBuilder(moduleName, janiFileOptionName, false, "Destination for the jani model.").setShortName(janiFileOptionShortName).addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "path to file").build()).build()); + } + + bool JaniExportSettings::isJaniFileSet() const { + return this->getOption(janiFileOptionName).getHasOptionBeenSet(); + } + + std::string JaniExportSettings::getJaniFilename() const { + return this->getOption(janiFileOptionName).getArgumentByName("filename").getValueAsString(); + } + + void JaniExportSettings::finalize() { + + } + + bool JaniExportSettings::check() const { + return true; + } + } + } +} \ No newline at end of file diff --git a/src/settings/modules/JaniExportSettings.h b/src/settings/modules/JaniExportSettings.h new file mode 100644 index 000000000..dc356189a --- /dev/null +++ b/src/settings/modules/JaniExportSettings.h @@ -0,0 +1,38 @@ +#pragma once + +#include "storm-config.h" +#include "src/settings/modules/ModuleSettings.h" + + +namespace storm { + namespace settings { + namespace modules { + class JaniExportSettings : public ModuleSettings { + public: + /*! + * Creates a new JaniExport setting + */ + JaniExportSettings(); + + /** + * Retrievew whether the pgcl file option was set + */ + bool isJaniFileSet() const; + + /** + * Retrieves the pgcl file name + */ + std::string getJaniFilename() const; + + bool check() const override; + void finalize() override; + + static const std::string moduleName; + + private: + static const std::string janiFileOptionName; + static const std::string janiFileOptionShortName; + }; + } + } +} \ No newline at end of file