model_server/xref/src/xrefSymbol.h.cxx
//=============================================
// xrefSymbol::get_root_classes_with_virt_fcn: fills array with least-
// derived classes containing specified virtual function and returns
// true if this or one of its base classes contains a definition of
// the function.
//=============================================
:get_root_classes_with_virt_fcn: fills array with least
derived classes containing specified virtual function and returns
true if this or one of its base classes contains a definition of
the function.
: get_root_classes_with_virt_fcn : fills array with least derived classes containing specified virtual function and returns true if this or one of its base classes contains a definition of the function .
bool xrefSymbol::get_root_classes_with_virt_fcn(char const *unqual_name,
						symbolArr& root_classes) {
   Initialize(xrefSymbol::get_root_classes_with_virt_fcn);
   if (root_classes.includes(this)) {
      return true;
   }
   bool found_in_base = false;
   symbolArr bases;
   get_link(has_superclass, bases);
   symbolPtr base;
   ForEachS(base, bases) {
      if (base->get_root_classes_with_virt_fcn(unqual_name, root_classes)) {
	 found_in_base = true;
      }
   }
   if (!found_in_base) {
      symbolArr members;
      get_link(is_using, members);
      symbolPtr mem;
      ForEachS(mem, members) {
	 if (mem.is_override_for(unqual_name)) {
	    root_classes.insert_last(this);
	    return true;
	 }
      }
   }
   return false;
}
bool xrefSymbol :: get_root_classes_with_virt_fcn ( char const * unqual_name , symbolArr & root_classes ) { Initialize ( xrefSymbol :: get_root_classes_with_virt_fcn ) ; if ( root_classes . includes ( this ) ) { return true ; } bool found_in_base = false ; symbolArr bases ; get_link ( has_superclass , bases ) ; symbolPtr base ; ForEachS ( base , bases ) { if ( base -> get_root_classes_with_virt_fcn ( unqual_name , root_classes ) ) { found_in_base = true ; } } if ( ! found_in_base ) { symbolArr members ; get_link ( is_using , members ) ; symbolPtr mem ; ForEachS ( mem , members ) { if ( mem . is_override_for ( unqual_name ) ) { root_classes . insert_last ( this ) ; return true ; } } } return false ; }
xrefSymbol::get_root_classes_with_virt_fcn: fills array with least
derived classes containing specified virtual function and returns
true if this or one of its base classes contains a definition of
the function.
xrefSymbol :: get_root_classes_with_virt_fcn : fills array with least derived classes containing specified virtual function and returns true if this or one of its base classes contains a definition of the function .