simplify/src/InclusionTree.cxx
//find all nodes that correspond to this file starting with node
find all nodes that correspond to this file starting with node
find all nodes that correspond to this file starting with node
void InclusionTree::FindAllByFile(InclusionNode* node, const char* file, vector<InclusionNode *> &res)
{
  while (node)
    {
      int id = node->GetId();
      symbol* sym = GetSymbols()[id];
      const char* name = sym->name;
      if (strcmp(name, file) == 0)
	{
	  res.push_back(node);
	}
      FindAllByFile(node->GetFirst(), file, res);
      node = node->GetNext();
    }
}
void InclusionTree :: FindAllByFile ( InclusionNode * node , const char * file , vector < InclusionNode * > & res ) { while ( node ) { int id = node -> GetId ( ) ; symbol * sym = GetSymbols ( ) [ id ] ; const char * name = sym -> name ; if ( strcmp ( name , file ) == 0 ) { res . push_back ( node ) ; } FindAllByFile ( node -> GetFirst ( ) , file , res ) ; node = node -> GetNext ( ) ; } }
find all nodes that correspond to this file starting with node
find all nodes that correspond to this file starting with node