model_server/xref/src/xrefSymbol.h.cxx
// Search one project subtree for a particular symbol
// This function calls itself recursively, till it finds a projNode
//    which has an Xref containing this symbol.   Zero if none found.
//    If it finds one, and if subprojptr is nonzero, it returns the project as well.
Search one project subtree for a particular symbol
This function calls itself recursively, till it finds a projNode
which has an Xref containing this symbol.   Zero if none found.
If it finds one, and if subprojptr is nonzero, it returns the project as well.
Search one project subtree for a particular symbol This function calls itself recursively till it finds a projNode which has an Xref containing this symbol . Zero if none found . If it finds one and if subprojptr is nonzero it returns the project as well .
Xref* xrefSymbol::get_subproj_Xref_of_symbol(projNode* pn, projNode** subprojptr) const
{
    Initialize(get_subproj_Xref_of_symbol);
    Xref* Xr;
    Xr = pn->get_xref(1);
    if (Xr && is_symbol_in(Xr)) {
      if (subprojptr) *subprojptr = pn;
      last_Xref = Xr;
      return Xr;
    }
    if (Xr && ! Xr->is_unreal_file())
	return 0;  
    Obj* os = parentProject_get_childProjects(pn);
    ObjPtr ob;
    ForEach(ob, *os) {
	projNode* pr = checked_cast(projNode, ob);
	Xref* xr = get_subproj_Xref_of_symbol(pr, subprojptr);
	if (xr) return xr;
    }
    return 0;
}
Xref * xrefSymbol :: get_subproj_Xref_of_symbol ( projNode * pn , projNode * * subprojptr ) const { Initialize ( get_subproj_Xref_of_symbol ) ; Xref * Xr ; Xr = pn -> get_xref ( 1 ) ; if ( Xr && is_symbol_in ( Xr ) ) { if ( subprojptr ) * subprojptr = pn ; last_Xref = Xr ; return Xr ; } if ( Xr && ! Xr -> is_unreal_file ( ) ) return 0 ; Obj * os = parentProject_get_childProjects ( pn ) ; ObjPtr ob ; ForEach ( ob , * os ) { projNode * pr = checked_cast ( projNode , ob ) ; Xref * xr = get_subproj_Xref_of_symbol ( pr , subprojptr ) ; if ( xr ) return xr ; } return 0 ; }
Search one project subtree for a particular symbol
This function calls itself recursively, till it finds a projNode
which has an Xref containing this symbol.
Search one project subtree for a particular symbol This function calls itself recursively till it finds a projNode which has an Xref containing this symbol .
//    cout << get_name() << " "  << pn->get_name() << endl; // stop stupid recursion //    if (!pn->contain_subproj_pmod()) return 0;