Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
autodoxy: Don't ignore const-ness discrepencies in prototype
[simgrid.git] / docs / source / _ext / autodoxy.py
index 93569db..af672a2 100644 (file)
@@ -381,7 +381,8 @@ class DoxygenMethodDocumenter(DoxygenDocumenter):
 
         if '::' in self.fullname:
             (obj, meth) = self.fullname.rsplit('::', 1)
-            prefix = './/compoundname[text()="{:s}"]/../sectiondef[@kind="public-func" or @kind="public-static-func"]'.format(obj)
+            # 'public-func' and 'public-static-func' are for classes while 'func' alone is for namespaces
+            prefix = './/compoundname[text()="{:s}"]/../sectiondef[@kind="public-func" or @kind="public-static-func" or @kind="func"]'.format(obj)
             obj = "{:s}::".format(obj)
         else:
             meth = self.fullname
@@ -402,14 +403,16 @@ class DoxygenMethodDocumenter(DoxygenDocumenter):
                 candidates = get_doxygen_root().xpath(xpath_query_noparam)
                 if len(candidates) == 1:
                     logger.warning("[autodoxy] Using method '{}{}{}' instead of '{}{}{}'. You may want to drop your specification of the signature, or to fix it."
-                                   .format(obj, meth, candidates[0].find('argsstring').text, obj, meth, self.argsstring))
+                                       .format(obj, meth, candidates[0].find('argsstring').text, obj, meth, self.argsstring))
                     self.object = candidates[0]
                     return True
                 logger.warning("[autodoxy] WARNING: Could not find method {}{}{}".format(obj, meth, self.argsstring))
+                if not candidates:
+                    logger.warning("[autodoxy] WARNING:  (no candidate found)")
                 for cand in candidates:
                     logger.warning("[autodoxy] WARNING:   Existing candidate: {}{}{}".format(obj, meth, cand.find('argsstring').text))
             else:
-                logger.warning("[autodoxy] WARNING: could not find method {}{} in Doxygen files\nQuery: {}".format(obj, meth, xpath_query))
+                logger.warning("[autodoxy] WARNING: Could not find method {}{} in Doxygen files\nQuery: {}".format(obj, meth, xpath_query))
             return False
         self.object = match[0]
         return True
@@ -518,7 +521,7 @@ class DoxygenVariableDocumenter(DoxygenDocumenter):
         else:
             rtype = rtype_el.text
 
- #       print("rtype: {}".format(rtype))
+       print("rtype: {}".format(rtype))
         signame = (rtype and (rtype + ' ') or '') + self.klassname + "::" + self.objname
         return self.format_template_name() + signame