cprover
class_hierarchy.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Class Hierarchy
4 
5 Author: Daniel Kroening
6 
7 Date: April 2016
8 
9 \*******************************************************************/
10 
13 
14 #ifndef CPROVER_GOTO_PROGRAMS_CLASS_HIERARCHY_H
15 #define CPROVER_GOTO_PROGRAMS_CLASS_HIERARCHY_H
16 
17 #include <iosfwd>
18 #include <map>
19 
20 #include <util/namespace.h>
21 
23 {
24 public:
25  typedef std::vector<irep_idt> idst;
26 
27  class entryt
28  {
29  public:
31  };
32 
33  typedef std::map<irep_idt, entryt> class_mapt;
34  class_mapt class_map;
35 
36  void operator()(const symbol_tablet &);
37 
38  // transitively gets all children
39  idst get_children_trans(const irep_idt &id) const
40  {
41  idst result;
42  get_children_trans_rec(id, result);
43  return result;
44  }
45 
46  // transitively gets all parents
47  idst get_parents_trans(const irep_idt &id) const
48  {
49  idst result;
50  get_parents_trans_rec(id, result);
51  return result;
52  }
53 
54  void output(std::ostream &) const;
55 
56 protected:
57  void get_children_trans_rec(const irep_idt &, idst &) const;
58  void get_parents_trans_rec(const irep_idt &, idst &) const;
59 };
60 
61 #endif // CPROVER_GOTO_PROGRAMS_CLASS_HIERARCHY_H
void get_children_trans_rec(const irep_idt &, idst &) const
void operator()(const symbol_tablet &)
Looks for all the struct types in the symbol table and construct a map from class names to a data str...
void get_parents_trans_rec(const irep_idt &, idst &) const
The symbol table.
Definition: symbol_table.h:52
class_mapt class_map
std::vector< irep_idt > idst
std::map< irep_idt, entryt > class_mapt
idst get_children_trans(const irep_idt &id) const
void output(std::ostream &) const
idst get_parents_trans(const irep_idt &id) const