|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r84302 - in branches/release/tools/boostbook: . test test/doxygen test/doxygen/boost test/more xsl/doxygen
From: dnljms_at_[hidden]
Date: 2013-05-16 17:39:34
Author: danieljames
Date: 2013-05-16 17:39:33 EDT (Thu, 16 May 2013)
New Revision: 84302
URL: http://svn.boost.org/trac/boost/changeset/84302
Log:
Merge some boostbook changes from trunk. Fixes #5480.
The default/delete support, plus fix/update tests.
Properties modified:
branches/release/tools/boostbook/ (props changed)
Text files modified:
branches/release/tools/boostbook/test/Jamfile.v2 | 2 +-
branches/release/tools/boostbook/test/doxygen/autodoc.gold | 4 ++--
branches/release/tools/boostbook/test/doxygen/boost/example.hpp | 3 +++
branches/release/tools/boostbook/test/more/run-tests.py | 16 +++++++++-------
branches/release/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl | 17 +++++++++++++++--
5 files changed, 30 insertions(+), 12 deletions(-)
Modified: branches/release/tools/boostbook/test/Jamfile.v2
==============================================================================
--- branches/release/tools/boostbook/test/Jamfile.v2 (original)
+++ branches/release/tools/boostbook/test/Jamfile.v2 2013-05-16 17:39:33 EDT (Thu, 16 May 2013)
@@ -4,7 +4,7 @@
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
-project boost/test ;
+project /boost/boostbook/test ;
import boostbook : boostbook ;
boostbook alt : alt.xml :
Modified: branches/release/tools/boostbook/test/doxygen/autodoc.gold
==============================================================================
--- branches/release/tools/boostbook/test/doxygen/autodoc.gold (original)
+++ branches/release/tools/boostbook/test/doxygen/autodoc.gold 2013-05-16 17:39:33 EDT (Thu, 16 May 2013)
@@ -1,5 +1,5 @@
<?xml version="1.0" standalone="yes"?>
-<library-reference id="example_reference"><title>Example Reference</title><header name="boost/example.hpp"><namespace name="example"><class name="example"><purpose>Documentation for class example. </purpose><class name="inner_class"><data-member name="x"><type>int</type></data-member></class><enum name="class_enum"><enumvalue name="enumerator"/></enum><typedef name="documented_type1"><description><para>This type has documentation. </para></description><type>int</type></typedef><typedef name="documented_type2"><purpose>This type has documentation. </purpose><type>long</type></typedef><typedef name="documented_type3"><description><para>This type has documentation. </para></description><type>long double</type></typedef><typedef name="undocumented_type1"><type>short</type></typedef><typedef name="undocumented_type2"><type>double</type></typedef><data-member name="integer"><type>int</type></data-member><data-member name="mutable_integer" specifiers="mutable"><type>int</type></data-member><data-member name="const
_integer"><type>const int</type></data-member><data-member name="static_integer" specifiers="static"><type>int</type></data-member><data-member name="static_const_integer" specifiers="static"><type>const int</type></data-member><method-group name="public member functions"><method name="conversion-operator" cv="" specifiers="explicit"><type>int</type></method></method-group></class><struct name="example_template"><template>
+<library-reference id="example_reference"><title>Example Reference</title><header name="boost/example.hpp"><namespace name="example"><class name="example"><purpose>Documentation for class example. </purpose><class name="inner_class"><data-member name="x"><type>int</type></data-member></class><enum name="class_enum"><enumvalue name="enumerator"/></enum><typedef name="documented_type1"><description><para>This type has documentation. </para></description><type>int</type></typedef><typedef name="documented_type2"><purpose>This type has documentation. </purpose><type>long</type></typedef><typedef name="documented_type3"><description><para>This type has documentation. </para></description><type>long double</type></typedef><typedef name="undocumented_type1"><type>short</type></typedef><typedef name="undocumented_type2"><type>double</type></typedef><data-member name="integer"><type>int</type></data-member><data-member name="mutable_integer" specifiers="mutable"><type>int</type></data-member><data-member name="const
_integer"><type>const int</type></data-member><data-member name="static_integer" specifiers="static"><type>int</type></data-member><data-member name="static_const_integer" specifiers="static"><type>const int</type></data-member><method-group name="public member functions"><method name="conversion-operator" cv="" specifiers="explicit"><type>int</type></method></method-group><constructor cv="= default"><parameter name=""><paramtype><classname>example</classname> const &</paramtype></parameter></constructor><copy-assignment cv="= delete"><parameter name=""><paramtype><classname>example</classname> const &</paramtype></parameter></copy-assignment></class><struct name="example_template"><template>
<template-type-parameter name="TypeParameter"><purpose><para>A template parameter </para></purpose></template-type-parameter>
<template-nontype-parameter name="NonTypeParameter"><type>int</type><purpose><para>This is a non-type template parameter </para></purpose></template-nontype-parameter>
<template-type-parameter name="TypeParameterWithDefault"><default>int</default><purpose><para>This is a template parameter with a default argument </para></purpose></template-type-parameter>
@@ -21,7 +21,7 @@
<template-type-parameter name="T"/>
</template></struct><struct-specialization name="specialization_test"><template>
<template-type-parameter name="T"/>
- </template><specialization><template-arg>T *</template-arg></specialization><method-group name="public member functions"/><constructor><description><para>A constructor. </para></description></constructor><destructor><description><para>A destructor. </para></description></destructor><copy-assignment><parameter name=""><paramtype>const <classname>specialization_test</classname> &</paramtype></parameter><description><para>An assignment operator. </para></description></copy-assignment></struct-specialization><enum name="namespace_enum"><enumvalue name="enumerator"/></enum><data-member name="namespace_integer"><type>int</type></data-member><data-member name="namespace_static_integer" specifiers="static"><type>int</type></data-member><data-member name="namespace_const_integer"><type>const int</type></data-member><data-member name="namespace_static_const_integer" specifiers="static"><type>const int</type></data-member><function name="namespace_func"><type>int</type><parameter name="i"><paramtype>int</param
type><description><para>A function parameter </para></description></parameter><parameter name="j"><paramtype>int</paramtype><description><para>Another </para></description></parameter><description><para>
+ </template><specialization><template-arg>T *</template-arg></specialization><method-group name="public member functions"/><constructor><description><para>A constructor. </para></description></constructor><destructor><description><para>A destructor. </para></description></destructor><copy-assignment cv=""><parameter name=""><paramtype>const <classname>specialization_test</classname> &</paramtype></parameter><description><para>An assignment operator. </para></description></copy-assignment></struct-specialization><enum name="namespace_enum"><enumvalue name="enumerator"/></enum><data-member name="namespace_integer"><type>int</type></data-member><data-member name="namespace_static_integer" specifiers="static"><type>int</type></data-member><data-member name="namespace_const_integer"><type>const int</type></data-member><data-member name="namespace_static_const_integer" specifiers="static"><type>const int</type></data-member><function name="namespace_func"><type>int</type><parameter name="i"><paramtype>int<
/paramtype><description><para>A function parameter </para></description></parameter><parameter name="j"><paramtype>int</paramtype><description><para>Another </para></description></parameter><description><para>
This is a test function. <classname alt="example::example">Link to class</classname> <classname alt="example::example_template">Link to class template</classname> <note><para>This is a note.</para></note>
Modified: branches/release/tools/boostbook/test/doxygen/boost/example.hpp
==============================================================================
--- branches/release/tools/boostbook/test/doxygen/boost/example.hpp (original)
+++ branches/release/tools/boostbook/test/doxygen/boost/example.hpp 2013-05-16 17:39:33 EDT (Thu, 16 May 2013)
@@ -32,6 +32,9 @@
class example
{
public:
+ example(example const&) = default;
+ example& operator=(example const&) = delete;
+
int integer;
static int static_integer;
mutable int mutable_integer;
Modified: branches/release/tools/boostbook/test/more/run-tests.py
==============================================================================
--- branches/release/tools/boostbook/test/more/run-tests.py (original)
+++ branches/release/tools/boostbook/test/more/run-tests.py 2013-05-16 17:39:33 EDT (Thu, 16 May 2013)
@@ -12,6 +12,7 @@
import difflib, getopt, os, re, sys
import lxml.ElementInclude
from lxml import etree
+from collections import defaultdict
# Globals
@@ -82,7 +83,7 @@
def normalize_boostbook_ids(doc):
ids = {}
- id_bases = {}
+ id_bases = defaultdict(int)
for node in doc.xpath("//*[starts-with(@id, 'id') or contains(@id, '_id')]"):
id = node.get('id')
@@ -90,13 +91,14 @@
if(id in ids):
print 'Duplicate id: ' + id
- match = re.match("(id|.+_id)([mp]?\d+)((?:-bb)?)", id)
+ match = re.match("(.+_id|id)([mp]?\d+)((?:-bb)?)", id)
if(match):
- count = 1
- if(match.group(1) in id_bases):
- count = id_bases[match.group(1)] + 1
- id_bases[match.group(1)] = count
- ids[id] = match.group(1) + str(count) + match.group(3)
+ # Truncate id name, as it sometimes has different lengths...
+ match2 = re.match("(.*?)([^.]*?)(_?id)", match.group(1))
+ base = match2.group(1) + match2.group(2)[:14] + match2.group(3)
+ count = id_bases[base] + 1
+ id_bases[base] = count
+ ids[id] = base + str(count) + match.group(3)
for node in doc.xpath("//*[@linkend or @id]"):
x = node.get('linkend')
Modified: branches/release/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl
==============================================================================
--- branches/release/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl (original)
+++ branches/release/tools/boostbook/xsl/doxygen/doxygen2boostbook.xsl 2013-05-16 17:39:33 EDT (Thu, 16 May 2013)
@@ -51,6 +51,19 @@
<xsl:key name="compounds-by-id" match="compounddef" use="@id"/>
<xsl:key name="members-by-id" match="memberdef" use="@id" />
+ <!-- Add trailing slash to formuladir if missing -->
+
+ <xsl:variable name="boost.doxygen.formuladir.fixed">
+ <xsl:choose>
+ <xsl:when test="substring(boost.doxygen.formuladir, string-length(boost.doxygen.formuladir) - 1) = '/'">
+ <xsl:value-of select="$boost.doxygen.formuladir" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat($boost.doxygen.formuladir, '/')" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<xsl:strip-space elements="briefdescription detaileddescription inbodydescription"/>
<xsl:template name="kind-error-message">
@@ -1657,7 +1670,7 @@
<imageobject role="html">
<imagedata format="PNG" align="center">
<xsl:attribute name="fileref">
- <xsl:value-of select="concat(concat(concat($boost.doxygen.formuladir, 'form_'), @id), '.png')"/>
+ <xsl:value-of select="concat(concat(concat($boost.doxygen.formuladir.fixed, 'form_'), @id), '.png')"/>
</xsl:attribute>
</imagedata>
</imageobject>
@@ -1678,7 +1691,7 @@
<imageobject role="html">
<imagedata format="PNG">
<xsl:attribute name="fileref">
- <xsl:value-of select="concat(concat(concat($boost.doxygen.formuladir, 'form_'), @id), '.png')"/>
+ <xsl:value-of select="concat(concat(concat($boost.doxygen.formuladir.fixed, 'form_'), @id), '.png')"/>
</xsl:attribute>
</imagedata>
</imageobject>
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