|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r86278 - in trunk/tools/boostbook: test/doxygen test/doxygen/boost xsl/doxygen
From: dnljms_at_[hidden]
Date: 2013-10-12 19:54:00
Author: danieljames
Date: 2013-10-12 19:53:59 EDT (Sat, 12 Oct 2013)
New Revision: 86278
URL: http://svn.boost.org/trac/boost/changeset/86278
Log:
Fix support for const, volatile, and pure virtual.
Text files modified:
trunk/tools/boostbook/test/doxygen/autodoc.gold | 4 ++++
trunk/tools/boostbook/test/doxygen/boost/example.hpp | 5 +++++
trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl | 19 +++++++++++--------
3 files changed, 20 insertions(+), 8 deletions(-)
Modified: trunk/tools/boostbook/test/doxygen/autodoc.gold
==============================================================================
--- trunk/tools/boostbook/test/doxygen/autodoc.gold Sat Oct 12 16:11:47 2013 (r86277)
+++ trunk/tools/boostbook/test/doxygen/autodoc.gold 2013-10-12 19:53:59 EDT (Sat, 12 Oct 2013) (r86278)
@@ -15,7 +15,11 @@
<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="virtual_abstract_method" cv="= 0"><type>virtual int</type></method>
+<method name="virtual_const_method" cv="const"><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="const_method" cv="const"><type>void</type></method>
+<method name="volatile_method" cv="volatile"><type>void</type></method>
<method name="trad_noexcept" cv="noexcept"><type>void</type></method>
<method name="boost_noexcept" cv="noexcept"><type>void</type></method>
<method name="trad_constexpr" cv="constexpr"><type>void</type></method>
Modified: trunk/tools/boostbook/test/doxygen/boost/example.hpp
==============================================================================
--- trunk/tools/boostbook/test/doxygen/boost/example.hpp Sat Oct 12 16:11:47 2013 (r86277)
+++ trunk/tools/boostbook/test/doxygen/boost/example.hpp 2013-10-12 19:53:59 EDT (Sat, 12 Oct 2013) (r86278)
@@ -35,8 +35,13 @@
example(example const&) = default;
example& operator=(example const&) = delete;
virtual int virtual_method();
+ virtual int virtual_abstract_method() = 0;
+ virtual int virtual_const_method() const;
int method_with_default_value(int = default_value);
+ void const_method() const;
+ void volatile_method() volatile;
+
void trad_noexcept() noexcept;
void boost_noexcept() BOOST_NOEXCEPT;
Modified: trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl Sat Oct 12 16:11:47 2013 (r86277)
+++ trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl 2013-10-12 19:53:59 EDT (Sat, 12 Oct 2013) (r86278)
@@ -1070,18 +1070,21 @@
<!-- Plus deleted and defaulted function markers as they're not properly
supported in boostbook -->
<!-- The 'substring' trick includes the string if the condition is true -->
+ <xsl:variable name="constexpr" select="
+ contains($extra-qualifiers, ' const expr ') or
+ contains($extra-qualifiers, ' BOOST_CONSTEXPR ') or
+ contains($extra-qualifiers, ' BOOST_CONSTEXPR_OR_CONST ')" />
+
<xsl:variable name="cv-qualifiers" select="normalize-space(concat(
- substring('constexpr ', 1, 999 * (
- contains($extra-qualifiers, ' const expr ') or
- contains($extra-qualifiers, ' BOOST_CONSTEXPR ') or
- contains($extra-qualifiers, ' BOOST_CONSTEXPR_OR_CONST '))),
- substring('const ', 1, 999 * (@const=yes)),
- substring('volatile ', 1, 999 * (@volatile=yes)),
+ substring('constexpr ', 1, 999 * $constexpr),
+ substring('const ', 1, 999 * (not($constexpr) and @const='yes')),
+ substring('volatile ', 1, 999 * (@volatile='yes' or contains($extra-qualifiers, ' volatile '))),
substring('noexcept ', 1, 999 * (
contains($extra-qualifiers, ' noexcept ') or
contains($extra-qualifiers, ' BOOST_NOEXCEPT '))),
substring('= delete ', 1, 999 * contains($extra-qualifiers, ' =delete ')),
substring('= default ', 1, 999 * contains($extra-qualifiers, ' =default ')),
+ substring('= 0 ', 1, 999 * (@virt = 'pure-virtual')),
''))" />
<xsl:if test="$cv-qualifiers">
@@ -1245,7 +1248,7 @@
<!-- Return type -->
<xsl:element name="type">
<!-- Cheat on virtual and static by dropping them into the type -->
- <xsl:if test="@virtual='yes' or @virt='virtual'">
+ <xsl:if test="@virtual='yes' or @virt='virtual' or @virt='pure-virtual'">
<xsl:text>virtual </xsl:text>
</xsl:if>
@@ -1290,7 +1293,7 @@
<xsl:text>static </xsl:text>
</xsl:if>
- <xsl:if test="@virtual='yes' or @virt='virtual'">
+ <xsl:if test="@virtual='yes' or @virt='virtual' or @virt='pure-virtual'">
<xsl:text>virtual </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