Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86279 - in trunk/tools/boostbook: test/doxygen test/doxygen/boost xsl/doxygen
From: dnljms_at_[hidden]
Date: 2013-10-12 19:54:37


Author: danieljames
Date: 2013-10-12 19:54:37 EDT (Sat, 12 Oct 2013)
New Revision: 86279
URL: http://svn.boost.org/trac/boost/changeset/86279

Log:
Use specifiers attribute for virtual and explicit.

Text files modified:
   trunk/tools/boostbook/test/doxygen/autodoc.gold | 10 +++++++---
   trunk/tools/boostbook/test/doxygen/boost/example.hpp | 3 +++
   trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl | 29 ++++++++++++-----------------
   3 files changed, 22 insertions(+), 20 deletions(-)

Modified: trunk/tools/boostbook/test/doxygen/autodoc.gold
==============================================================================
--- trunk/tools/boostbook/test/doxygen/autodoc.gold Sat Oct 12 19:53:59 2013 (r86278)
+++ trunk/tools/boostbook/test/doxygen/autodoc.gold 2013-10-12 19:54:37 EDT (Sat, 12 Oct 2013) (r86279)
@@ -14,9 +14,9 @@
 <data-member name="static_integer" specifiers="static"><type>int</type></data-member>
 <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="virtual_method" specifiers="virtual"><type>int</type></method>
+<method name="virtual_abstract_method" cv="= 0" specifiers="virtual"><type>int</type></method>
+<method name="virtual_const_method" cv="const" specifiers="virtual"><type>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>
@@ -30,6 +30,10 @@
 </method-group>
 <constructor cv="= default"><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></constructor>
 <copy-assignment cv="= delete"><type><classname>example</classname> &amp;</type><parameter name=""><paramtype><classname>example</classname> const &amp;</paramtype></parameter></copy-assignment>
+<method-group name="public static functions">
+<method name="static_method" specifiers="static"><type>int</type></method>
+<method name="static_constexpr" cv="constexpr" specifiers="static"><type>int</type></method>
+</method-group>
 </class><struct name="example_template"><template>
       <template-type-parameter name="TypeParameter"><purpose><para>A template parameter </para></purpose></template-type-parameter>
       <template-nontype-parameter name="NonTypeParameter"><type>int</type><purpose><para>This is a non-type template parameter </para></purpose></template-nontype-parameter>

Modified: trunk/tools/boostbook/test/doxygen/boost/example.hpp
==============================================================================
--- trunk/tools/boostbook/test/doxygen/boost/example.hpp Sat Oct 12 19:53:59 2013 (r86278)
+++ trunk/tools/boostbook/test/doxygen/boost/example.hpp 2013-10-12 19:54:37 EDT (Sat, 12 Oct 2013) (r86279)
@@ -51,6 +51,9 @@
 
         void constexpr_noexcept() constexpr noexcept;
 
+ static int static_method();
+ static int static_constexpr() constexpr;
+
         int integer;
         static int static_integer;
         mutable int mutable_integer;

Modified: trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl Sat Oct 12 19:53:59 2013 (r86278)
+++ trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl 2013-10-12 19:54:37 EDT (Sat, 12 Oct 2013) (r86279)
@@ -1087,15 +1087,24 @@
         substring('= 0 ', 1, 999 * (@virt = 'pure-virtual')),
         ''))" />
 
+ <!-- Specifiers -->
+ <xsl:variable name="specifiers" select="normalize-space(concat(
+ substring('explicit ', 1, 999 * (@explicit = 'yes')),
+ substring('virtual ', 1, 999 * (
+ @virtual='yes' or @virt='virtual' or @virt='pure-virtual')),
+ substring('static ', 1, 999 * (@static = 'yes')),
+ ''))" />
+
     <xsl:if test="$cv-qualifiers">
       <xsl:attribute name="cv">
         <xsl:value-of select="$cv-qualifiers" />
       </xsl:attribute>
     </xsl:if>
 
- <!-- Specifiers -->
- <xsl:if test="@explicit = 'yes'">
- <xsl:attribute name="specifiers">explicit</xsl:attribute>
+ <xsl:if test="$specifiers">
+ <xsl:attribute name="specifiers">
+ <xsl:value-of select="$specifiers" />
+ </xsl:attribute>
     </xsl:if>
 
   </xsl:template>
@@ -1247,11 +1256,6 @@
       <xsl:call-template name="function.attributes"/>
       <!-- 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' or @virt='pure-virtual'">
- <xsl:text>virtual </xsl:text>
- </xsl:if>
-
         <xsl:apply-templates select="type"/>
       </xsl:element>
 
@@ -1288,15 +1292,6 @@
 
       <!-- Return type -->
       <xsl:element name="type">
- <!-- Cheat on virtual and static by dropping them into the type -->
- <xsl:if test="@static='yes'">
- <xsl:text>static </xsl:text>
- </xsl:if>
-
- <xsl:if test="@virtual='yes' or @virt='virtual' or @virt='pure-virtual'">
- <xsl:text>virtual </xsl:text>
- </xsl:if>
-
         <xsl:apply-templates select="type"/>
       </xsl:element>
 


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