mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-09 15:03:57 +00:00
Boostbook: Fix methodname
for operator()
.
[SVN r79657]
This commit is contained in:
parent
dd7f4dedf5
commit
dfc72f6d44
26
test/more/tests/ref/methodname.gold
Normal file
26
test/more/tests/ref/methodname.gold
Normal file
@ -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>
|
36
test/more/tests/ref/methodname.xml
Normal file
36
test/more/tests/ref/methodname.xml
Normal file
@ -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>
|
@ -116,6 +116,10 @@
|
|||||||
<!-- Strip off any call -->
|
<!-- Strip off any call -->
|
||||||
<xsl:variable name="name">
|
<xsl:variable name="name">
|
||||||
<xsl:choose>
|
<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:when test="contains($fullname, '(')">
|
||||||
<xsl:value-of select="substring-before($fullname, '(')"/>
|
<xsl:value-of select="substring-before($fullname, '(')"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user