parameters: (self, node)
docstring: Sets the ``file_name`` and ``link_name`` for the specified node.  If the kind
          of this node is "file", then this method will also set the ``program_file``
          as well as the ``program_link_name`` fields.
  
          Since we are operating inside of a ``containmentFolder``, this method **will**
          include ``self.root_directory`` in this path so that you can just use::
  
              with open(node.file_name, "w") as gen_file:
                  ... write the file ...
  
          Having the ``containmentFolder`` is important for when we want to generate the
          file, but when we want to use it with ``include`` or ``toctree`` this will
          need to change.  Refer to :func:`exhale.ExhaleRoot.gerrymanderNodeFilenames`.
  
          This method also sets the value of ``node.title``, which will be used in both
          the reStructuredText document of the node as well as the links generated in the
          class view hierarchy (<a href="..."> for the ``createTreeView = True`` option).
  
          :type:  exhale.ExhaleNode
          :param: node
              The node that we are setting the above information for.
docstring_summary: Sets the ``file_name`` and ``link_name`` for the specified node.  If the kind
          of this node is "file", then this method will also set the ``program_file``
          as well as the ``program_link_name`` fields.
docstring_tokens: Sets the file_name and link_name for the specified node . If the kind of this node is file then this method will also set the program_file as well as the program_link_name fields .
function: def initializeNodeFilenameAndLink(self, node):
          '''
          Sets the ``file_name`` and ``link_name`` for the specified node.  If the kind
          of this node is "file", then this method will also set the ``program_file``
          as well as the ``program_link_name`` fields.
  
          Since we are operating inside of a ``containmentFolder``, this method **will**
          include ``self.root_directory`` in this path so that you can just use::
  
              with open(node.file_name, "w") as gen_file:
                  ... write the file ...
  
          Having the ``containmentFolder`` is important for when we want to generate the
          file, but when we want to use it with ``include`` or ``toctree`` this will
          need to change.  Refer to :func:`exhale.ExhaleRoot.gerrymanderNodeFilenames`.
  
          This method also sets the value of ``node.title``, which will be used in both
          the reStructuredText document of the node as well as the links generated in the
          class view hierarchy (<a href="..."> for the ``createTreeView = True`` option).
  
          :type:  exhale.ExhaleNode
          :param: node
              The node that we are setting the above information for.
          '''
          # create the file and link names
          html_safe_name = node.name.replace(":", "_").replace("/", "_")
          node.file_name = "{}/exhale_{}_{}.rst".format(self.root_directory, node.kind, html_safe_name)
          node.link_name = "{}_{}".format(qualifyKind(node.kind).lower(), html_safe_name)
          if node.kind == "file":
              # account for same file name in different directory
              html_safe_name = node.location.replace("/", "_")
              node.file_name = "{}/exhale_{}_{}.rst".format(self.root_directory, node.kind, html_safe_name)
              node.link_name = "{}_{}".format(qualifyKind(node.kind).lower(), html_safe_name)
              node.program_file = "{}/exhale_program_listing_file_{}.rst".format(
                  self.root_directory, html_safe_name
              )
              node.program_link_name = "program_listing_file_{}".format(html_safe_name)
  
          # create the title for this node.
          if node.kind == "dir":
              title = node.name.split("/")[-1]
          # breathe does not prepend the namespace for variables and typedefs, so
          # I choose to leave the fully qualified name in the title for added clarity
          elif node.kind == "variable" or node.kind == "typedef":
              title = node.name
          else:
              #
              # :TODO: This is probably breaking template specializations, need to redo
              #        the html_safe_name, file_name, and link_name to account for these
              #        as well as include documentation for how to link to partial
              #        template specializations.
              #
              #        That is, need to do something like
              #
              #        html_safe_name = node.name.replace(":", "_")
              #                                  .replace("/", "_")
              #                                  .replace(" ", "_")
              #                                  .replace("<", "LT_")
              #                                  .replace(">", "_GT")
              #
              #        Or something like that...
              #
              first_lt = node.name.find("<")
              last_gt  = node.name.rfind(">")
              # dealing with a template, special treatment necessary
              if first_lt > -1 and last_gt > -1:
                  title = "{}{}".format(
                      node.name[:first_lt].split("::")[-1], # remove namespaces
                      node.name[first_lt:last_gt + 1]       # template params
                  )
                  html_safe_name = title.replace(":", "_").replace("/", "_").replace(" ", "_").replace("<", "LT_").replace(">", "_GT").replace(",", "")
                  node.file_name = "{}/exhale_{}_{}.rst".format(self.root_directory, node.kind, html_safe_name)
                  node.link_name = "{}_{}".format(qualifyKind(node.kind).lower(), html_safe_name)
                  if node.kind == "file":
                      node.program_file = "{}/exhale_program_listing_file_{}.rst".format(
                          self.root_directory, html_safe_name
                      )
                      node.program_link_name = "program_listing_file_{}".format(html_safe_name)
              else:
                  title = node.name.split("::")[-1]
  
              # additionally, I feel that nested classes should have their fully qualified
              # name without namespaces for clarity
              prepend_parent = False
              if node.kind == "class" or node.kind == "struct" or node.kind == "enum" or node.kind == "union":
                  if node.parent is not None and (node.parent.kind == "class" or node.parent.kind == "struct"):
                      prepend_parent = True
              if prepend_parent:
                  title = "{}::{}".format(node.parent.name.split("::")[-1], title)
          node.title = "{} {}".format(qualifyKind(node.kind), title)
