17#include <boost/graph/adjacency_list.hpp>
18#include <boost/graph/copy.hpp>
23#ifndef BACKENDS_GRAPHS_GRAPH_VISITOR_H_
24#define BACKENDS_GRAPHS_GRAPH_VISITOR_H_
35 enum class PrevType { Control, Parser };
38 struct fullGraphOpts {
42 unsigned long node_i = 0;
43 unsigned cluster_i = 0;
47 struct edge_name_copier {
52 edge_name_copier(
const Graph &from, Graph &to) : from(from), to(to) {}
56 void operator()(Graph::edge_descriptor input, Graph::edge_descriptor output)
const {
57 auto label = boost::get(boost::edge_name, from, input);
59 boost::put(boost::edge_name, to, output, label);
71 const bool jsonOut,
const cstring &filename)
72 : graphsDir(graphsDir),
82 const char *
getType(
const VertexType &v_type);
101 void process(std::vector<Graph *> &controlGraphsArray, std::vector<Graph *> &parserGraphsArray);
116 void forLoopJson(std::vector<Graph *> &graphsArray, PrevType prev_type);
124 void forLoopFullGraph(std::vector<Graph *> &graphsArray, fullGraphOpts *opts,
132 const bool fullGraph;
Definition graph_visitor.h:32
Graph_visitor(const cstring &graphsDir, const bool graphs, const bool fullGraph, const bool jsonOut, const cstring &filename)
Definition graph_visitor.h:70
const char * getType(const VertexType &v_type)
Maps VertexType to string.
Definition graph_visitor.cpp:37
const char * getPrevType(const PrevType &prev_type)
Maps PrevType to string.
Definition graph_visitor.cpp:70
void writeGraphToFile(const Graph &g, const cstring &name)
Writes boost graph "g" in dot format to file given by "name".
Definition graph_visitor.cpp:25
void process(std::vector< Graph * > &controlGraphsArray, std::vector< Graph * > &parserGraphsArray)
main function
Definition graph_visitor.cpp:172
Definition controls.cpp:29