parameters: (doc, symbol)
return_statement: return None
docstring: Return the URL for a given symbol.
  
      This is where the magic happens.
      This function could be a lot more clever. At present it required the passed symbol to be almost exactly the same as the entries in the Doxygen tag file.
  
      .. todo::
  
          Maybe print a list of all possible matches as a warning (but still only return the first)
  
      :Parameters:
          doc : xml.etree.ElementTree
              The XML DOM object
          symbol : string
              The symbol to lookup in the file. E.g. something like 'PolyVox::Array' or 'tidyUpMemory'
  
      :return: String representing the filename part of the URL
docstring_summary: Return the URL for a given symbol.
docstring_tokens: Return the URL for a given symbol .
function: def find_url(doc, symbol):
      """
      Return the URL for a given symbol.
  
      This is where the magic happens.
      This function could be a lot more clever. At present it required the passed symbol to be almost exactly the same as the entries in the Doxygen tag file.
  
      .. todo::
  
          Maybe print a list of all possible matches as a warning (but still only return the first)
  
      :Parameters:
          doc : xml.etree.ElementTree
              The XML DOM object
          symbol : string
              The symbol to lookup in the file. E.g. something like 'PolyVox::Array' or 'tidyUpMemory'
  
      :return: String representing the filename part of the URL
      """
  
      # First check for an exact match with a top-level object (namespaces, objects etc.)
  
      #env = inliner.document.settings.env
  
      matches = []
      for compound in doc.findall('.//compound'):
          if compound.find('name').text == symbol:
              matches += [{'file': compound.find('filename').text, 'kind': compound.get('kind')}]
  
      if len(matches) > 1:
          pass
          #env.warn(env.docname, 'There were multiple matches for `%s`: %s' % (symbol, matches))
      if len(matches) == 1:
          return matches[0]
  
      # Strip off first namespace bit of the compound name so that 'ArraySizes' can match 'PolyVox::ArraySizes'
      for compound in doc.findall('.//compound'):
          symbol_list = compound.find('name').text.split('::', 1)
          if len(symbol_list) == 2:
              reducedsymbol = symbol_list[1]
              if reducedsymbol == symbol:
                  return {'file': compound.find('filename').text, 'kind': compound.get('kind')}
  
      # Now split the symbol by '::'. Find an exact match for the first part and then a member match for the second
      # So PolyVox::Array::operator[] becomes like {namespace: "PolyVox::Array", endsymbol: "operator[]"}
      symbol_list = symbol.rsplit('::', 1)
      if len(symbol_list) == 2:
          namespace = symbol_list[0]
          endsymbol = symbol_list[1]
          for compound in doc.findall('.//compound'):
              if compound.find('name').text == namespace:
                  for member in compound.findall('member'):
                      #If this compound object contains the matching member then return it
                      if member.find('name').text == endsymbol:
                          return {'file': (member.findtext('anchorfile') or compound.findtext('filename')) + '#' + member.find('anchor').text, 'kind': member.get('kind')}
  
      # Then we'll look at unqualified members
      for member in doc.findall('.//member'):
          if member.find('name').text == symbol:
              return {'file': (member.findtext('anchorfile') or compound.findtext('filename')) + '#' + member.find('anchor').text, 'kind': member.get('kind')}
  
      return None
function_tokens: def find_url ( doc , symbol ) : # First check for an exact match with a top-level object (namespaces, objects etc.) #env = inliner.document.settings.env matches = [ ] for compound in doc . findall ( './/compound' ) : if compound . find ( 'name' ) . text == symbol : matches += [ { 'file' : compound . find ( 'filename' ) . text , 'kind' : compound . get ( 'kind' ) } ] if len ( matches ) > 1 : pass #env.warn(env.docname, 'There were multiple matches for `%s`: %s' % (symbol, matches)) if len ( matches ) == 1 : return matches [ 0 ] # Strip off first namespace bit of the compound name so that 'ArraySizes' can match 'PolyVox::ArraySizes' for compound in doc . findall ( './/compound' ) : symbol_list = compound . find ( 'name' ) . text . split ( '::' , 1 ) if len ( symbol_list ) == 2 : reducedsymbol = symbol_list [ 1 ] if reducedsymbol == symbol : return { 'file' : compound . find ( 'filename' ) . text , 'kind' : compound . get ( 'kind' ) } # Now split the symbol by '::'. Find an exact match for the first part and then a member match for the second # So PolyVox::Array::operator[] becomes like {namespace: "PolyVox::Array", endsymbol: "operator[]"} symbol_list = symbol . rsplit ( '::' , 1 ) if len ( symbol_list ) == 2 : namespace = symbol_list [ 0 ] endsymbol = symbol_list [ 1 ] for compound in doc . findall ( './/compound' ) : if compound . find ( 'name' ) . text == namespace : for member in compound . findall ( 'member' ) : #If this compound object contains the matching member then return it if member . find ( 'name' ) . text == endsymbol : return { 'file' : ( member . findtext ( 'anchorfile' ) or compound . findtext ( 'filename' ) ) + '#' + member . find ( 'anchor' ) . text , 'kind' : member . get ( 'kind' ) } # Then we'll look at unqualified members for member in doc . findall ( './/member' ) : if member . find ( 'name' ) . text == symbol : return { 'file' : ( member . findtext ( 'anchorfile' ) or compound . findtext ( 'filename' ) ) + '#' + member . find ( 'anchor' ) . text , 'kind' : member . get ( 'kind' ) } return None