///////////////////////////////////////////////////////////////////////////////////// // $Log: genDelayBindForTrans.pp,v $ // Revision 5.5.1.1 1994/08/24 19:32:03 demeter // *** empty log message *** // // Revision 5.5 1994/08/24 19:32:01 demeter // *** empty log message *** // // Revision 5.4.1.3 1994/02/24 20:53:52 demeter // reimplement object transportation -- cun // // Revision 5.4.1.2 1994/02/23 18:27:43 demeter // *** empty log message *** // // Revision 5.4.1.1 1994/02/23 18:26:12 demeter // spin for the --demeter_5_4-- branch // // Revision 5.4 1994/02/23 18:26:12 demeter // Initial file // // // ///////////////////////////////////////////////////////////////////////////////////// *operation* void collectDelayBindForTrans(Cd_graph* schema, Propagation_schema *ps, Adjacency_List* considered, Adjacency* currAdj) *wrapper* Cd_graph *prefix* (@ adjacencies->collectDelayBindForTrans(schema,ps,considered,currAdj); @) *wrapper* Adjacency_Nlist *prefix* (@ Adjacency_list_iterator next(*this); Adjacency* each; while (each = next()) if (each->get_source()->equal(currAdj->get_source())) break; assert(each); each->collectDelayBindForTrans(schema,ps,considered,currAdj); @) *wrapper* Adjacency *prefix* (@ if (this->get_superclasses()) this->get_superclasses()->collectDelayBindForTrans(schema,ps,considered,currAdj); @) *wrapper* Vertex_List *prefix* (@ Vertex_list_iterator next(*this); Vertex* each; while (each = next()) { Adjacency_list_iterator nexta(*schema->get_adjacencies()); Adjacency* eacha; while (eacha = nexta()) if (eacha->get_source()->equal(each)) break; assert(eacha); ps->get_paths()->collectDelayBindForTrans(schema,ps,considered,currAdj,each); eacha->collectDelayBindForTrans(schema,ps,considered,currAdj); } @) *operation* void collectDelayBindForTrans( Cd_graph* schema, Propagation_schema *ps, Adjacency_List* considered, Adjacency* currAdj, Vertex* currSuper) *wrapper* Cd_graph *prefix* (@ adjacencies->collectDelayBindForTrans(schema,ps,considered,currAdj,currSuper); @) *wrapper* Adjacency_Nlist *prefix* (@ Adjacency_list_iterator next(*this); Adjacency* each; while (each = next()) if (each->get_source()->equal(currSuper)) break; if (each) each->collectDelayBindForTrans(schema,ps,considered,currAdj,currSuper); @) *wrapper* Adjacency *prefix* (@ if (this->get_inarguments() == NULL && currAdj->get_inarguments() == NULL) return; if (this->get_inarguments() && currAdj->get_inarguments() && this->get_inarguments()->g_equal(currAdj->get_inarguments())) return; Adjacency_list_iterator next(*considered); Adjacency* each; while (each = next()) { if (each->get_inarguments() == NULL && this->get_inarguments() == NULL) return; if (each->get_inarguments() && this->get_inarguments() && each->get_inarguments()->g_equal(this->get_inarguments())) return; } if (!each) considered->insert(this); @) *operation* void printDelayBindForTrans( Cd_graph* schema, Propagation_schema *ps, Adjacency* currAdj, Carry_or_wrapper_List* frags, Header* hdr, ofstream& strm ) *traverse* *from* Adjacency_List *to-stop* Adjacency *wrapper* Adjacency *prefix* (@ // The current class should be checked whether it is used. // If it is not used, don't do the following. // This is FUTURE work. int r = 1; hdr->isAFunc(r); // generate signature hdr->printExtHdr(r,strm,currAdj->get_source(),this->get_inarguments()); strm << " // variable definitions for carrying in and out\n"; if (this->get_inarguments() == NULL) currAdj->get_inarguments()->genCarryVarDefs(strm); else if (currAdj->get_inarguments() != NULL) { Param_decl_Commalist* newargs = new Param_decl_Commalist(); Param_decl_list_iterator next2(*currAdj->get_inarguments()); Param_decl* each2; while (each2 = next2()) { Param_decl_list_iterator next3(*this->get_inarguments()); Param_decl* each3; while (each3 = next3()) if (each3->get_param_name()->g_equal(each2->get_param_name())) break; if (each3 == NULL) newargs->append(each2); } if (newargs->list_length()) newargs->genCarryVarDefs(strm); delete newargs; } strm << "\n"; strm << " this->"; hdr->printRepCallSig(strm,currAdj->get_inarguments()); strm << ";\n\n"; strm << "}\n\n"; @)