$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r54818 - in trunk/tools/boostbook: test/doxygen/boost xsl/doxygen
From: daniel_james_at_[hidden]
Date: 2009-07-08 17:53:16
Author: danieljames
Date: 2009-07-08 17:53:15 EDT (Wed, 08 Jul 2009)
New Revision: 54818
URL: http://svn.boost.org/trac/boost/changeset/54818
Log:
Support INTERNAL ONLY enums in doxygen/boostbook documenation. Refs #3242.
Patch by Mathias Gaunard.
Text files modified: 
   trunk/tools/boostbook/test/doxygen/boost/example.hpp    |     3 +++                                     
   trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl |    37 ++++++++++++++++++++++++-------------   
   2 files changed, 27 insertions(+), 13 deletions(-)
Modified: trunk/tools/boostbook/test/doxygen/boost/example.hpp
==============================================================================
--- trunk/tools/boostbook/test/doxygen/boost/example.hpp	(original)
+++ trunk/tools/boostbook/test/doxygen/boost/example.hpp	2009-07-08 17:53:15 EDT (Wed, 08 Jul 2009)
@@ -22,6 +22,9 @@
         static const int static_const_integer;
 
         enum class_enum { enumerator };
+        
+        /// INTERNAL ONLY
+        enum internal_enum { internal_enumerator };
     protected:
         int protected_integer;
         static int protected_static_integer;
Modified: trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl	(original)
+++ trunk/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl	2009-07-08 17:53:15 EDT (Wed, 08 Jul 2009)
@@ -292,21 +292,32 @@
   </xsl:template>
 
   <xsl:template match="enumvalue">
-    <enumvalue>
-      <xsl:attribute name="name">
-        <xsl:value-of select="name"/>
-      </xsl:attribute>
+    <xsl:choose>
+      <!-- If the string INTERNAL ONLY is in the description, don't
+           emit this entity. This hack is necessary because Doxygen doesn't
+           tell us what is \internal and what isn't. -->
+      <xsl:when test="contains(detaileddescription/para, 'INTERNAL ONLY')"/>
+      <xsl:when test="contains(briefdescription/para, 'INTERNAL ONLY')"/>
+      <xsl:when test="contains(inbodydescription/para, 'INTERNAL ONLY')"/>
+      <xsl:otherwise>
+  
+        <enumvalue>
+          <xsl:attribute name="name">
+            <xsl:value-of select="name"/>
+          </xsl:attribute>
 
-      <xsl:if test="initializer">
-        <default>
-          <xsl:apply-templates select="initializer" mode="passthrough"/>
-        </default>
-      </xsl:if>
+          <xsl:if test="initializer">
+            <default>
+              <xsl:apply-templates select="initializer" mode="passthrough"/>
+            </default>
+          </xsl:if>
 
-      <xsl:apply-templates select="briefdescription" mode="passthrough"/>
-      <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
-      <xsl:apply-templates select="inbodydescription" mode="passthrough"/>
-    </enumvalue>
+          <xsl:apply-templates select="briefdescription" mode="passthrough"/>
+          <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
+          <xsl:apply-templates select="inbodydescription" mode="passthrough"/>
+        </enumvalue>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:template>
 
   <xsl:template name="doxygen.include.header.rec">