29 if(it->second.is_type && it->second.type.id()==ID_struct)
37 for(
const auto &base : bases)
39 irep_idt parent=base.find(ID_type).get(ID_identifier);
43 class_map[parent].children.push_back(it->first);
44 class_map[it->first].parents.push_back(parent);
54 class_mapt::const_iterator it=
class_map.find(c);
57 const entryt &entry=it->second;
59 for(
const auto &child : entry.
children)
60 dest.push_back(child);
63 for(
const auto &child : entry.
children)
71 class_mapt::const_iterator it=
class_map.find(c);
74 const entryt &entry=it->second;
76 for(
const auto &child : entry.
parents)
77 dest.push_back(child);
80 for(
const auto &child : entry.
parents)
88 for(
const auto &pa : c.second.parents)
89 out <<
"Parent of " << c.first <<
": " 92 for(
const auto &ch : c.second.children)
93 out <<
"Child of " << c.first <<
": "
#define forall_symbols(it, expr)
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...
std::vector< irept > subt
void get_parents_trans_rec(const irep_idt &, idst &) const
const struct_typet & to_struct_type(const typet &type)
Cast a generic typet to a struct_typet.
std::vector< irep_idt > idst
void output(std::ostream &) const
const irept & find(const irep_namet &name) const