ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ClassHierarchyGraph.h
Go to the documentation of this file.
1 #ifndef CLASS_HIERARCHY_GRAPH_H
2 #define CLASS_HIERARCHY_GRAPH_H
3 
4 #include <vector>
5 #include <map>
6 #include <boost/unordered_set.hpp>
7 
9 {
10 public:
11  typedef boost::unordered_set<SgClassDefinition*> ClassDefSet;
12 
13  typedef boost::unordered_map<std::string, ClassDefSet> MangledNameToClassDefsMap;
14 
15 private:
16 
17 
20 
23 
26 
29 
31 
32 public:
33 
35  const ClassDefSet& getSubclasses(SgClassDefinition *) const;
36  const ClassDefSet& getDirectSubclasses(SgClassDefinition *) const;
37  const ClassDefSet& getAncestorClasses(SgClassDefinition *) const;
38 
39 private:
40 
44  static void buildAncestorsMap(const MangledNameToClassDefsMap& parents, MangledNameToClassDefsMap& transitiveParents);
45 };
46 
47 
48 #endif