From e6918187568dbd01842d8d1d2c808ce16a894239 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:54:28 +0200 Subject: Adding upstream version 18.2.2. Signed-off-by: Daniel Baumann --- src/boost/tools/boostbook/test/doxygen/Jamfile.v2 | 41 ++++ .../tools/boostbook/test/doxygen/autodoc.gold | 113 ++++++++++ .../tools/boostbook/test/doxygen/boost/example.hpp | 233 +++++++++++++++++++++ src/boost/tools/boostbook/test/doxygen/example.xml | 13 ++ 4 files changed, 400 insertions(+) create mode 100644 src/boost/tools/boostbook/test/doxygen/Jamfile.v2 create mode 100644 src/boost/tools/boostbook/test/doxygen/autodoc.gold create mode 100644 src/boost/tools/boostbook/test/doxygen/boost/example.hpp create mode 100644 src/boost/tools/boostbook/test/doxygen/example.xml (limited to 'src/boost/tools/boostbook/test/doxygen') diff --git a/src/boost/tools/boostbook/test/doxygen/Jamfile.v2 b/src/boost/tools/boostbook/test/doxygen/Jamfile.v2 new file mode 100644 index 000000000..d9f34f046 --- /dev/null +++ b/src/boost/tools/boostbook/test/doxygen/Jamfile.v2 @@ -0,0 +1,41 @@ + +# Copyright 2009 Daniel James. +# 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) + +using boostbook ; +using doxygen ; +import os ; + +doxygen autodoc + : + [ glob boost/*.hpp ] + : + "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 + : + boost.root=../../../../.. + autodoc + ; diff --git a/src/boost/tools/boostbook/test/doxygen/autodoc.gold b/src/boost/tools/boostbook/test/doxygen/autodoc.gold new file mode 100644 index 000000000..58434b12f --- /dev/null +++ b/src/boost/tools/boostbook/test/doxygen/autodoc.gold @@ -0,0 +1,113 @@ + +Example Reference
+ +Documentation for class example. Detailed documentationvoid class_code_sample(); + int + +This type has documentation. int +This type has documentation. long +This type has documentation. long double +short +double +int +int +const int +int +const int + +int +int +int +intintdefault_value +intint(*)()volatile char +intchar *")"volatile char +intchar *"("volatile char +intchar'('volatile char +intchar')'volatile char +intint(*)()volatile char +intchar *")"volatile char +intchar *"("volatile char +intchar'('volatile char +intchar')'volatile char +void +void +void +void +void +void +void +void +void +void +int + +example const & +example &example const & + +int +int + +Test some doxygen markupThis is just an example. +Embedded docbook list: +12 +Special Bold Typewriter Italics emphasis parameter +Arg1 first argument. +Arg2 second argument. + + +First list item. +Second list item + +Line 1 +Line 2void foo() {} +void foo2() {} +void bar() {} + +void bar2() {} +Alternative way of writing code, has a complicated workaround because doxygen treats the empty line as a paragraph separator: +int bar(); + +int bar2(); +Unfortunately the workaround will merge consecutive blocks, like this: +int foo(); + + + +int foo2(); + +T * + +A constructor. +A destructor. +unspecifiedconst specialization_test &An assignment operator. + +int +int +const int +const int +voidintParameter description. +void function_code_sample(); + +intintA 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 +voidTesting a function template. + + +Documentation for macro example. +
+
\ No newline at end of file diff --git a/src/boost/tools/boostbook/test/doxygen/boost/example.hpp b/src/boost/tools/boostbook/test/doxygen/boost/example.hpp new file mode 100644 index 000000000..9b32da0bd --- /dev/null +++ b/src/boost/tools/boostbook/test/doxygen/boost/example.hpp @@ -0,0 +1,233 @@ + +// Copyright 2009 Daniel James. +// 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) + +/*! + \class example::example + + \brief Documentation for class example + + Detailed documentation + + \code{.cpp} + void class_code_sample(); + \endcode + */ + +/*! + \def EXAMPLE + + \brief Documentation for macro example + */ + +int global_integer; +static int global_static_integer; +const int global_const_integer = 1; +static const int global_static_const_integer = 2; +enum global_enum { enumerator1 = 1, enumerator2 }; + +namespace example +{ + /*! + + \param x Parameter description. + + \code{.cpp} + void function_code_sample(); + \endcode + */ + void free_function(int x); + + int namespace_integer; + static int namespace_static_integer; + const int namespace_const_integer = 1; + static const int namespace_static_const_integer = 2; + enum namespace_enum { enumerator }; + + class example + { + public: + example(example const&) = default; + example& operator=(example const&) = delete; + virtual int virtual_method(); + virtual int virtual_abstract_method() = 0; + virtual int virtual_const_method() const; + int method_with_default_value(int = default_value); + + int method_with_fp(int (*fp)(), volatile char); + int method_with_string_default1(char* = ")", volatile char); + int method_with_string_default2(char* = "(", volatile char); + int method_with_char_default1(char = '(', volatile char); + int method_with_char_default2(char = ')', volatile char); + + int volatile_method_with_fp(int (*fp)(), volatile char) volatile; + int volatile_method_with_string_default1(char* = ")", volatile char) volatile; + int volatile_method_with_string_default2(char* = "(", volatile char) volatile; + int volatile_method_with_char_default1(char = '(', volatile char) volatile; + int volatile_method_with_char_default2(char = ')', volatile char) volatile; + + void const_method() const; + void volatile_method() volatile; + + void trad_noexcept() noexcept; + void trad_noexcept_if() noexcept(a == b && (c || d)); + void boost_noexcept() BOOST_NOEXCEPT; + void boost_noexcept_if() BOOST_NOEXCEPT_IF(a == b && (c || d)); + + void trad_constexpr() constexpr; + void boost_constexpr() BOOST_CONSTEXPR; + void boost_constexpr_or_const() BOOST_CONSTEXPR_OR_CONST; + + void constexpr_noexcept() constexpr noexcept; + + static int static_method(); + static int static_constexpr() constexpr; + + int integer; + static int static_integer; + mutable int mutable_integer; + const int const_integer; + static const int static_const_integer; + + // Visual check of typedef alignment. + /** This type has documentation. */ + typedef int documented_type1; + /** \brief This type has documentation. */ + typedef long documented_type2; + /** This type has documentation. */ + typedef long double documented_type3; + typedef short undocumented_type1; + typedef double undocumented_type2; + + class inner_class { + public: + int x; + }; + + enum class_enum { enumerator }; + + /// INTERNAL ONLY + enum internal_enum { internal_enumerator }; + + explicit operator int(); + protected: + int protected_integer; + static int protected_static_integer; + mutable int protected_mutable_integer; + const int protected_const_integer; + static const int protected_static_const_integer; + + enum protected_class_enum { enumerator2 }; + private: + int private_integer; + static int private_static_integer; + mutable int private_mutable_integer; + const int private_const_integer; + static const int private_static_const_integer; + + enum private_class_enum { enumerator3 }; + }; + + /** + * Test some doxygen markup + * + * \warning This is just an example. + * + * Embedded docbook list: + * + * \xmlonly + * 12 + * \endxmlonly + * + * \a Special \b Bold \c Typewriter \e Italics \em emphasis \p parameter + * + * \arg Arg1 first argument. + * \arg Arg2 second argument. + * + * \li First list item. + * \li Second list item + * + * Line 1\n + * Line 2 + * + * \code + * void foo() {} + * void foo2() {} + * \endcode + * + * \code + * void bar() {} + * + * void bar2() {} + * \endcode + * + * Alternative way of writing code, has a complicated workaround + * because doxygen treats the empty line as a paragraph + * separator: + * + *
+     * int bar();
+     *
+     * int bar2();
+     * 
+ * + * Unfortunately the workaround will merge consecutive blocks, + * like this: + * + *
+     * int foo();
+     * 
+ * + *
+     * int foo2();
+     * 
+ * + * \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); + + /** + * Testing a function template. + * \tparam TypeParameter A template parameter + * \tparam NonTypeParameter This is a non-type template parameter + */ + template + void namespace_func_template(); + + template + struct specialization_test { + }; + + template + struct specialization_test { + /** A constructor. */ + specialization_test(); + /** A destructor. */ + ~specialization_test(); + /** An assignment operator. */ + detail::unspecified& operator=(const specialization_test&); + }; +} + +#define EXAMPLE(m) The macro diff --git a/src/boost/tools/boostbook/test/doxygen/example.xml b/src/boost/tools/boostbook/test/doxygen/example.xml new file mode 100644 index 000000000..1858ce4c8 --- /dev/null +++ b/src/boost/tools/boostbook/test/doxygen/example.xml @@ -0,0 +1,13 @@ + + + + + + +Example + + -- cgit v1.2.3