|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83872 - branches/release/tools/boostbook/xsl/doxygen trunk/tools/boostbook/xsl/doxygen
From: andrey.semashev_at_[hidden]
Date: 2013-04-13 12:04:14
Author: andysem
Date: 2013-04-13 12:04:14 EDT (Sat, 13 Apr 2013)
New Revision: 83872
URL: http://svn.boost.org/trac/boost/changeset/83872
Log:
Added support for defaulted and deleted functions in the generated docs. Doxygen 1.8.2 or later needed to generate proper XML for this stylesheet.
Text files modified:
branches/release/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl | 58 ++++++++++++++++++++++++++++++++++++++-
trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl | 58 ++++++++++++++++++++++++++++++++++++++-
2 files changed, 112 insertions(+), 4 deletions(-)
Modified: branches/release/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl (original)
+++ branches/release/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl 2013-04-13 12:04:14 EDT (Sat, 13 Apr 2013)
@@ -1151,6 +1151,18 @@
<xsl:if test="@explicit = 'yes'">
<xsl:attribute name="specifiers">explicit</xsl:attribute>
</xsl:if>
+ <!-- CV Qualifiers -->
+ <xsl:if test="contains(argsstring/text(),'=delete') or contains(argsstring/text(),'=default')">
+ <xsl:attribute name="cv">
+ <!-- Cheat and add deleted and defaulted function markers to the CV qualifiers -->
+ <xsl:if test="contains(argsstring/text(),'=delete')">
+ <xsl:text>= delete</xsl:text>
+ </xsl:if>
+ <xsl:if test="contains(argsstring/text(),'=default')">
+ <xsl:text>= default</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:if>
<xsl:call-template name="function.children"/>
</constructor>
</xsl:template>
@@ -1165,6 +1177,34 @@
<!-- Handle Copy Assignment -->
<xsl:template name="copy-assignment">
<copy-assignment>
+ <!-- CV Qualifiers -->
+ <xsl:if test="not (@const='no' and @volatile='no')">
+ <xsl:attribute name="cv">
+ <xsl:if test="@const='yes'">
+ <xsl:text>const</xsl:text>
+ </xsl:if>
+ <xsl:if test="@volatile='yes'">
+ <xsl:if test="@const='yes'">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <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="@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="@const='yes' or @volatile='yes'">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:text>= default</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:if>
+
<xsl:call-template name="function.children"/>
</copy-assignment>
</xsl:template>
@@ -1177,7 +1217,7 @@
</xsl:attribute>
<!-- CV Qualifiers -->
- <xsl:if test="not (@const='no' and @volatile='no')">
+ <xsl:if test="not (@const='no' and @volatile='no') or contains(argsstring/text(),'=delete')">
<xsl:attribute name="cv">
<xsl:if test="@const='yes'">
<xsl:text>const</xsl:text>
@@ -1188,6 +1228,13 @@
</xsl:if>
<xsl:text>volatile</xsl:text>
</xsl:if>
+ <!-- Cheat and add deleted function markers to the CV qualifiers -->
+ <xsl:if test="contains(argsstring/text(),'=delete')">
+ <xsl:if test="@const='yes' or @volatile='yes'">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:text>= delete</xsl:text>
+ </xsl:if>
</xsl:attribute>
</xsl:if>
@@ -1212,7 +1259,7 @@
</xsl:attribute>
<!-- CV Qualifiers -->
- <xsl:if test="not (@const='no' and @volatile='no')">
+ <xsl:if test="not (@const='no' and @volatile='no') or contains(argsstring/text(),'=delete')">
<xsl:attribute name="cv">
<xsl:if test="@const='yes'">
<xsl:text>const</xsl:text>
@@ -1223,6 +1270,13 @@
</xsl:if>
<xsl:text>volatile</xsl:text>
</xsl:if>
+ <!-- Cheat and add deleted function markers to the CV qualifiers -->
+ <xsl:if test="contains(argsstring/text(),'=default')">
+ <xsl:if test="@const='yes' or @volatile='yes'">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:text>= default</xsl:text>
+ </xsl:if>
</xsl:attribute>
</xsl:if>
Modified: trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl (original)
+++ trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl 2013-04-13 12:04:14 EDT (Sat, 13 Apr 2013)
@@ -1151,6 +1151,18 @@
<xsl:if test="@explicit = 'yes'">
<xsl:attribute name="specifiers">explicit</xsl:attribute>
</xsl:if>
+ <!-- CV Qualifiers -->
+ <xsl:if test="contains(argsstring/text(),'=delete') or contains(argsstring/text(),'=default')">
+ <xsl:attribute name="cv">
+ <!-- Cheat and add deleted and defaulted function markers to the CV qualifiers -->
+ <xsl:if test="contains(argsstring/text(),'=delete')">
+ <xsl:text>= delete</xsl:text>
+ </xsl:if>
+ <xsl:if test="contains(argsstring/text(),'=default')">
+ <xsl:text>= default</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:if>
<xsl:call-template name="function.children"/>
</constructor>
</xsl:template>
@@ -1165,6 +1177,34 @@
<!-- Handle Copy Assignment -->
<xsl:template name="copy-assignment">
<copy-assignment>
+ <!-- CV Qualifiers -->
+ <xsl:if test="not (@const='no' and @volatile='no')">
+ <xsl:attribute name="cv">
+ <xsl:if test="@const='yes'">
+ <xsl:text>const</xsl:text>
+ </xsl:if>
+ <xsl:if test="@volatile='yes'">
+ <xsl:if test="@const='yes'">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <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="@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="@const='yes' or @volatile='yes'">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:text>= default</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:if>
+
<xsl:call-template name="function.children"/>
</copy-assignment>
</xsl:template>
@@ -1177,7 +1217,7 @@
</xsl:attribute>
<!-- CV Qualifiers -->
- <xsl:if test="not (@const='no' and @volatile='no')">
+ <xsl:if test="not (@const='no' and @volatile='no') or contains(argsstring/text(),'=delete')">
<xsl:attribute name="cv">
<xsl:if test="@const='yes'">
<xsl:text>const</xsl:text>
@@ -1188,6 +1228,13 @@
</xsl:if>
<xsl:text>volatile</xsl:text>
</xsl:if>
+ <!-- Cheat and add deleted function markers to the CV qualifiers -->
+ <xsl:if test="contains(argsstring/text(),'=delete')">
+ <xsl:if test="@const='yes' or @volatile='yes'">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:text>= delete</xsl:text>
+ </xsl:if>
</xsl:attribute>
</xsl:if>
@@ -1212,7 +1259,7 @@
</xsl:attribute>
<!-- CV Qualifiers -->
- <xsl:if test="not (@const='no' and @volatile='no')">
+ <xsl:if test="not (@const='no' and @volatile='no') or contains(argsstring/text(),'=delete')">
<xsl:attribute name="cv">
<xsl:if test="@const='yes'">
<xsl:text>const</xsl:text>
@@ -1223,6 +1270,13 @@
</xsl:if>
<xsl:text>volatile</xsl:text>
</xsl:if>
+ <!-- Cheat and add deleted function markers to the CV qualifiers -->
+ <xsl:if test="contains(argsstring/text(),'=default')">
+ <xsl:if test="@const='yes' or @volatile='yes'">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:text>= default</xsl:text>
+ </xsl:if>
</xsl:attribute>
</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