mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Update graph.cpp
Removed graph image writing code as part of issue #90 work.
This commit is contained in:
@@ -60,29 +60,6 @@ namespace boss {
|
||||
return false;
|
||||
}
|
||||
|
||||
void SaveGraph(const PluginGraph& graph, const boost::filesystem::path outpath) {
|
||||
//First need to extract vertex names, since their stored as private members otherwise.
|
||||
vector<string> names;
|
||||
vertex_it vit, vit_end;
|
||||
boost::tie(vit, vit_end) = boost::vertices(graph);
|
||||
|
||||
for (vit, vit_end; vit != vit_end; ++vit) {
|
||||
names.push_back(graph[*vit].Name());
|
||||
}
|
||||
|
||||
//Also, writing the graph requires an index map, which std::list-based VertexList graphs don't have, so one needs to be built separately.
|
||||
|
||||
map<vertex_t, string> index_map;
|
||||
boost::associative_property_map< map<vertex_t, string> > v_index_map(index_map);
|
||||
BGL_FORALL_VERTICES(v, graph, PluginGraph)
|
||||
put(v_index_map, v, graph[v].Name());
|
||||
|
||||
//Now write graph to file.
|
||||
boss::ofstream out(outpath);
|
||||
boost::write_graphviz(out, graph, boost::default_writer(), boost::default_writer(), boost::default_writer(), v_index_map);
|
||||
out.close();
|
||||
}
|
||||
|
||||
void Sort(const PluginGraph& graph, std::list<Plugin>& plugins) {
|
||||
|
||||
//Topological sort requires an index map, which std::list-based VertexList graphs don't have, so one needs to be built separately.
|
||||
|
||||
Reference in New Issue
Block a user