Browse Source

added possibility to check all available jani properties

main
TimQu 7 years ago
parent
commit
35aa166f5b
  1. 14
      src/storm-cli-utilities/model-handling.h
  2. 6
      src/storm/settings/modules/IOSettings.cpp
  3. 8
      src/storm/settings/modules/IOSettings.h

14
src/storm-cli-utilities/model-handling.h

@ -67,10 +67,16 @@ namespace storm {
auto const& janiPropertyInput = janiInput.second;
if (ioSettings.isJaniPropertiesSet()) {
for (auto const& propName : ioSettings.getJaniProperties()) {
auto propertyIt = janiPropertyInput.find(propName);
STORM_LOG_THROW(propertyIt != janiPropertyInput.end(), storm::exceptions::InvalidArgumentException, "No JANI property with name '" << propName << "' is known.");
input.properties.emplace_back(propertyIt->second);
if (ioSettings.areJaniPropertiesSelected()) {
for (auto const& propName : ioSettings.getSelectedJaniProperties()) {
auto propertyIt = janiPropertyInput.find(propName);
STORM_LOG_THROW(propertyIt != janiPropertyInput.end(), storm::exceptions::InvalidArgumentException, "No JANI property with name '" << propName << "' is known.");
input.properties.emplace_back(propertyIt->second);
}
} else {
for (auto const& property : janiPropertyInput) {
input.properties.emplace_back(property.second);
}
}
}
}

6
src/storm/settings/modules/IOSettings.cpp

@ -207,7 +207,11 @@ namespace storm {
return this->getOption(janiPropertyOptionName).getHasOptionBeenSet();
}
std::vector<std::string> IOSettings::getJaniProperties() const {
bool IOSettings::areJaniPropertiesSelected() const {
return this->getOption(janiPropertyOptionName).getHasOptionBeenSet() && (this->getOption(janiPropertyOptionName).getArgumentByName("values").getValueAsString() != "");
}
std::vector<std::string> IOSettings::getSelectedJaniProperties() const {
return storm::parser::parseCommaSeperatedValues(this->getOption(janiPropertyOptionName).getArgumentByName("values").getValueAsString());
}

8
src/storm/settings/modules/IOSettings.h

@ -233,10 +233,16 @@ namespace storm {
*/
bool isJaniPropertiesSet() const;
/*!
* Retrieves whether one or more jani-properties have been selected
* @return
*/
bool areJaniPropertiesSelected() const;
/*!
* @return The names of the jani properties to check
*/
std::vector<std::string> getJaniProperties() const;
std::vector<std::string> getSelectedJaniProperties() const;
/*!
* Retrieves whether the property option was set.

Loading…
Cancel
Save