summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/rst_tools/docmodel.py2
-rw-r--r--doc/rst_tools/doxybuilder_types.py11
-rw-r--r--doc/rst_tools/type_document.tmpl15
3 files changed, 20 insertions, 8 deletions
diff --git a/doc/rst_tools/docmodel.py b/doc/rst_tools/docmodel.py
index 13c3d349c..5ab26781d 100644
--- a/doc/rst_tools/docmodel.py
+++ b/doc/rst_tools/docmodel.py
@@ -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)
diff --git a/doc/rst_tools/doxybuilder_types.py b/doc/rst_tools/doxybuilder_types.py
index ae40ff7b3..8d1d32e34 100644
--- a/doc/rst_tools/doxybuilder_types.py
+++ b/doc/rst_tools/doxybuilder_types.py
@@ -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],
diff --git a/doc/rst_tools/type_document.tmpl b/doc/rst_tools/type_document.tmpl
index de92bcca5..1dc497556 100644
--- a/doc/rst_tools/type_document.tmpl
+++ b/doc/rst_tools/type_document.tmpl
@@ -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: