8 #include <common/include/ProfilingGuid.hpp>
18 std::string Indent(
int numSpaces)
21 for (
int i = 0; i < numSpaces; i++)
28 std::string Escape(std::string s)
45 GetStream() <<
" POINT-SIZE=" <<
"\"" << fontSize <<
"\"";
48 if (color && std::strlen(color) != 0)
50 GetStream() <<
" COLOR=\"" << color <<
"\" ";
53 if (face && std::strlen(face) != 0)
55 GetStream() <<
" FACE=\"" << face <<
"\" ";
63 :
HtmlFont(stream, -1, nullptr, nullptr)
81 for (
auto&& attrib : m_Attributes)
98 ss << name <<
"=" << value.str();
99 m_Attributes.push_back(ss.str());
105 std::stringstream ss;
106 ss << name <<
"=" << value;
107 m_Attributes.push_back(ss.str());
113 std::stringstream ss;
114 ss << name <<
"=\"" << value <<
"\"";
115 m_Attributes.push_back(ss.str());
122 std::stringstream ss;
123 ss << Indent(4) << fromNodeId <<
" -> " << toNodeId <<
" ";
126 m_Attributes = std::make_unique<DotAttributeSet>(stream);
131 m_Attributes.reset(
nullptr);
149 m_Contents.push_back(content);
155 std::stringstream ss;
156 ss <<
"label=\"{" << m_Name;
157 if (!m_Contents.empty())
161 for (
auto & content : m_Contents)
163 ss << Escape(content);
174 catch (
const std::exception&) { }
182 std::stringstream ss;
183 ss << Indent(4) << nodeId;
187 m_Contents = std::make_unique<NodeContent>(stream);
188 m_Attributes = std::make_unique<DotAttributeSet>(stream);
190 if (std::strlen(label) != 0)
192 m_Contents->SetName(label);
196 m_Contents->SetName(
"<noname>");
202 m_Contents.reset(
nullptr);
203 m_Attributes.reset(
nullptr);
211 std::stringstream ss;
212 ss << Indent(4) << type;
215 m_Attributes = std::make_unique<DotAttributeSet>(stream);
220 m_Attributes.reset(
nullptr);
227 GetStream() <<
"digraph " << name <<
" {" << std::endl;