$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r79657 - in trunk/tools/boostbook: test/more/tests/ref xsl
From: dnljms_at_[hidden]
Date: 2012-07-22 03:17:56
Author: danieljames
Date: 2012-07-22 03:17:55 EDT (Sun, 22 Jul 2012)
New Revision: 79657
URL: http://svn.boost.org/trac/boost/changeset/79657
Log:
Boostbook: Fix `methodname` for `operator()`.
Added:
   trunk/tools/boostbook/test/more/tests/ref/
   trunk/tools/boostbook/test/more/tests/ref/methodname.gold   (contents, props changed)
   trunk/tools/boostbook/test/more/tests/ref/methodname.xml   (contents, props changed)
Text files modified: 
   trunk/tools/boostbook/xsl/annotation.xsl |     4 ++++                                    
   1 files changed, 4 insertions(+), 0 deletions(-)
Added: trunk/tools/boostbook/test/more/tests/ref/methodname.gold
==============================================================================
--- (empty file)
+++ trunk/tools/boostbook/test/more/tests/ref/methodname.gold	2012-07-22 03:17:55 EDT (Sun, 22 Jul 2012)
@@ -0,0 +1,26 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<chapter id="method">
+  <title>Methodname Test</title>
+  <section id="links">
+    <para>
+      <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="id1-bb">thing::foo::bar</link></computeroutput>,
+      <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="id1-bb">thing::foo::bar(int x)</link></computeroutput>,
+      <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="id2-bb">thing::foo::operator()</link></computeroutput>,
+      <computeroutput xmlns:xi="http://www.w3.org/2001/XInclude"><link linkend="id2-bb">thing::foo::operator()(int x)</link></computeroutput>.
+    </para>
+  </section>
+  <section id="method.reference"><title>Reference</title>
+    <section id="header.boost.unordered_set_hpp"><title>Header <<ulink url="../../boost/unordered_set.hpp">boost/unordered_set.hpp</ulink>></title><synopsis xmlns:xi="http://www.w3.org/2001/XInclude"><phrase role="keyword">namespace</phrase> <phrase role="identifier">thing</phrase> <phrase role="special">{</phrase>
+  <phrase role="keyword">class</phrase> <link linkend="thing.foo">foo</link><phrase role="special">;</phrase>
+<phrase role="special">}</phrase></synopsis>
+      <refentry xmlns:xi="http://www.w3.org/2001/XInclude" id="thing.foo"><refmeta><refentrytitle>Class foo</refentrytitle><manvolnum>3</manvolnum></refmeta><refnamediv><refname>thing::foo</refname><refpurpose/></refnamediv><refsynopsisdiv><synopsis><phrase role="comment">// In header: <<link linkend="header.boost.unordered_set_hpp">boost/unordered_set.hpp</link>>
+
+</phrase>
+<phrase role="keyword">class</phrase> <link linkend="thing.foo">foo</link> <phrase role="special">{</phrase>
+<phrase role="keyword">public</phrase><phrase role="special">:</phrase>
+  <phrase role="keyword">void</phrase> <link linkend="id1-bb"><phrase role="identifier">bar</phrase></link><phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
+  <phrase role="keyword">void</phrase> <link linkend="id2-bb"><phrase role="keyword">operator</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase></link><phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase><phrase role="special">;</phrase></synopsis></refsynopsisdiv><refsect1><title>Description</title><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id1-bb"/><phrase role="identifier">bar</phrase><phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para><para><literallayout class="monospaced"><phrase role="keyword">void</phrase> <anchor id="id2-bb"/><phrase role="keyword">operator</phrase><phrase role="special">(</phrase><phrase role="special">)</phrase><phrase role="special">(</phrase><phrase role="keyword">int</phrase><phrase role="special">)</phrase><phrase role="special">;</phrase></literallayout></para></refsect1></refentry>
+    </section>
+  </section>
+</chapter>
\ No newline at end of file
Added: trunk/tools/boostbook/test/more/tests/ref/methodname.xml
==============================================================================
--- (empty file)
+++ trunk/tools/boostbook/test/more/tests/ref/methodname.xml	2012-07-22 03:17:55 EDT (Sun, 22 Jul 2012)
@@ -0,0 +1,36 @@
+<!--
+Copyright Daniel James 2012
+Distributed under the Boost Software License, Version 1.0. (See accompanying
+file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+-->
+<library name="Methodname Test" id="method">
+  <title>Methodname Test</title>
+  <section id="links">
+    <para>
+      <methodname>thing::foo::bar</methodname>,
+      <methodname>thing::foo::bar(int x)</methodname>,
+      <methodname>thing::foo::operator()</methodname>,
+      <methodname>thing::foo::operator()(int x)</methodname>.
+    </para>
+  </section>
+  <library-reference>
+    <header name="boost/unordered_set.hpp">
+      <namespace name="thing">
+        <class name="foo">
+          <method name="bar">
+            <parameter>
+              <paramtype>int</paramtype>
+            </parameter>
+            <type>void</type>
+          </method>
+          <method name="operator()">
+            <parameter>
+              <paramtype>int</paramtype>
+            </parameter>
+            <type>void</type>
+          </method>
+        </class>
+      </namespace>
+    </header>
+  </library-reference>
+</library>
\ No newline at end of file
Modified: trunk/tools/boostbook/xsl/annotation.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/annotation.xsl	(original)
+++ trunk/tools/boostbook/xsl/annotation.xsl	2012-07-22 03:17:55 EDT (Sun, 22 Jul 2012)
@@ -116,6 +116,10 @@
     <!-- Strip off any call -->
     <xsl:variable name="name">
       <xsl:choose>
+        <xsl:when test="contains($fullname, 'operator()')">
+          <xsl:value-of select="substring-before($fullname, 'operator()')"/>
+          <xsl:value-of select="'operator()'"/>
+        </xsl:when>
         <xsl:when test="contains($fullname, '(')">
           <xsl:value-of select="substring-before($fullname, '(')"/>
         </xsl:when>