Browse Source
gspn export settings (currently only dot output) and better gspn to jani support
gspn export settings (currently only dot output) and better gspn to jani support
Former-commit-id:tempestpy_adaptions38f41a581f
[formerlye1909eca6d
] Former-commit-id:88b71b0f0a
sjunges
8 years ago
4 changed files with 99 additions and 11 deletions
-
43src/settings/modules/GSPNExportSettings.cpp
-
40src/settings/modules/GSPNExportSettings.h
-
4src/settings/modules/GSPNSettings.cpp
-
23src/storm-gspn.cpp
@ -0,0 +1,43 @@ |
|||||
|
#include "GSPNExportSettings.h"
|
||||
|
#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 GSPNExportSettings::moduleName = "exportGspn"; |
||||
|
|
||||
|
const std::string GSPNExportSettings::writeToDotOptionName = "gspn-dot-output"; |
||||
|
//const std::string GSPNExportSettings::janiFileOptionShortName = "dotoutput";
|
||||
|
|
||||
|
|
||||
|
GSPNExportSettings::GSPNExportSettings() : ModuleSettings(moduleName) { |
||||
|
this->addOption(storm::settings::OptionBuilder(moduleName, writeToDotOptionName, false, "Destination for the dot output.").addArgument(storm::settings::ArgumentBuilder::createStringArgument("filename", "path to file").build()).build()); |
||||
|
} |
||||
|
|
||||
|
bool GSPNExportSettings::isWriteToDotSet() const { |
||||
|
return this->getOption(writeToDotOptionName).getHasOptionBeenSet(); |
||||
|
} |
||||
|
|
||||
|
std::string GSPNExportSettings::getWriteToDotFilename() const { |
||||
|
return this->getOption(writeToDotOptionName).getArgumentByName("filename").getValueAsString(); |
||||
|
} |
||||
|
|
||||
|
void GSPNExportSettings::finalize() { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
bool GSPNExportSettings::check() const { |
||||
|
return true; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "storm-config.h" |
||||
|
#include "src/settings/modules/ModuleSettings.h" |
||||
|
|
||||
|
|
||||
|
namespace storm { |
||||
|
namespace settings { |
||||
|
namespace modules { |
||||
|
class GSPNExportSettings : public ModuleSettings { |
||||
|
public: |
||||
|
/*! |
||||
|
* Creates a new JaniExport setting |
||||
|
*/ |
||||
|
GSPNExportSettings(); |
||||
|
|
||||
|
/** |
||||
|
* Retrievew whether the pgcl file option was set |
||||
|
*/ |
||||
|
bool isWriteToDotSet() const; |
||||
|
|
||||
|
/** |
||||
|
* Retrieves the pgcl file name |
||||
|
*/ |
||||
|
std::string getWriteToDotFilename() const; |
||||
|
|
||||
|
|
||||
|
bool check() const override; |
||||
|
void finalize() override; |
||||
|
|
||||
|
static const std::string moduleName; |
||||
|
|
||||
|
private: |
||||
|
static const std::string writeToDotOptionName; |
||||
|
//static const std::string writeToDotOptionShortName; |
||||
|
|
||||
|
}; |
||||
|
} |
||||
|
} |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue