svn rev #25851: trunk/doc/rst_tools/

tsitkova@MIT.EDU tsitkova at MIT.EDU
Sat May 5 13:03:50 EDT 2012


http://src.mit.edu/fisheye/changelog/krb5/?cs=25851
Commit By: tsitkova
Log Message:
Process param/defname node for "#define". 



Changed Files:
U   trunk/doc/rst_tools/define_document.tmpl
U   trunk/doc/rst_tools/docmodel.py
U   trunk/doc/rst_tools/doxybuilder_types.py
Modified: trunk/doc/rst_tools/define_document.tmpl
===================================================================
--- trunk/doc/rst_tools/define_document.tmpl	2012-05-05 15:41:00 UTC (rev 25850)
+++ trunk/doc/rst_tools/define_document.tmpl	2012-05-05 17:03:50 UTC (rev 25851)
@@ -16,8 +16,12 @@
 
 $composite.long_description
 
-#echo ''.join(['=']*len($composite.name)) + '== ======================' #
+#if $composite.name_signature is not None and len($composite.name_signature)
+#echo ''.join(['=']*len($composite.name_signature)) + '== ======================' #
+$composite.name_signature       $composite.initializer
+#echo ''.join(['=']*len($composite.name_signature)) + '== ======================' #
+#else
+#echo ''.join(['=']*len($composite.name)) + '=== ======================' #
 $composite.name       $composite.initializer
-#echo ''.join(['=']*len($composite.name)) + '== ======================' #
-
-
+#echo ''.join(['=']*len($composite.name)) + '=== ======================' #
+#end if

Modified: trunk/doc/rst_tools/docmodel.py
===================================================================
--- trunk/doc/rst_tools/docmodel.py	2012-05-05 15:41:00 UTC (rev 25850)
+++ trunk/doc/rst_tools/docmodel.py	2012-05-05 17:03:50 UTC (rev 25851)
@@ -47,6 +47,7 @@
         self.category = 'composite'
         self.definition = argkw.get('definition')
         self.name = argkw.get('name')
+        self.name_signature = argkw.get('name_signature')
         self.Id = argkw.get('Id')
         self.initializer = argkw.get('initializer')
         self.active = argkw.get('active', False)

Modified: trunk/doc/rst_tools/doxybuilder_types.py
===================================================================
--- trunk/doc/rst_tools/doxybuilder_types.py	2012-05-05 15:41:00 UTC (rev 25850)
+++ trunk/doc/rst_tools/doxybuilder_types.py	2012-05-05 17:03:50 UTC (rev 25851)
@@ -175,6 +175,21 @@
         print  d_name
         d_initializer = ''
         d_type = ''
+        d_signature = ''
+
+        # Process param/defname node
+        if len(node.xpath('./param/defname')) > 0:
+            prm_str = ''
+            prm_list = list()
+            for p in node.xpath("./param"):
+                x = self._process_paragraph_content(p)
+                if x is not None and len(x):
+                   prm_list.append(x)
+            if prm_list is not None:
+                prm_str = prm_str.join(prm_list)
+            d_signature = " %s (%s) " % (d_name , prm_str)
+            d_signature = re.sub(', \)', ')', d_signature)
+
         if len(node.xpath('./initializer')) > 0:
             len_ref = len(node.xpath('./initializer/ref'))
             if len(node.xpath('./initializer/ref')) > 0:
@@ -199,6 +214,7 @@
         define_descr = {'category': 'composite',
                         'definition': '',
                         'name': d_name,
+                        'name_signature': d_signature,
                         'Id': d_Id,
                         'initializer': d_initializer,
                         'type': '',
@@ -265,6 +281,8 @@
                     result.append(e.strip())
                 else:
                     result.append('*%s*' % e.strip())
+            elif  e.getparent().tag == 'defname':
+                result.append('%s, ' % e.strip())
         result = ' '.join(result)
 
         return result



More information about the cvs-krb5 mailing list