|
Boost-Commit : |
From: fmhess_at_[hidden]
Date: 2007-09-13 17:51:36
Author: fmhess
Date: 2007-09-13 17:51:35 EDT (Thu, 13 Sep 2007)
New Revision: 39250
URL: http://svn.boost.org/trac/boost/changeset/39250
Log:
Added emission of reference documentation for typedefs inside
classes.
Text files modified:
sandbox/boost_docs/trunk/tools/boostbook/xsl/reference.xsl | 4 +-
sandbox/boost_docs/trunk/tools/boostbook/xsl/type.xsl | 72 +++++++++++++++++++++++++++++++++++++--
2 files changed, 70 insertions(+), 6 deletions(-)
Modified: sandbox/boost_docs/trunk/tools/boostbook/xsl/reference.xsl
==============================================================================
--- sandbox/boost_docs/trunk/tools/boostbook/xsl/reference.xsl (original)
+++ sandbox/boost_docs/trunk/tools/boostbook/xsl/reference.xsl 2007-09-13 17:51:35 EDT (Thu, 13 Sep 2007)
@@ -83,14 +83,14 @@
<!-- Emit namespace reference -->
<xsl:template match="namespace" mode="reference">
- <xsl:apply-templates select="namespace|typedef|free-function-group"
+ <xsl:apply-templates select="namespace|free-function-group"
mode="reference">
<xsl:with-param name="indentation" select="0"/>
</xsl:apply-templates>
<xsl:apply-templates select="class|class-specialization|
struct|struct-specialization|
union|union-specialization|enum|function|
- overloaded-function|data-member"
+ overloaded-function|data-member|typedef"
mode="namespace-reference"/>
</xsl:template>
Modified: sandbox/boost_docs/trunk/tools/boostbook/xsl/type.xsl
==============================================================================
--- sandbox/boost_docs/trunk/tools/boostbook/xsl/type.xsl (original)
+++ sandbox/boost_docs/trunk/tools/boostbook/xsl/type.xsl 2007-09-13 17:51:35 EDT (Thu, 13 Sep 2007)
@@ -379,7 +379,7 @@
</xsl:template>
<!-- Emit a typedef reference entry -->
- <xsl:template match="typedef" mode="reference">
+ <xsl:template match="typedef" mode="namespace-reference">
<!-- True if this typedef was compacted -->
<xsl:variable name="compact"
select="not (para|description) and ($boost.compact.typedef='1')"/>
@@ -412,6 +412,28 @@
</xsl:if>
</xsl:template>
+ <xsl:template match="typedef" mode="reference">
+ <!-- True if this typedef was compacted -->
+ <xsl:variable name="compact"
+ select="not (para|description) and ($boost.compact.typedef='1')"/>
+
+ <xsl:if test="not ($compact)">
+ <listitem>
+ <para>
+ <xsl:call-template name="type.typedef.display.aligned">
+ <xsl:with-param name="compact" select="false()"/>
+ <xsl:with-param name="indentation" select="0"/>
+ <xsl:with-param name="is-reference" select="true()"/>
+ <xsl:with-param name="link-type" select="'anchor'"/>
+ </xsl:call-template>
+ </para>
+ <para>
+ <xsl:apply-templates select="description"/>
+ </para>
+ </listitem>
+ </xsl:if>
+ </xsl:template>
+
<!-- Emit a list of static constants -->
<xsl:template match="static-constant" mode="synopsis">
<xsl:param name="indentation"/>
@@ -698,9 +720,16 @@
<xsl:call-template name="indent">
<xsl:with-param name="indentation" select="$indentation + 2"/>
</xsl:call-template>
- <xsl:call-template name="highlight-comment">
- <xsl:with-param name="text" select="'// types'"/>
- </xsl:call-template>
+ <emphasis>
+ <xsl:text>// </xsl:text>
+ <xsl:call-template name="internal-link">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ <xsl:text>types</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="'types'"/>
+ </xsl:call-template>
+ </emphasis>
<xsl:variable name="max-type-length">
<xsl:call-template name="find-max-type-length"/>
@@ -900,7 +929,42 @@
</xsl:call-template>
</xsl:template>
+ <xsl:template name="member-typedefs-reference">
+ <!-- True if there are any non-compacted typedefs -->
+ <xsl:variable name="have-typedef-references"
+ select="typedef and ((typedef/para|typedef/description) or ($boost.compact.typedef='0'))"/>
+ <xsl:if test="$have-typedef-references">
+ <xsl:call-template name="member-documentation">
+ <xsl:with-param name="name">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="to">
+ <xsl:call-template name="generate.id"/>
+ <xsl:text>types</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="text" select="''"/>
+ </xsl:call-template>
+ <xsl:call-template name="monospaced">
+ <xsl:with-param name="text">
+ <xsl:call-template name="object-name"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="access-name"/>
+ <xsl:text> types</xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="text">
+ <orderedlist>
+ <xsl:apply-templates select="typedef" mode="reference"/>
+ </orderedlist>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
<xsl:template name="class-members-reference">
+
+ <xsl:call-template name="member-typedefs-reference"/>
+
<xsl:call-template name="construct-copy-destruct-reference"/>
<xsl:apply-templates
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