model_server/subsystem/src/Entity.cxx
// relate_to_type caches the result of collect_classes_from_type, which is
// horrendously expensive, in the allentities xref mapper, as well as
// establishing the relationship between this entity and the class used in
// its type/return type.
relate_to_type caches the result of collect_classes_from_type, which is
horrendously expensive, in the allentities xref mapper, as well as
establishing the relationship between this entity and the class used in
its type/return type.
relate_to_type caches the result of collect_classes_from_type which is horrendously expensive in the allentities xref mapper as well as establishing the relationship between this entity and the class used in its type / return type .
symbolPtr Entity::relate_to_type(const symbolPtr& type, size_t rel) {
   Initialize(Entity::relate_to_type);
   Entity* type_class = allentities->item(type);
   if (!type_class) {
      symbolArr classes;
      if (collect_classes_from_type(type, classes, projects_to_search)) {
	 symbolPtr cl;
	 ForEachS(cl, classes) {
	    if (type_class = allentities->item(cl)) {
	       break;
	    }
	 }
      }
      if (!type_class) {
	 type_class = &no_class;
      }
      allentities->add_sym_alias(type_class, type);
   }
   if (type_class != &no_class) {
      relate_to_symbol(rel, type_class->my_sym);
      return type_class->my_sym;
   }
   return NULL_symbolPtr;
}
symbolPtr Entity :: relate_to_type ( const symbolPtr & type , size_t rel ) { Initialize ( Entity :: relate_to_type ) ; Entity * type_class = allentities -> item ( type ) ; if ( ! type_class ) { symbolArr classes ; if ( collect_classes_from_type ( type , classes , projects_to_search ) ) { symbolPtr cl ; ForEachS ( cl , classes ) { if ( type_class = allentities -> item ( cl ) ) { break ; } } } if ( ! type_class ) { type_class = & no_class ; } allentities -> add_sym_alias ( type_class , type ) ; } if ( type_class != & no_class ) { relate_to_symbol ( rel , type_class -> my_sym ) ; return type_class -> my_sym ; } return NULL_symbolPtr ; }
relate_to_type caches the result of collect_classes_from_type, which is
horrendously expensive, in the allentities xref mapper, as well as
establishing the relationship between this entity and the class used in
its type/return type.
relate_to_type caches the result of collect_classes_from_type which is horrendously expensive in the allentities xref mapper as well as establishing the relationship between this entity and the class used in its type / return type .