GraphTool  1.0
Tool for analyzing and graphically visualizing code dependencies for Ericsson.
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
graph_extractor.h
1 #ifndef GRAPH_EXTRACTOR_H_
2 #define GRAPH_EXTRACTOR_H_
3 
4 #include <vector>
5 #include <utility> // pair
6 
7 #include "AdjacencyList.h"
8 
9 namespace Layout {
10 
11  const int UNUSED_TREENODE_ID = -1;
12 
18  struct tree_node {
19  unsigned int id;
20 
21  tree_node* parent;
22  std::vector<tree_node*> children;
23  unsigned int num_tree_nodes;
24 
25  int x;
26  int y;
27 
28 
29  tree_node() {
30  id = UNUSED_TREENODE_ID;
31  }
32 
33  };
34 
40  AdjacencyList* make_undirected(AdjacencyList& g);
41 
48  std::vector<tree_node*>* make_trees(AdjacencyList& g);
49 
58  std::vector<tree_node*>* make_trees(AdjacencyList& g, unsigned int start);
59 
66  tree_node* make_tree(AdjacencyList& g, unsigned int start);
67 
75  void get_positions(tree_node* tn, std::vector<std::pair<int, int> >& pos);
76 
83  void move_positions(tree_node* tn, int x_offset, int y_offset);
84 
89  void del_tree(tree_node* tn);
90 }
91 
92 #endif
Definition: AdjacencyList.h:9
Definition: graph_extractor.h:18