Browse Source

JaniExportSettings

Former-commit-id: d375a92788 [formerly 9bd2c0efa8]
Former-commit-id: f4e93f61dd
tempestpy_adaptions
sjunges 8 years ago
parent
commit
6f0a26e593
  1. 42
      src/settings/modules/JaniExportSettings.cpp
  2. 38
      src/settings/modules/JaniExportSettings.h

42
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;
}
}
}
}

38
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;
};
}
}
}
Loading…
Cancel
Save