| 151 | } |
| 152 | |
| 153 | NodeContent::~NodeContent() |
| 154 | { |
| 155 | std::stringstream ss; |
| 156 | ss << "label=\"{" << m_Name; |
| 157 | if (!m_Contents.empty()) |
| 158 | { |
| 159 | ss << "|"; |
| 160 | } |
| 161 | for (auto & content : m_Contents) |
| 162 | { |
| 163 | ss << Escape(content); |
| 164 | ss << "\\l"; |
| 165 | } |
| 166 | ss << "}\""; |
| 167 | |
| 168 | std::string s; |
| 169 | try |
| 170 | { |
| 171 | // Coverity fix: std::stringstream::str() may throw an exception of type std::length_error. |
| 172 | s = ss.str(); |
| 173 | } |
| 174 | catch (const std::exception&) { } // Swallow any exception. |
| 175 | |
| 176 | GetStream() << s; |
| 177 | } |
| 178 | |
| 179 | DotNode::DotNode(std::ostream& stream, LayerGuid nodeId, const char* label) |
| 180 | : DotBase(stream) |