Added a new section "declaration" to the "types" template
authorZhanna Tsitkov <tsitkova@mit.edu>
Tue, 5 Jul 2011 18:51:43 +0000 (18:51 +0000)
committerZhanna Tsitkov <tsitkova@mit.edu>
Tue, 5 Jul 2011 18:51:43 +0000 (18:51 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25013 dc483132-0cff-0310-8789-dd5450dbe970

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

index 13c3d349c72f3e80d810ec12e162396c72e32fe2..5ab26781d5e764875fc84c6d126294c3d06ec251 100644 (file)
@@ -27,6 +27,7 @@ from Cheetah.Template import Template
 
 class Attribute(object):
     def __init__(self, **argkw):
+        self.definition = argkw.get('definition')
         self.name = argkw.get('name')
         self.type = argkw.get('type')
         self.typeId = argkw.get('typeId')
@@ -44,6 +45,7 @@ class Attribute(object):
 class CompositeType():
     def __init__(self, **argkw):
         self.category = 'composite'
+        self.definition = argkw.get('definition')
         self.name = argkw.get('name')
         self.Id = argkw.get('Id')
         self.active = argkw.get('active', False)
index ae40ff7b3649b8d48760d84a70e0c7aab11ea10a..8d1d32e34deda5cd17cefcc594bf25b0f91544e6 100644 (file)
@@ -99,8 +99,15 @@ class DoxyTypes(object):
         t_brief = self._get_brief_description(brief_node)
         details_node = node.xpath('./detaileddescription')[0]
         t_detailed = self._get_detailed_description(details_node)
+        # remove  macros
+        t_definition = re.sub('KRB5_CALLCONV_C', '', t_definition)
+        t_definition = re.sub('KRB5_CALLCONV', '', t_definition)
+        # handle fp
+        if t_type[1].find('(') >= 0:
+              t_type = (t_type[0],None)
 
         typedef_descr = {'category': 'composite',
+                         'definition': t_definition,
                          'name': t_name,
                          'Id': t_Id,
                          'type': t_type[1],
@@ -140,8 +147,12 @@ class DoxyTypes(object):
         v_brief = self._get_brief_description(brief_node)
         details_node = node.xpath('./detaileddescription')[0]
         detailed_description = self._get_detailed_description(details_node)
+        # remove  macros
+        v_definition = re.sub('KRB5_CALLCONV_C', '', v_definition)
+        v_definition = re.sub('KRB5_CALLCONV', '', v_definition)
         
         variable_descr = {'category': 'variable',
+                         'definition': v_definition,
                           'name': v_name,
                           'Id': v_Id,
                           'type': v_type[1],
index de92bcca5e436c633ee9f200175376ec2bbfc421..1dc497556f93991cd011bf3e44ff69190ef070ab 100644 (file)
@@ -20,10 +20,15 @@ $title
 .. c:type:: $composite.name
 ..
 
-$composite.long_description
+Declaration
+------------
+
+$composite.definition
 
+$composite.long_description
 
-#if $composite.Id is not None and $composite.name is not 'krb5_trace_callback'
+#if $composite.Id is not None 
 
 
 #if len($composite.attributes)
@@ -31,12 +36,6 @@ $composite.long_description
 Members
 ---------
 
-#else 
-
-#if $composite.type is not None
-typedef :c:type:`$composite.type` $composite.name
-#end if
-
 #end if
 
 #for $attr in $composite.attributes: