#include "pp.h" int Cd_graph::inherits( Cd_graph* g,Vertex* s,Vertex* t ) { DEM_TRACE("Cd_graph","int Cd_graph::inherits(Cd_graph* g,Vertex* s,Vertex* t)"); int return_val = 0 ; this->inherits_( return_val, g , s , t ); return return_val; } // Cd_graph = Adjacency_Nlist // [ DemNumber ] // [ DemNumber ] // [ Adjacency_List ] // [ SCC_component_List ] // [ Vertex_Commalist ] . void Cd_graph::inherits_( int& return_val, Cd_graph* g,Vertex* s,Vertex* t ) { DEM_TRACE("Cd_graph","void Cd_graph::inherits_(int& return_val,Cd_graph* g,Vertex* s,Vertex* t)"); // variables for carrying in and out // assignments for carrying in // prefix class wrappers // outgoing calls // construction edge prefix wrappers this->get_adjacencies()->inherits_( return_val, g , s , t ); // construction edge suffix wrappers // suffix class wrappers // assignments for carrying out } // Adjacency = Vertex // [ Vertex_Commalist ] // Neighbors // *l // [ Param_decl_Commalist ] // [ Param_decl_Commalist ] // [ Param_assignment_List ] // [ DemString ] // [ DemString ] // [ DemString ] // [ Signature_Commalist ] // [ Vertex_List ] // [ $int ] // [ DemNumber ] // [ DemNumber ] // [ DemNumber ] // "." . void Adjacency::inherits_( int& return_val, Cd_graph* g,Vertex* s,Vertex* t ) { DEM_TRACE("Adjacency","void Adjacency::inherits_(int& return_val,Cd_graph* g,Vertex* s,Vertex* t)"); // variables for carrying in and out // assignments for carrying in // prefix class wrappers if (s->get_vertex_name()->g_equal(t->get_vertex_name())) { return_val = 1; return; } if (source->get_vertex_name()->g_equal(s->get_vertex_name())) if (superclasses) return_val = superclasses->inherits(g,t); // outgoing calls // suffix class wrappers // assignments for carrying out } // Adjacency_Nlist ~ Adjacency { Adjacency }. . void Adjacency_Nlist::inherits_( int& return_val, Cd_graph* g,Vertex* s,Vertex* t ) { DEM_TRACE("Adjacency_Nlist","void Adjacency_Nlist::inherits_(int& return_val,Cd_graph* g,Vertex* s,Vertex* t)"); // variables for carrying in and out // assignments for carrying in // prefix class wrappers // outgoing calls Adjacency_list_iterator next_Adjacency(*this); Adjacency* each_Adjacency; while ( each_Adjacency = next_Adjacency() ) { // repetition edge prefix wrappers each_Adjacency->inherits_( return_val, g , s , t ); // repetition edge suffix wrappers } // suffix class wrappers // assignments for carrying out } int Vertex_List::inherits( Cd_graph* g,Vertex* t ) { DEM_TRACE("Vertex_List","int Vertex_List::inherits(Cd_graph* g,Vertex* t)"); int return_val = 0 ; this->inherits_( return_val, g , t ); return return_val; } // Vertex = DemIdent // [ Param_decl_Commalist ] // [ DemString ] // [ DemString ] . void Vertex::inherits_( int& return_val, Cd_graph* g,Vertex* t ) { DEM_TRACE("Vertex","void Vertex::inherits_(int& return_val,Cd_graph* g,Vertex* t)"); // variables for carrying in and out // assignments for carrying in // prefix class wrappers if (return_val == 1) return; static DemString * mark = new DemString("bypassing"); if (!mark->g_equal(this->get_bypassing())) { if (this->get_vertex_name()->g_equal(t->get_vertex_name())) { return_val = 1; return; } if (g->inherits(g,this,t)) return_val = 1; } // outgoing calls // suffix class wrappers // assignments for carrying out } // Vertex_List ~ { Vertex }. . void Vertex_List::inherits_( int& return_val, Cd_graph* g,Vertex* t ) { DEM_TRACE("Vertex_List","void Vertex_List::inherits_(int& return_val,Cd_graph* g,Vertex* t)"); // variables for carrying in and out // assignments for carrying in // prefix class wrappers // outgoing calls Vertex_list_iterator next_Vertex(*this); Vertex* each_Vertex; while ( each_Vertex = next_Vertex() ) { // repetition edge prefix wrappers each_Vertex->inherits_( return_val, g , t ); // repetition edge suffix wrappers } // suffix class wrappers // assignments for carrying out }