#include "pp.h" void Cd_graph::checkInheritanceRestriction( Propagation_schema* ps ) { DEM_TRACE("Cd_graph","void Cd_graph::checkInheritanceRestriction(Propagation_schema* ps)"); // prefix class wrappers ps->get_paths()->get_adjacencies()->checkInheritanceRestriction( ps->get_paths()->get_adjacencies(),ps); // suffix class wrappers } void Adjacency_Nlist::checkInheritanceRestriction( Adjacency_Nlist* adjs,Propagation_schema* ps ) { DEM_TRACE("Adjacency_Nlist","void Adjacency_Nlist::checkInheritanceRestriction(Adjacency_Nlist* adjs,Propagation_schema* ps)"); // prefix class wrappers Adjacency_list_iterator next(*this); Adjacency* each; while (each = next()) each->checkInheritanceRestriction(adjs,ps); // suffix class wrappers } void Adjacency::checkInheritanceRestriction( Adjacency_Nlist* adjs,Propagation_schema* ps ) { DEM_TRACE("Adjacency","void Adjacency::checkInheritanceRestriction(Adjacency_Nlist* adjs,Propagation_schema* ps)"); // prefix class wrappers ns->checkInheritanceRestriction(adjs,ps,source,superclasses); // suffix class wrappers } void Neighbors::checkInheritanceRestriction( Adjacency_Nlist* adjs,Propagation_schema* ps,Vertex* s,Vertex_List* supers ) { DEM_TRACE("Neighbors","void Neighbors::checkInheritanceRestriction(Adjacency_Nlist* adjs,Propagation_schema* ps,Vertex* s,Vertex_List* supers)"); // prefix class wrappers // suffix class wrappers } void Neighbors_wc::checkInheritanceRestriction( Adjacency_Nlist* adjs,Propagation_schema* ps,Vertex* s,Vertex_List* supers ) { DEM_TRACE("Neighbors_wc","void Neighbors_wc::checkInheritanceRestriction(Adjacency_Nlist* adjs,Propagation_schema* ps,Vertex* s,Vertex_List* supers)"); // prefix class wrappers // suffix class wrappers } void Alternat_ns::checkInheritanceRestriction( Adjacency_Nlist* adjs,Propagation_schema* ps,Vertex* s,Vertex_List* supers ) { DEM_TRACE("Alternat_ns","void Alternat_ns::checkInheritanceRestriction(Adjacency_Nlist* adjs,Propagation_schema* ps,Vertex* s,Vertex_List* supers)"); // prefix class wrappers if ((supers && supers->list_length()) || (this->get_construct_ns()->list_length())) { int hasInhEdge = 0; int isTarget = 0; adjs->hasIncomingInheritanceEdge(s,hasInhEdge); ps->get_target_port()->contains(s,isTarget); if (!hasInhEdge && !isTarget) { cout << toolname << ": the Inheritance Restriction violated. " << "Abstract class " << s->get_vertex_name() << " has outgoing construction/inheritance edges but does not have any incoming inheritance edges.\n\n" << "Propagation graph:\n" << ps << endl; exit(-1); } } // suffix class wrappers } void Adjacency_Nlist::hasIncomingInheritanceEdge( Vertex* v,int& r ) { DEM_TRACE("Adjacency_Nlist","void Adjacency_Nlist::hasIncomingInheritanceEdge(Vertex* v,int& r)"); // prefix class wrappers Adjacency_list_iterator next(*this); Adjacency* each; while (each = next()) { each->hasIncomingInheritanceEdge(v,r); if (r) return; } // suffix class wrappers } void Adjacency::hasIncomingInheritanceEdge( Vertex* v,int& r ) { DEM_TRACE("Adjacency","void Adjacency::hasIncomingInheritanceEdge(Vertex* v,int& r)"); // prefix class wrappers Vertex_list_iterator next(*superclasses); Vertex* each; while (each = next()) if (v->equal(each)) { r = 1; return; } // suffix class wrappers }