|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r86275 - in trunk/tools/boostbook: test/doxygen test/doxygen/boost xsl/doxygen
From: dnljms_at_[hidden]
Date: 2013-10-12 16:10:53
Author: danieljames
Date: 2013-10-12 16:10:53 EDT (Sat, 12 Oct 2013)
New Revision: 86275
URL: http://svn.boost.org/trac/boost/changeset/86275
Log:
Avoid confusing arguments with quialifiers from argsstring.
Text files modified:
trunk/tools/boostbook/test/doxygen/autodoc.gold | 1 +
trunk/tools/boostbook/test/doxygen/boost/example.hpp | 1 +
trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl | 11 ++++++++---
3 files changed, 10 insertions(+), 3 deletions(-)
Modified: trunk/tools/boostbook/test/doxygen/autodoc.gold
==============================================================================
--- trunk/tools/boostbook/test/doxygen/autodoc.gold Sat Oct 12 16:10:22 2013 (r86274)
+++ trunk/tools/boostbook/test/doxygen/autodoc.gold 2013-10-12 16:10:53 EDT (Sat, 12 Oct 2013) (r86275)
@@ -15,6 +15,7 @@
<data-member name="static_const_integer" specifiers="static"><type>const int</type></data-member>
<method-group name="public member functions">
<method name="virtual_method"><type>virtual int</type></method>
+<method name="method_with_default_value"><type>int</type><parameter name=""><paramtype>int</paramtype><default>default_value</default></parameter></method>
<method name="conversion-operator" specifiers="explicit"><type>int</type></method>
</method-group>
<constructor cv="= default"><parameter name=""><paramtype><classname>example</classname> const &</paramtype></parameter></constructor>
Modified: trunk/tools/boostbook/test/doxygen/boost/example.hpp
==============================================================================
--- trunk/tools/boostbook/test/doxygen/boost/example.hpp Sat Oct 12 16:10:22 2013 (r86274)
+++ trunk/tools/boostbook/test/doxygen/boost/example.hpp 2013-10-12 16:10:53 EDT (Sat, 12 Oct 2013) (r86275)
@@ -35,6 +35,7 @@
example(example const&) = default;
example& operator=(example const&) = delete;
virtual int virtual_method();
+ int method_with_default_value(int = default_value);
int integer;
static int static_integer;
Modified: trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl Sat Oct 12 16:10:22 2013 (r86274)
+++ trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl 2013-10-12 16:10:53 EDT (Sat, 12 Oct 2013) (r86275)
@@ -1061,8 +1061,13 @@
<xsl:template name="function.attributes">
+ <!-- argsstring = '(arguments) [= delete] [= default] [constexpt]' -->
+ <xsl:variable name="extra-qualifiers" select="concat(' ',
+ normalize-space(substring-after(argsstring/text(), ')')),
+ ' ')" />
+
<!-- CV Qualifiers -->
- <xsl:if test="@const='yes' or @volatile='yes' or contains(argsstring/text(),'=delete') or contains(argsstring/text(),'=default')">
+ <xsl:if test="@const='yes' or @volatile='yes' or contains($extra-qualifiers,' =delete ') or contains($extra-qualifiers,' =default ')">
<xsl:attribute name="cv">
<xsl:if test="@const='yes'">
<xsl:text>const</xsl:text>
@@ -1074,13 +1079,13 @@
<xsl:text>volatile</xsl:text>
</xsl:if>
<!-- Cheat and add deleted and defaulted function markers to the CV qualifiers -->
- <xsl:if test="contains(argsstring/text(),'=delete')">
+ <xsl:if test="contains($extra-qualifiers,' =delete ')">
<xsl:if test="@const='yes' or @volatile='yes'">
<xsl:text> </xsl:text>
</xsl:if>
<xsl:text>= delete</xsl:text>
</xsl:if>
- <xsl:if test="contains(argsstring/text(),'=default')">
+ <xsl:if test="contains($extra-qualifiers,' =default ')">
<xsl:if test="@const='yes' or @volatile='yes'">
<xsl:text> </xsl:text>
</xsl:if>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk