diff --git a/src/storage/jani/ModelType.cpp b/src/storage/jani/ModelType.cpp index c1cad45d2..460145340 100644 --- a/src/storage/jani/ModelType.cpp +++ b/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) { diff --git a/src/storage/jani/ModelType.h b/src/storage/jani/ModelType.h index 7bee93e8c..c8a906d6c 100644 --- a/src/storage/jani/ModelType.h +++ b/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); }