(self)
| 144 | |
| 145 | |
| 146 | def dump(self) : |
| 147 | output = StringIO() |
| 148 | |
| 149 | for n in self._nodes : |
| 150 | output.write(self._dot_node(n)) |
| 151 | output.write(u'\n') |
| 152 | |
| 153 | for r in self._relations : |
| 154 | output.write(self._dot_relation(r)) |
| 155 | output.write(u'\n') |
| 156 | |
| 157 | if len(self._families) > 1 : |
| 158 | for f in self._families : |
| 159 | output.write(self._dot_sub_graph(f)) |
| 160 | |
| 161 | template = u''' |
| 162 | digraph %s |
| 163 | { |
| 164 | \trankdir = "LR"; |
| 165 | \tranksep = 0.5; |
| 166 | \tlabel = "%s"; |
| 167 | \tlabelloc = "t"; |
| 168 | \tfontsize = "24"; |
| 169 | \tfontname = "SimHei"; |
| 170 | |
| 171 | \tgraph [style="filled", color="lightgrey"]; |
| 172 | \tnode [fontname="SimSun"]; |
| 173 | \tedge [fontname="SimSun"]; |
| 174 | |
| 175 | %s |
| 176 | } |
| 177 | ''' |
| 178 | return template % (self._name, self._name, output.getvalue()) |
| 179 | |
| 180 | |
| 181 | def _node_color(self, node) : |
no test coverage detected