diff options
author | Zhanna Tsitkov <tsitkova@mit.edu> | 2012-05-05 17:03:50 +0000 |
---|---|---|
committer | Zhanna Tsitkov <tsitkova@mit.edu> | 2012-05-05 17:03:50 +0000 |
commit | 00c5cc84ae502e00bc1781c4a4f6ac0436c8dae2 (patch) | |
tree | 47aa7878a9b0fdbd53f8354d27f7bbc20a3ac62e | |
parent | b5307c133a1ef3183f772dc2c20e09cc1e529772 (diff) | |
download | krb5-00c5cc84ae502e00bc1781c4a4f6ac0436c8dae2.tar.gz krb5-00c5cc84ae502e00bc1781c4a4f6ac0436c8dae2.tar.xz krb5-00c5cc84ae502e00bc1781c4a4f6ac0436c8dae2.zip |
Process param/defname node for "#define".
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25851 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | doc/rst_tools/define_document.tmpl | 12 | ||||
-rw-r--r-- | doc/rst_tools/docmodel.py | 1 | ||||
-rw-r--r-- | doc/rst_tools/doxybuilder_types.py | 18 |
3 files changed, 27 insertions, 4 deletions
diff --git a/doc/rst_tools/define_document.tmpl b/doc/rst_tools/define_document.tmpl index 9f9048e82..8bf2fd393 100644 --- a/doc/rst_tools/define_document.tmpl +++ b/doc/rst_tools/define_document.tmpl @@ -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 diff --git a/doc/rst_tools/docmodel.py b/doc/rst_tools/docmodel.py index 0699b5af6..d5cfbd40f 100644 --- a/doc/rst_tools/docmodel.py +++ b/doc/rst_tools/docmodel.py @@ -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) diff --git a/doc/rst_tools/doxybuilder_types.py b/doc/rst_tools/doxybuilder_types.py index 01ee961b6..2a3ea6a19 100644 --- a/doc/rst_tools/doxybuilder_types.py +++ b/doc/rst_tools/doxybuilder_types.py @@ -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 |