GraphTool  1.0
Tool for analyzing and graphically visualizing code dependencies for Ericsson.
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
module.h
1 
8 #ifndef GRAPHTOOL_MODULE_H_
9 #define GRAPHTOOL_MODULE_H_
10 
11 #include <set>
12 #include <string>
13 #include "dependency.h"
14 #include "defines.h"
15 #include "mem_type.h"
16 #include "swu.h"
17 
19 class SWU;
20 
21 class Module {
22 
23  public:
24 
26  Module(std::string name);
27 
29  ~Module();
30 
34 
39  std::string name() const;
40 
45  SWU* swu();
46 
51  ModDependencySet* dependencies();
52 
57  ModDependentSet* dependents();
58 
59  std::set<std::string>* files();
60 
67 
73  bool remove_dependency(Module* m);
74 
77 
80 
83 
87  void add_file(std::string file);
88 
92  void remove_file(std::string file);
93 
98  void set_swu(SWU* s);
99 
101  void set_type(GraphTool::MemType type);
102 
104  GraphTool::MemType type();
105 
106  protected:
110  //bool add_dependent(Module*, bool);
112 
116  bool remove_dependent(Module*);
117 
118  private:
120  std::string name_;
121 
123  GraphTool::MemType type_;
124 
126  int num_external_dependencies_;
127 
129  SWU* swu_;
130 
132  ModDependencySet dependencies_;
133 
135  ModDependentSet dependents_;
136 
138  std::set<std::string> files_;
139 
141  Module(Module& copy);
142 };
143 
144 #endif
bool has_external_dependents()
returns whether the number of external dependents is > 0 or not.
Definition: module.cc:55
ModDependencySet * dependencies()
Definition: module.cc:128
bool remove_dependency(Module *m)
Definition: module.cc:88
void remove_from_datastructure()
Definition: module.cc:21
Forward declarations for functors.
Definition: defines.h:32
~Module()
Destructor.
Definition: module.cc:14
ModDependentSet * dependents()
Definition: module.cc:132
void set_type(GraphTool::MemType type)
Set the memory type of this module.
Definition: module.cc:47
bool remove_external_dependent()
Removes one external dependent from this module.
Definition: module.cc:103
bool add_dependency(Dependency< Module, Module > *mod_dep)
Definition: module.cc:63
GraphTool::MemType type()
Getter for memory type of this module.
Definition: module.cc:51
Definition: module.h:21
void remove_file(std::string file)
Definition: module.cc:116
void add_external_dependent()
Adds an external dependency to this module. Is currently only a counter of how many external dependen...
Definition: module.cc:76
void set_swu(SWU *s)
Definition: module.cc:41
Definition: swu.h:27
std::string name() const
Definition: module.cc:120
bool remove_dependent(Module *)
Definition: module.cc:80
Module(std::string name)
Constructor.
Definition: module.cc:7
SWU * swu()
Definition: module.cc:124
bool add_dependent(Dependency< Module, Module > *)
Definition: module.cc:59
void add_file(std::string file)
Definition: module.cc:112