Browse Source

added toString method for ShieldExpression

tempestpy_adaptions
Stefan Pranger 4 years ago
parent
commit
283f4ea6a2
  1. 6
      src/storm/logic/ShieldExpression.cpp
  2. 2
      src/storm/logic/ShieldExpression.h

6
src/storm/logic/ShieldExpression.cpp

@ -45,8 +45,12 @@ namespace storm {
}
}
std::string ShieldExpression::toString() const {
return "<" + typeToString() + ", " + comparisonToString() + "=" + std::to_string(value) + ">";
}
std::ostream& operator<<(std::ostream& out, ShieldExpression const& shieldExpression) {
out << "<" << shieldExpression.typeToString() << ", " << shieldExpression.comparisonToString() << "=" << std::to_string(shieldExpression.value) << ">";
out << shieldExpression.toString();
return out;
}
}

2
src/storm/logic/ShieldExpression.h

@ -28,7 +28,7 @@ namespace storm {
std::string typeToString() const;
std::string comparisonToString() const;
std::string toString() const;
friend std::ostream& operator<<(std::ostream& stream, ShieldExpression const& shieldExpression);
private:

Loading…
Cancel
Save