31 #ifndef INCLUDE_GRAPHS_GRAPHPRINTER_H_
32 #define INCLUDE_GRAPHS_GRAPHPRINTER_H_
34 #include <system_error>
55 template<
class GraphType>
57 const std::string &GraphName,
const GraphType >,
bool simple =
false)
61 std::ofstream outFile(Filename);
64 O <<
" error opening file for writing!\n";
69 O <<
"Writing '" << Filename <<
"'...";
78 template<
class GraphType>
85 typedef typename GTraits::NodeRef NodeRef;
86 typedef typename GTraits::nodes_iterator node_iterator;
87 typedef typename GTraits::ChildIteratorType child_iterator;
89 O <<
"Printing VFG Graph" <<
"'...\n";
91 node_iterator I = GTraits::nodes_begin(GT);
92 node_iterator E = GTraits::nodes_end(GT);
96 O <<
"node :" << Node <<
"'\n";
97 child_iterator EI = GTraits::child_begin(Node);
98 child_iterator EE = GTraits::child_end(Node);
99 for (
unsigned i = 0; EI != EE && i != 64; ++EI, ++i)
101 O <<
"child :" << *EI <<
"'\n";
static void WriteGraphToFile(SVF::OutStream &O, const std::string &GraphName, const GraphType >, bool simple=false)
static void PrintGraph(SVF::OutStream &O, const std::string &GraphName, const GraphType >)
std::ofstream & WriteGraph(std::ofstream &O, const GraphType &G, bool ShortNames=false)