From 82f5b05e90f55817479327a4c2b611b974141066 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Mon, 5 Nov 2018 15:22:58 +0100 Subject: [PATCH] edge to string method (simplifies some other code fragments), and write color to the string --- src/storm/storage/jani/Edge.cpp | 9 +++++++++ src/storm/storage/jani/Edge.h | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/storm/storage/jani/Edge.cpp b/src/storm/storage/jani/Edge.cpp index 3ec065cf0..55f21e027 100644 --- a/src/storm/storage/jani/Edge.cpp +++ b/src/storm/storage/jani/Edge.cpp @@ -151,6 +151,12 @@ namespace storm { destinations = newdestinations; } + std::string Edge::toString() const { + std::stringstream ss; + ss << *this; + return ss.str(); + } + std::shared_ptr const& Edge::getTemplateEdge() { return templateEdge; } @@ -181,6 +187,9 @@ namespace storm { } stream << "]"; } + if (edge.getColor() != 0) { + stream << " color: " << edge.getColor(); + } return stream; } } diff --git a/src/storm/storage/jani/Edge.h b/src/storm/storage/jani/Edge.h index 35864b85b..e45bf7f93 100644 --- a/src/storm/storage/jani/Edge.h +++ b/src/storm/storage/jani/Edge.h @@ -141,7 +141,8 @@ namespace storm { * If no assignment exists, this value is always zero */ int64_t const& getHighestAssignmentLevel() const; - + + std::string toString() const; void assertValid() const;