Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-05-05 07:37:50


Author: danieljames
Date: 2008-05-05 07:37:50 EDT (Mon, 05 May 2008)
New Revision: 45133
URL: http://svn.boost.org/trac/boost/changeset/45133

Log:
Support for function parameter packs.

Text files modified:
   branches/doc/tools/boostbook/doc/reference.dtdxml | 7 ++++++-
   branches/doc/tools/boostbook/doc/reference.xml | 1 +
   branches/doc/tools/boostbook/xsl/function.xsl | 7 ++++++-
   3 files changed, 13 insertions(+), 2 deletions(-)

Modified: branches/doc/tools/boostbook/doc/reference.dtdxml
==============================================================================
--- branches/doc/tools/boostbook/doc/reference.dtdxml (original)
+++ branches/doc/tools/boostbook/doc/reference.dtdxml 2008-05-05 07:37:50 EDT (Mon, 05 May 2008)
@@ -2165,11 +2165,16 @@
 
 <attlist name="parameter">
 <attdecl>
- name CDATA #IMPLIED</attdecl>
+ name CDATA #IMPLIED
+ pack CDATA #IMPLIED</attdecl>
 <attribute name="name"
            type="#IMPLIED"
            value="CDATA"
            default=""/>
+<attribute name="pack"
+ type="#IMPLIED"
+ value="CDATA"
+ default=""/>
 </attlist>
 
 <element name="signature"

Modified: branches/doc/tools/boostbook/doc/reference.xml
==============================================================================
--- branches/doc/tools/boostbook/doc/reference.xml (original)
+++ branches/doc/tools/boostbook/doc/reference.xml 2008-05-05 07:37:50 EDT (Mon, 05 May 2008)
@@ -1807,6 +1807,7 @@
           <tbody>
 
 <row><entry>name</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>The name of the element being declared to referenced</entry></row>
+<row><entry>pack</entry><entry>#IMPLIED</entry><entry>CDATA</entry><entry>Set to '1' if the parameter is a parameter pack.</entry></row>
 </tbody>
         </tgroup>
       </informaltable>

Modified: branches/doc/tools/boostbook/xsl/function.xsl
==============================================================================
--- branches/doc/tools/boostbook/xsl/function.xsl (original)
+++ branches/doc/tools/boostbook/xsl/function.xsl 2008-05-05 07:37:50 EDT (Mon, 05 May 2008)
@@ -363,6 +363,9 @@
     <xsl:if test="$parameters">
       <!-- Information for this parameter -->
       <xsl:variable name="parameter" select="$parameters[position()=1]"/>
+ <xsl:variable name="pack">
+ <xsl:if test="$parameter/@pack=1"><xsl:text>...</xsl:text></xsl:if>
+ </xsl:variable>
       <xsl:variable name="name">
         <xsl:if test="$include-names and $parameter/@name != ''">
           <xsl:text> </xsl:text><xsl:value-of select="$parameter/@name"/>
@@ -393,7 +396,7 @@
         </xsl:choose>
       </xsl:variable>
 
- <xsl:variable name="text" select="concat($type, $name, $default)"/>
+ <xsl:variable name="text" select="concat($type, $pack, $name, $default)"/>
 
       <xsl:variable name="end-column"
         select="$column + string-length($prefix) + string-length($text)"/>
@@ -410,6 +413,7 @@
                 mode="annotation">
                 <xsl:with-param name="highlight" select="true()"/>
               </xsl:apply-templates>
+ <xsl:value-of select="$pack"/>
               <xsl:value-of select="$name"/>
               <xsl:copy-of select="$default"/>
             </xsl:when>
@@ -446,6 +450,7 @@
                 mode="annotation">
                 <xsl:with-param name="highlight" select="true()"/>
               </xsl:apply-templates>
+ <xsl:value-of select="$pack"/>
               <xsl:value-of select="$name"/>
               <xsl:value-of select="$default"/>
             </xsl:when>


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