26 string pathstr = node->
path();
27 replace(pathstr.begin(), pathstr.end(),
'\\',
'/');
28 printf(
"\"%p\" [label=\"%s\"]\n", node, pathstr.c_str());
47 printf(
"\"%p\" -> \"%p\" [label=\" %s\"]\n",
50 printf(
"\"%p\" [label=\"%s\", shape=ellipse]\n",
52 for (vector<Node*>::iterator out = edge->
outputs_.begin();
53 out != edge->
outputs_.end(); ++out) {
54 printf(
"\"%p\" -> \"%p\"\n", edge, *out);
56 for (vector<Node*>::iterator in = edge->
inputs_.begin();
57 in != edge->
inputs_.end(); ++in) {
58 const char* order_only =
"";
60 order_only =
" style=dotted";
61 printf(
"\"%p\" -> \"%p\" [arrowhead=none%s]\n", (*in), edge, order_only);
65 for (vector<Node*>::iterator in = edge->
inputs_.begin();
66 in != edge->
inputs_.end(); ++in) {
72 printf(
"digraph ninja {\n");
73 printf(
"rankdir=\"LR\"\n");
74 printf(
"node [fontsize=10, shape=box, height=0.25]\n");
75 printf(
"edge [fontsize=10]\n");
const string & path() const
std::set< Node * > visited_nodes_
Information about a node in the dependency graph: the file, whether it's dirty, mtime, etc.
An edge in the dependency graph; links between Nodes using Rules.
bool is_order_only(size_t index)
std::set< Edge * > visited_edges_
const string & name() const
void AddTarget(Node *node)
vector< Node * > outputs_