svn rev #25013: trunk/doc/rst_tools/
tsitkova@MIT.EDU
tsitkova at MIT.EDU
Tue Jul 5 14:51:43 EDT 2011
http://src.mit.edu/fisheye/changelog/krb5/?cs=25013
Commit By: tsitkova
Log Message:
Added a new section "declaration" to the "types" template.
Changed Files:
U trunk/doc/rst_tools/docmodel.py
U trunk/doc/rst_tools/doxybuilder_types.py
U trunk/doc/rst_tools/type_document.tmpl
Modified: trunk/doc/rst_tools/docmodel.py
===================================================================
--- trunk/doc/rst_tools/docmodel.py 2011-07-01 03:27:01 UTC (rev 25012)
+++ trunk/doc/rst_tools/docmodel.py 2011-07-05 18:51:43 UTC (rev 25013)
@@ -27,6 +27,7 @@
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 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)
Modified: trunk/doc/rst_tools/doxybuilder_types.py
===================================================================
--- trunk/doc/rst_tools/doxybuilder_types.py 2011-07-01 03:27:01 UTC (rev 25012)
+++ trunk/doc/rst_tools/doxybuilder_types.py 2011-07-05 18:51:43 UTC (rev 25013)
@@ -99,8 +99,15 @@
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 @@
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],
Modified: trunk/doc/rst_tools/type_document.tmpl
===================================================================
--- trunk/doc/rst_tools/type_document.tmpl 2011-07-01 03:27:01 UTC (rev 25012)
+++ trunk/doc/rst_tools/type_document.tmpl 2011-07-05 18:51:43 UTC (rev 25013)
@@ -20,25 +20,24 @@
.. c:type:: $composite.name
..
-$composite.long_description
+Declaration
+------------
+$composite.definition
-#if $composite.Id is not None and $composite.name is not 'krb5_trace_callback'
+$composite.long_description
+
+#if $composite.Id is not None
+
#if len($composite.attributes)
Members
---------
-#else
-
-#if $composite.type is not None
-typedef :c:type:`$composite.type` $composite.name
#end if
-#end if
-
#for $attr in $composite.attributes:
#if $attr.name is not None
.. c:member:: $attr.type $composite.name.$attr.name
More information about the cvs-krb5
mailing list