Process param/defname node for "#define".
authorZhanna Tsitkov <tsitkova@mit.edu>
Sat, 5 May 2012 17:03:50 +0000 (17:03 +0000)
committerZhanna Tsitkov <tsitkova@mit.edu>
Sat, 5 May 2012 17:03:50 +0000 (17:03 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25851 dc483132-0cff-0310-8789-dd5450dbe970

doc/rst_tools/define_document.tmpl
doc/rst_tools/docmodel.py
doc/rst_tools/doxybuilder_types.py

index 9f9048e82b134f537d2ff81d7859adf0125ed9ca..8bf2fd393a9e5db18d035d964f3c0d49aa4ecf2f 100644 (file)
@@ -16,8 +16,12 @@ $composite.short_description
 
 $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
index 0699b5af60a96ed26ab6d0358081b39863dfc163..d5cfbd40f5d5e337640752667aa38e4a60afc3fd 100644 (file)
@@ -47,6 +47,7 @@ class CompositeType():
         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)
index 01ee961b6f89fd4c18c39365cce96f98ee55a764..2a3ea6a1959508b57317dc6984fe0bd33d1b71ec 100644 (file)
@@ -175,6 +175,21 @@ class DoxyTypes(object):
         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 @@ class DoxyTypes(object):
         define_descr = {'category': 'composite',
                         'definition': '',
                         'name': d_name,
+                        'name_signature': d_signature,
                         'Id': d_Id,
                         'initializer': d_initializer,
                         'type': '',
@@ -265,6 +281,8 @@ class DoxyTypes(object):
                     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