model_server/xref/src/xrefSymbol.h.cxx
// should not call with links is_defined_in
should not call with links is_defined_in
should not call with links is_defined_in
int xrefSymbol::get_links(linkTypes &la, symbolArr& as, XrefTable* Xr, int rec)
{
  Initialize(xrefSymbol::get_links);
  uint s_ind = get_symbol_index();
  Link* lnk = get_start_link(s_ind, Xr);
  while (lnk && !last_link(lnk)) {
    if (la.contain(linkType(lnk->lt()))) {
      as.insert_last(lnk->get_symbol_of_link(Xr));
      la.found(linkType(lnk->lt()));
    }
    lnk = get_next_link(lnk, s_ind, Xr);
  }
  if (rec==0 && !la.local_only()) {
    xrefSymbol* dfs = 0;
    if (!la.contain(is_defined_in)) {
      symbolArr aas;
      if (get_link(is_defined_in, aas, 1))
	dfs = aas[0];
    }
    Xref * xr  = get_Xref();
    xr->get_links_global(this, la, as, dfs);
  }
  return as.size();
}
int xrefSymbol :: get_links ( linkTypes & la , symbolArr & as , XrefTable * Xr , int rec ) { Initialize ( xrefSymbol :: get_links ) ; uint s_ind = get_symbol_index ( ) ; Link * lnk = get_start_link ( s_ind , Xr ) ; while ( lnk && ! last_link ( lnk ) ) { if ( la . contain ( linkType ( lnk -> lt ( ) ) ) ) { as . insert_last ( lnk -> get_symbol_of_link ( Xr ) ) ; la . found ( linkType ( lnk -> lt ( ) ) ) ; } lnk = get_next_link ( lnk , s_ind , Xr ) ; } if ( rec == 0 && ! la . local_only ( ) ) { xrefSymbol * dfs = 0 ; if ( ! la . contain ( is_defined_in ) ) { symbolArr aas ; if ( get_link ( is_defined_in , aas , 1 ) ) dfs = aas [ 0 ] ; } Xref * xr = get_Xref ( ) ; xr -> get_links_global ( this , la , as , dfs ) ; } return as . size ( ) ; }
should not call with links is_defined_in
should not call with links is_defined_in
// this should only be called with symbol-type linktypes