parameters: (self, doc)
docstring: Build lists regarding the inheritance in the classes and concepts in doc.
  
          We will build the equivalent to what Javadoc builds.
  
          For concepts, this is the list of (a) all extended concepts, (b) all
          known extending concepts, (c) all known implementing classes.
  
          For classes, this is the list of (a) all implemented concepts, (b) all
          direct known specializations, (c) all extended classes.
  
          @param doc: The ProcDoc object with the classes and concept.
docstring_summary: Build lists regarding the inheritance in the classes and concepts in doc.
docstring_tokens: Build lists regarding the inheritance in the classes and concepts in doc .
function: def buildInheritanceLists(self, doc):
          """Build lists regarding the inheritance in the classes and concepts in doc.
  
          We will build the equivalent to what Javadoc builds.
  
          For concepts, this is the list of (a) all extended concepts, (b) all
          known extending concepts, (c) all known implementing classes.
  
          For classes, this is the list of (a) all implemented concepts, (b) all
          direct known specializations, (c) all extended classes.
  
          @param doc: The ProcDoc object with the classes and concept.
  
          """
          self.log('  4) Building Inheritance Lists.')
          # Process concepts: All extended and all extending.
          concepts = [x for x in doc.top_level_entries.values()
                      if x.kind == 'concept']
          # Get all concepts that c extends into c.all_extended.
          for c in concepts:
              q = list(c.extends)  # Queue for recursion
              while q:
                  name = q[0]
                  q.pop(0)
                  if name in c.all_extended:
                      continue  # Skip to break loops.
                  c.all_extended.add(name)
                  q += doc.top_level_entries[name].extends
          # Now, build list of all extending concepts into c.all_extending.
          for c in concepts:
              for name in c.all_extended:
                  doc.top_level_entries[name].all_extending.add(c.name)
          # Process classes: All extended and all extending classes.
          classes = [x for x in doc.top_level_entries.values()
                     if x.kind in ['class', 'specialization']]
          # Get all classes that c extends into c.all_extended.
          for c in classes:
              q = list(c.extends)  # Queue for recursion
              while q:
                  name = q[0]
                  q.pop(0)
                  if name in c.all_extended:
                      continue  # Skip to break loops.
                  c.all_extended.add(name)
                  if name not in doc.top_level_entries:
                      self.logWarning('Could not find entry for extending: %s', name)
                      continue
                  q += doc.top_level_entries[name].extends
          # Now, build list of all extending clsses into c.all_extending.
          for c in classes:
              for name in c.all_extended:
                  if name not in doc.top_level_entries:
                      self.logWarning('Could not find entry for extending: %s', name)
                      continue
                  doc.top_level_entries[name].all_extending.add(c.name)
          # Build list of all direct implementing classes for all concepts.
          for cl in classes:
              for name in cl.implements:
                  if '\u0001' in name:
                      continue  # Skip transitive inheritance.
                  if not doc.top_level_entries.get(name):
                      self.logWarning('Could not find entry for implementing: %s', name)
                      continue
                  co = doc.top_level_entries[name]
                  if co.kind != 'concept':
                      self.logWarning('Only concepts can be implemented.')
                      continue
                  co.all_implementing.add(cl.name)
                  co.all_implementing.update(cl.all_extending)
          # Build list of all implemented concepts for all classes.
          for co in concepts:
              for name in co.all_implementing:
                  cl = doc.top_level_entries[name]
                  cl.all_implemented.add(co.name)
                  cl.all_implemented.update(co.all_extended)  # inheritance
          # Update list of all implementing classes for all concepts (transitive)
          for cl in classes:
              for name in cl.all_implemented:
                  co = doc.top_level_entries[name]
                  co.all_implementing.add(cl.name)
function_tokens: def buildInheritanceLists ( self , doc ) : self . log ( '  4) Building Inheritance Lists.' ) # Process concepts: All extended and all extending. concepts = [ x for x in doc . top_level_entries . values ( ) if x . kind == 'concept' ] # Get all concepts that c extends into c.all_extended. for c in concepts : q = list ( c . extends ) # Queue for recursion while q : name = q [ 0 ] q . pop ( 0 ) if name in c . all_extended : continue # Skip to break loops. c . all_extended . add ( name ) q += doc . top_level_entries [ name ] . extends # Now, build list of all extending concepts into c.all_extending. for c in concepts : for name in c . all_extended : doc . top_level_entries [ name ] . all_extending . add ( c . name ) # Process classes: All extended and all extending classes. classes = [ x for x in doc . top_level_entries . values ( ) if x . kind in [ 'class' , 'specialization' ] ] # Get all classes that c extends into c.all_extended. for c in classes : q = list ( c . extends ) # Queue for recursion while q : name = q [ 0 ] q . pop ( 0 ) if name in c . all_extended : continue # Skip to break loops. c . all_extended . add ( name ) if name not in doc . top_level_entries : self . logWarning ( 'Could not find entry for extending: %s' , name ) continue q += doc . top_level_entries [ name ] . extends # Now, build list of all extending clsses into c.all_extending. for c in classes : for name in c . all_extended : if name not in doc . top_level_entries : self . logWarning ( 'Could not find entry for extending: %s' , name ) continue doc . top_level_entries [ name ] . all_extending . add ( c . name ) # Build list of all direct implementing classes for all concepts. for cl in classes : for name in cl . implements : if '\u0001' in name : continue # Skip transitive inheritance. if not doc . top_level_entries . get ( name ) : self . logWarning ( 'Could not find entry for implementing: %s' , name ) continue co = doc . top_level_entries [ name ] if co . kind != 'concept' : self . logWarning ( 'Only concepts can be implemented.' ) continue co . all_implementing . add ( cl . name ) co . all_implementing . update ( cl . all_extending ) # Build list of all implemented concepts for all classes. for co in concepts : for name in co . all_implementing : cl = doc . top_level_entries [ name ] cl . all_implemented . add ( co . name ) cl . all_implemented . update ( co . all_extended ) # inheritance # Update list of all implementing classes for all concepts (transitive) for cl in classes : for name in cl . all_implemented : co = doc . top_level_entries [ name ] co . all_implementing . add ( cl . name )