Browse Source

Added to_string for ModelType

Former-commit-id: e1cf746727 [formerly 912ca0f4f3]
Former-commit-id: 9ebb580890
tempestpy_adaptions
sjunges 8 years ago
parent
commit
a7ff22bd49
  1. 44
      src/storage/jani/ModelType.cpp
  2. 1
      src/storage/jani/ModelType.h

44
src/storage/jani/ModelType.cpp

@ -4,48 +4,38 @@ namespace storm {
namespace jani {
std::ostream& operator<<(std::ostream& stream, ModelType const& type) {
return stream << to_string(type);
}
std::string to_string(ModelType const& type) {
switch (type) {
case ModelType::UNDEFINED:
stream << "undefined";
break;
return "undefined";
case ModelType::LTS:
stream << "lts";
break;
return "lts";
case ModelType::DTMC:
stream << "dtmc";
break;
return "dtmc";
case ModelType::CTMC:
stream << "ctmc";
break;
return "ctmc";
case ModelType::MDP:
stream << "mdp";
break;
return "mdp";
case ModelType::CTMDP:
stream << "ctmdp";
break;
return "ctmdp";
case ModelType::MA:
stream << "ma";
break;
return "ma";
case ModelType::TA:
stream << "ta";
break;
return "ta";
case ModelType::PTA:
stream << "pta";
break;
return "pta";
case ModelType::STA:
stream << "sta";
break;
return "sta";
case ModelType::HA:
stream << "ha";
break;
return "ha";
case ModelType::PHA:
stream << "pha";
break;
return "pha";
case ModelType::SHA:
stream << "sha";
break;
return "sha";
}
return stream;
}
ModelType getModelType(std::string const& input) {

1
src/storage/jani/ModelType.h

@ -10,6 +10,7 @@ namespace storm {
HA = 10, PHA = 11, SHA = 12};
ModelType getModelType(std::string const& input);
std::string to_string(ModelType const& type);
std::ostream& operator<<(std::ostream& stream, ModelType const& type);
}
Loading…
Cancel
Save