From 697fae8883d33428e15b2dbf4591e02df599bc3d Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 11 May 2011 23:29:20 +0000 Subject: [PATCH] Boostbook: merge from trunk. - Handle more doxygen: \see, tparam, ref (for classes only). - Modify handling of note so it works for classes as well as functions. - Automate doxygen test. - Suppress inspect warning for directory name containing a dot. [SVN r71882] --- dtd/1.1/boost-no-inspect | 4 ++ test/doxygen/Jamfile.v2 | 19 ++++++++ test/doxygen/autodoc.gold | 24 ++++++++++ test/doxygen/boost/example.hpp | 18 ++++++++ test/more/tests/libs/array.gold | 4 +- xsl/doxygen/doxygen2boostbook.xsl | 77 +++++++++++++++++++++++++------ xsl/reference.xsl | 10 +++- xsl/template.xsl | 23 ++++++++- 8 files changed, 159 insertions(+), 20 deletions(-) create mode 100644 dtd/1.1/boost-no-inspect create mode 100644 test/doxygen/autodoc.gold diff --git a/dtd/1.1/boost-no-inspect b/dtd/1.1/boost-no-inspect new file mode 100644 index 0000000..37dfd21 --- /dev/null +++ b/dtd/1.1/boost-no-inspect @@ -0,0 +1,4 @@ +Inspect complains that this directory is called '1.1', but that's the +standard naming style for DTDs, and this needs to match the url of the +DTD on the website. Any platform which has problems with this domain +name probably won't be able to build the documentation anyway. \ No newline at end of file diff --git a/test/doxygen/Jamfile.v2 b/test/doxygen/Jamfile.v2 index 06cea38..df7c669 100644 --- a/test/doxygen/Jamfile.v2 +++ b/test/doxygen/Jamfile.v2 @@ -4,6 +4,7 @@ # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) import doxygen ; +import os ; doxygen autodoc : @@ -12,6 +13,24 @@ doxygen autodoc "boost.doxygen.reftitle=Example Reference" ; +if [ os.name ] = NT +{ + actions compare + { + comp /A $(>[1]) $(>[2]) && echo "Stamped" >$(<) + } + +} +else +{ + actions compare + { + diff -u -w $(>[1]) $(>[2]) && echo "Stamped" >$(<) + } +} + +make check : autodoc.xml autodoc.gold : @compare ; + boostbook standalone : example.xml diff --git a/test/doxygen/autodoc.gold b/test/doxygen/autodoc.gold new file mode 100644 index 0000000..9c63c18 --- /dev/null +++ b/test/doxygen/autodoc.gold @@ -0,0 +1,24 @@ + +Example Reference
Documentation for class example. intintintconst intintconst intTest some doxygen markupEmbedded docbook list: + 12 + Special Bold Typewriter Italics emphasis parameter +Arg1 first argument. +Arg2 second argument. + + +First list item. +Second list item + +Line 1 + Line 2 void foo() {} + +intintconst intconst intintintA function parameter intAnother + + +This is a test function. Link to class Link to class template This is a note. +See Also:example::example and example_template +i > jThe answer Documentation for macro example.
diff --git a/test/doxygen/boost/example.hpp b/test/doxygen/boost/example.hpp index f3b9acc..32949ea 100644 --- a/test/doxygen/boost/example.hpp +++ b/test/doxygen/boost/example.hpp @@ -89,11 +89,29 @@ namespace example * void foo() {} * \endcode * + * \tparam TypeParameter A template parameter + * \tparam NonTypeParameter This is a non-type template parameter + * \tparam TypeParameterWithDefault This is a template parameter with a default argument */ template struct example_template {}; + + /** + * \param i A function parameter + * \param j Another + * \return The answer + * \pre i > j + * + * This is a test function. + * \ref example::example "Link to class" + * \ref example_template "Link to class template" + * \note This is a note. + * + * \see example::example and example_template + */ + int namespace_func(int i, int j); } #define EXAMPLE(m) The macro diff --git a/test/more/tests/libs/array.gold b/test/more/tests/libs/array.gold index d8f8c7b..af19350 100644 --- a/test/more/tests/libs/array.gold +++ b/test/more/tests/libs/array.gold @@ -149,7 +149,9 @@ // modifiers void swap(array<T, N>&); void assign(const T&); - T elems[N]; + + // public data members + T elems[N]; }; // specialized algorithms diff --git a/xsl/doxygen/doxygen2boostbook.xsl b/xsl/doxygen/doxygen2boostbook.xsl index fce7289..dd78c25 100644 --- a/xsl/doxygen/doxygen2boostbook.xsl +++ b/xsl/doxygen/doxygen2boostbook.xsl @@ -566,6 +566,7 @@ + @@ -576,6 +577,13 @@ mode="passthrough"/> + + + + + + + @@ -1254,17 +1276,32 @@ not (@kind='return') and not (@kind='post') and not (@kind='attention') and - not (@kind='note')"> + not (@kind='see')"> + + + + + + + + + + See Also: + + + + + @@ -1315,7 +1352,20 @@ - + + + + + + + + + + + + + + @@ -1335,9 +1385,6 @@ - - - @@ -1353,8 +1400,8 @@ diff --git a/xsl/reference.xsl b/xsl/reference.xsl index 7e49984..b46e591 100644 --- a/xsl/reference.xsl +++ b/xsl/reference.xsl @@ -160,13 +160,19 @@ + select="$wrap and count(text()|*) = 1"/> - + + + + + + diff --git a/xsl/template.xsl b/xsl/template.xsl index c46d0dd..eee8439 100644 --- a/xsl/template.xsl +++ b/xsl/template.xsl @@ -285,11 +285,30 @@ + + + + + + + + // - + + + + + + + + + + // + +