function_tokens: def initializeNodeFilenameAndLink ( self , node ) : # create the file and link names html_safe_name = node . name . replace ( ":" , "_" ) . replace ( "/" , "_" ) node . file_name = "{}/exhale_{}_{}.rst" . format ( self . root_directory , node . kind , html_safe_name ) node . link_name = "{}_{}" . format ( qualifyKind ( node . kind ) . lower ( ) , html_safe_name ) if node . kind == "file" : # account for same file name in different directory html_safe_name = node . location . replace ( "/" , "_" ) node . file_name = "{}/exhale_{}_{}.rst" . format ( self . root_directory , node . kind , html_safe_name ) node . link_name = "{}_{}" . format ( qualifyKind ( node . kind ) . lower ( ) , html_safe_name ) node . program_file = "{}/exhale_program_listing_file_{}.rst" . format ( self . root_directory , html_safe_name ) node . program_link_name = "program_listing_file_{}" . format ( html_safe_name ) # create the title for this node. if node . kind == "dir" : title = node . name . split ( "/" ) [ - 1 ] # breathe does not prepend the namespace for variables and typedefs, so # I choose to leave the fully qualified name in the title for added clarity elif node . kind == "variable" or node . kind == "typedef" : title = node . name else : # # :TODO: This is probably breaking template specializations, need to redo #        the html_safe_name, file_name, and link_name to account for these #        as well as include documentation for how to link to partial #        template specializations. # #        That is, need to do something like # #        html_safe_name = node.name.replace(":", "_") #                                  .replace("/", "_") #                                  .replace(" ", "_") #                                  .replace("<", "LT_") #                                  .replace(">", "_GT") # #        Or something like that... # first_lt = node . name . find ( "<" ) last_gt = node . name . rfind ( ">" ) # dealing with a template, special treatment necessary if first_lt > - 1 and last_gt > - 1 : title = "{}{}" . format ( node . name [ : first_lt ] . split ( "::" ) [ - 1 ] , # remove namespaces node . name [ first_lt : last_gt + 1 ] # template params ) html_safe_name = title . replace ( ":" , "_" ) . replace ( "/" , "_" ) . replace ( " " , "_" ) . replace ( "<" , "LT_" ) . replace ( ">" , "_GT" ) . replace ( "," , "" ) node . file_name = "{}/exhale_{}_{}.rst" . format ( self . root_directory , node . kind , html_safe_name ) node . link_name = "{}_{}" . format ( qualifyKind ( node . kind ) . lower ( ) , html_safe_name ) if node . kind == "file" : node . program_file = "{}/exhale_program_listing_file_{}.rst" . format ( self . root_directory , html_safe_name ) node . program_link_name = "program_listing_file_{}" . format ( html_safe_name ) else : title = node . name . split ( "::" ) [ - 1 ] # additionally, I feel that nested classes should have their fully qualified # name without namespaces for clarity prepend_parent = False if node . kind == "class" or node . kind == "struct" or node . kind == "enum" or node . kind == "union" : if node . parent is not None and ( node . parent . kind == "class" or node . parent . kind == "struct" ) : prepend_parent = True if prepend_parent : title = "{}::{}" . format ( node . parent . name . split ( "::" ) [ - 1 ] , title ) node . title = "{} {}" . format ( qualifyKind ( node . kind ) , title )