Support INTERNAL ONLY enums in doxygen/boostbook documenation. Refs #3242.

Patch by Mathias Gaunard.

[SVN r54818]
This commit is contained in:
Daniel James 2009-07-08 21:53:15 +00:00
parent 6d6b3c9e54
commit b50982a373
2 changed files with 27 additions and 13 deletions

View File

@ -22,6 +22,9 @@ namespace example
static const int static_const_integer; static const int static_const_integer;
enum class_enum { enumerator }; enum class_enum { enumerator };
/// INTERNAL ONLY
enum internal_enum { internal_enumerator };
protected: protected:
int protected_integer; int protected_integer;
static int protected_static_integer; static int protected_static_integer;

View File

@ -292,21 +292,32 @@
</xsl:template> </xsl:template>
<xsl:template match="enumvalue"> <xsl:template match="enumvalue">
<enumvalue> <xsl:choose>
<xsl:attribute name="name"> <!-- If the string INTERNAL ONLY is in the description, don't
<xsl:value-of select="name"/> emit this entity. This hack is necessary because Doxygen doesn't
</xsl:attribute> 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"> <xsl:if test="initializer">
<default> <default>
<xsl:apply-templates select="initializer" mode="passthrough"/> <xsl:apply-templates select="initializer" mode="passthrough"/>
</default> </default>
</xsl:if> </xsl:if>
<xsl:apply-templates select="briefdescription" mode="passthrough"/> <xsl:apply-templates select="briefdescription" mode="passthrough"/>
<xsl:apply-templates select="detaileddescription" mode="passthrough"/> <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
<xsl:apply-templates select="inbodydescription" mode="passthrough"/> <xsl:apply-templates select="inbodydescription" mode="passthrough"/>
</enumvalue> </enumvalue>
</xsl:otherwise>
</xsl:choose>
</xsl:template> </xsl:template>
<xsl:template name="doxygen.include.header.rec"> <xsl:template name="doxygen.include.header.rec">