Browse Source

Formula to string added

Former-commit-id: 53eb9bb5b4
tempestpy_adaptions
sjunges 9 years ago
parent
commit
8fd0ee2ecd
  1. 7
      src/logic/Formula.cpp
  2. 1
      src/logic/Formula.h

7
src/logic/Formula.cpp

@ -1,4 +1,5 @@
#include "src/logic/Formulas.h"
#include <sstream>
namespace storm {
namespace logic {
@ -404,6 +405,12 @@ namespace storm {
return;
}
std::string Formula::toString() const {
std::stringstream str2;
writeToStream(str2);
return str2.str();
}
std::ostream& operator<<(std::ostream& out, Formula const& formula) {
return formula.writeToStream(out);
}

1
src/logic/Formula.h

@ -174,6 +174,7 @@ namespace storm {
std::shared_ptr<Formula const> asSharedPointer();
std::shared_ptr<Formula const> asSharedPointer() const;
std::string toString() const;
virtual std::ostream& writeToStream(std::ostream& out) const = 0;
virtual void gatherAtomicExpressionFormulas(std::vector<std::shared_ptr<AtomicExpressionFormula const>>& atomicExpressionFormulas) const;

Loading…
Cancel
Save