GraphTool  1.0
Tool for analyzing and graphically visualizing code dependencies for Ericsson.
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
module_graph_model.h
1 #ifndef MODULE_GRAPH_MODEL_H_
2 #define MODULE_GRAPH_MODEL_H_
3 
4 // Includes
5 #include "linkler.h"
6 #include "module.h"
7 #include "graph_model.h"
8 #include "dependency.h" // Dependency
9 #include <QDebug>
10 #include <queue>
11 
12 #include "algorithms.h"
13 
14 // Forward declarations
16 
21 class ModuleGraphModel : public GraphModel {
22  public:
23  typedef Module NodeType;
26 
27  ModuleGraphModel(GraphType* g, QObject* parent = 0);
29 
31  void buildTree(NodeType* root, GraphFilterList<GraphType>* filter = 0);
32 
34  void buildGraph(GraphFilterList<GraphType>* filter = 0);
35 
37  GraphType* grapher();
38 
39  private:
40  GraphType* g_;
41 
46  ModuleGraphModelItem* add_node(NodeType* item, ModuleGraphModelItem* parent = 0, EdgeType* incoming_edge = 0, bool add_existing = true);
47 
49  void add_node(std::pair<GraphType::index_type_t,
51 
53  void add_edge(std::pair<std::pair<GraphType::index_type_t,
56 
57 };
58 
59 #endif
Definition: graph_model.h:36
QModelIndex parent(const QModelIndex &index) const
Provides the parent for a given index.
Definition: graph_model.cc:44
Forward declarations for functors.
Definition: defines.h:32
Definition: module_graph_model.h:21
void buildTree(NodeType *root, GraphFilterList< GraphType > *filter=0)
Methods to build an internal data model in the form of a tree.
Definition: module_graph_model.cc:24
A class representing a single Module in the QT graph model. This reimplements.
Definition: module_graph_model_item.h:13
Definition: graph_filter_list.h:16
Definition: module.h:21
GraphType * grapher()
Access the internal grapher object.
Definition: module_graph_model.cc:87
E_type edge_value_type
Accessor for the type of value stored in the edges.
Definition: grapher.h:58
Definition: grapher.h:30
void buildGraph(GraphFilterList< GraphType > *filter=0)
Methods to build an internal data model in the form of an adjacency list.
Definition: module_graph_model.cc:98
V_type node_value_type
Accessor for the type of value stored in the nodes.
Definition: grapher.h:55
unsigned int index_type_t
The type of index used for the nodes in the graph.
Definition: grapher.h:52