100 Commits

Author SHA1 Message Date
Andrey Semashev
4e5a5ab0d3 Remove redundant spaces from return types and default values/types.
Doxygen generates extra spaces in some function return types (e.g. involving
a const reference) and template parameter defaults (in partucular, when
the default is formatted across multiple lines in the C++ source).
Normalize spaces in those cases.
2024-07-06 19:18:27 +03:00
Andrey Semashev
719af2337f Fix handling of multiple exception descriptions, support free form description.
When there are multiple \throws entries in a function documentation, the second
and further exception names were omitted from output and a combined description
was associated with the first exception. Fix this by producing separate
paragraphs, one per exception.

Additionally, support free form exception description when the exception type
is specified as "~". In this case, the exception name is not used, and the
entry description is used to initialize the paragraph in the output.

Updated test to verify these changes.
2024-07-06 17:39:23 +03:00
Andrey Semashev
c220a12c17 Convert \sa to <formalpara> instead of unnamed <para>.
This makes the entries after "See Also:" to be displayed inline rather
than starting from the next line. This is consistent with other kinds
of paragraphs generated from Doxygen output.
2024-07-06 15:12:18 +03:00
Andrey Semashev
8b5189e24e Conceal template parameter defaults that refer to implementation details.
Similar to other contexts, replace default types and values in template
parameter lists that mention implementation details, as configured in
boost.doxygen.detail parameter, with "unspecified".

This fixes dangling refs to implementation detail types and values that
were removed from BoostBook output but are still mentioned in template
parameter defaults.
2024-06-30 18:16:04 +03:00
Andrey Semashev
55bd25054b Add a workaround for duplicate ids if Doxygen inlines inherited class members.
When Doxygen option INLINE_INHERITED_MEMB=YES is used, Doxygen generates
duplicate class member definitions with the same ids, when the member is
inherited from a base class. This results in duplicate ids in BoostBook output
and the corresponding errors.

Work around this by checking if the member id starts with the id of the
enclosing class. If it does then the member is assumed to be a genuine member
of the class and we generate a Doxygen id for it. Doxygen refs will point to
this definition of the member. If the member id is different then it must be
an inherited member, and we don't generate a Doxygen id for it. BoostBook
stylesheets will generate a unique id for it, which will be used to link
synopsis to reference of the member in the derived class' documentation.
2024-06-30 17:50:44 +03:00
Andrey Semashev
03120084bb Pass through contents of parblock in Doxygen.
\parblock can be used to group multiple paragraps under a block command
that expects a single paragraph as argument (e.g. \returns). So just
forward the contents of the parblock in the current context.
2024-06-29 21:13:54 +03:00
Andrey Semashev
1198d50fd9 Add support for remarks and important blocks in Doxygen.
Convert \remark commands to <note> in BoostBook. Change \attention to
<important>, and also convert \important to <important>.
2024-06-29 19:57:46 +03:00
Andrey Semashev
f4f0e13720 Added id passthrough for headers. 2024-06-29 17:22:37 +03:00
Andrey Semashev
b1fef2e5b9 Support for Doxygen refs.
Produce id attributes for all entities generated by Doxygen. For refs,
generate link tags referencing those ids. Preface the ids with "doxygen."
prefix to avoid potential clashes with ids that may be present in other
places of the resulting DocBook document. Also add the document refid to
the prefix to avoid potential clashes between multiple Doxygen-generated
documents with SHORT_NAMES=YES.

In order to pass through the generated ids without modification (to keep
links working in the output), change generate.id template so that it
returns the value of the id attribute, if one is present, instead of
generating a new id.

The end result is that all references generated by Doxygen (to methods,
classes, variables and so on) propagate to the final HTML output instead
of being stripped during Doxygen to BoostBook translation.
2024-06-29 15:08:43 +03:00
Andrey Semashev
61ca6ef7d9 Fix missing members and functions in named groups in Doxygen output.
Previously, class members and free functions in sectiondef with
kind="user-defined" would be stripped from HTML output, making function
grouping effectively non-functional. This commit fixes this by converting
such sectiondefs to either method-group or free-function-group in BoostBook
output, depending on whether the grouping is within a class or namespace.

Additionally, previously constructors, destructors and assignment operators
were not allowed to be inside method-groups, which were another reason for
these members to be stripped from the output. This commit allows these members
in member-groups and modifies DTD accordingly.

Also, this fixes duplicate constructors, destructors and assignment operators
generated after the sections for public, private and protected member
functions. This was due to applying XSL templates twice - once when generating
method-group, and then after the method-group.
2024-05-13 15:55:20 +03:00
Andrey Semashev
5c1e683568 Fix duplicate equal signs in Doxygen-generated enum value initializers.
Doxygen 1.9.1 generates enum <initializer> tags with text starting with
an equal sign ('=') followed by the enum value initializer. This sign
was copied under the BoostBook <default> tag, and BoostBook styleseets
add an equal sign of their own when converting this tag to HTML. This
resulted in duplicate equal signs in the HTML output.

This commit strips the leading equal sign from the initializer before
putting it into the <default> tag.
2024-05-04 13:19:03 +03:00
Andrey Semashev
3c13dd7031 Fix missing noexcept markup for destructors.
This fixes missing noexcept specifiers for destructors in a Doxygen-generated
documentation.
2023-12-02 23:59:23 +03:00
Andrey Semashev
9f7d6a21dc Fix redundant trailing parenthesis after noexcept with condition.
Fixes https://github.com/boostorg/boostbook/issues/20.
2023-02-26 04:45:30 +03:00
Daniel James
f1aef5c98e Fix the <pre> block workaround in doxygen2boostbook.xsl
It turns out the '\code' blocks don't have this problem, so an easier
fix would be just to use them. But now I've implemented the workaround,
might as well leave it in, in case anyone wants to use <pre> blocks in
the future.
2016-01-13 19:38:46 +00:00
Daniel James
30911053b5 Convert the complicated doxygen preformatted tags.
Reported here:

http://lists.boost.org/boost-docs/2016/01/5335.php

Can currently see the error here:

http://www.boost.org/doc/libs/1_60_0/doc/html/boost/container/small_vector_base.html
2016-01-10 14:46:14 +00:00
Steven Watanabe
b42efe92e4 Handle <ndash/> generated by doxygen. 2015-03-31 16:13:31 -06:00
Daniel James
37b65b9320 Use language attribute in doxygen2boostbook.
It would be better to preserve doxygen's syntax highlighting, but I'll leave
that for later.

[SVN r86510]
2013-10-28 22:35:44 +00:00
Daniel James
885ed7e8c7 Support noexcept with a conditional.
Turns out Doxygen doesn't like BOOST_NOEXCEPT_IF. Text parsing in XSL is an
almighty pain, it might be better to just combine whatever follows the
arguments in argsstring with the values from the attributes.

[SVN r86285]
2013-10-13 11:10:38 +00:00
Daniel James
9e391505c4 Parse brackets in argsstring.
This may seem like overkill, but it's going to be needed for handling
parameters to noexcept. Doesn't handle escapes because that my sanity is
already stretched far enough.

[SVN r86284]
2013-10-13 11:10:01 +00:00
Daniel James
a7dd45375d Use specifiers attribute for virtual and explicit.
[SVN r86279]
2013-10-12 23:54:37 +00:00
Daniel James
e20b8195e1 Fix support for const, volatile, and pure virtual.
[SVN r86278]
2013-10-12 23:53:59 +00:00
Daniel James
78ba0b7b6e Add noexcept and constexpr to doxygen to boostbook coversion.
Should really add proper support to boostbook for `=delete`, `=default` and
noexcept, but I'm not feeling that keen right now. I'm not sure I did the right
thing with `BOOST_CONSTEXPR_OR_CONST`.

[SVN r86277]
2013-10-12 20:11:47 +00:00
Daniel James
9eb8e0a68b Less verbose handling of qualifiers.
[SVN r86276]
2013-10-12 20:11:16 +00:00
Daniel James
0702b53d10 Avoid confusing arguments with quialifiers from argsstring.
[SVN r86275]
2013-10-12 20:10:53 +00:00
Daniel James
807c6f0c71 Factor out method and function attributes.
Not all attributes apply to all methods and functions, but hopefully they should
never appear when inappropriate.

[SVN r86274]
2013-10-12 20:10:22 +00:00
Daniel James
e3d710413a Add newlines to doxygen2boostbook output.
Hopefully this won't break anything, and will make it much easier to read the
intermediate files.

[SVN r86271]
2013-10-12 20:09:10 +00:00
Daniel James
84603bfb06 Fix virtual methods in doxygen2boostbook.
[SVN r86270]
2013-10-12 20:08:37 +00:00
Daniel James
4e0ce03c6e Add assignment return to doxygen2boostbook. Refs #9241.
[SVN r86252]
2013-10-12 02:10:24 +00:00
Daniel James
ceb83870c1 Fix doxygen parameter 'formuladir' so that it doesn't need a trailing slash.
Would be nice to fix all uses of directories in a similar manner, but XSL is a
pain.

[SVN r84168]
2013-05-06 11:27:43 +00:00
Andrey Semashev
dae5ae0ab7 Added support for defaulted and deleted functions in the generated docs. Doxygen 1.8.2 or later needed to generate proper XML for this stylesheet.
[SVN r83872]
2013-04-13 16:04:14 +00:00
Steven Watanabe
058bacfdcd Handle \param in macros.
[SVN r79192]
2012-06-30 20:25:09 +00:00
Steven Watanabe
d7dcdd15be Correctly identify constructors/destructors of class template specializations.
[SVN r78602]
2012-05-24 19:38:51 +00:00
Steven Watanabe
176dc6c46e Handle explicit conversion operators. Fixes #5478.
[SVN r74999]
2011-10-16 22:31:40 +00:00
Daniel James
130a1bd0a8 Boostbook: Support doxygen warning tag.
Thanks to Tim. Refs #5740.

Unfortunately doxygen puts it inside a paragraph. But the generated
documentation seems good enough.

[SVN r73419]
2011-07-28 22:35:53 +00:00
Steven Watanabe
55259344f5 Handle \see
[SVN r70874]
2011-04-02 18:07:21 +00:00
Steven Watanabe
0d10a36cea Handle more Doxygen elements: tparam, ref (for classes only), Modify handling of note so it works for classes as well as functions.
[SVN r70863]
2011-04-02 17:35:13 +00:00
Steven Watanabe
c47227acc0 handle explicit.
[SVN r68708]
2011-02-08 04:13:09 +00:00
Daniel James
a1d3e62cd7 Add support for verbatim from doxygen.
[SVN r68307]
2011-01-19 22:04:56 +00:00
Daniel James
269a8e741d Oops. I accidentally checked in an old change to my subversion check out.
[SVN r63225]
2010-06-22 07:47:10 +00:00
Daniel James
2239878932 Remove the directories properly this time.
[SVN r63224]
2010-06-22 07:38:21 +00:00
Daniel James
ff74c39518 Fix doxygen2boostbook when 2 files have the same name.
Refs #1192. Patch by Steven Watanabe, updated by me. If it goes wrong,
it's my fault.

[SVN r62477]
2010-06-06 09:38:51 +00:00
Daniel James
5fc5fa6ec0 I think doxygen 'par' is closest to'formalpara' in docbook/boostbook.
[SVN r59881]
2010-02-25 07:51:03 +00:00
Daniel James
fbed5083b5 Quick hack to deal with title tags in doxygen descriptions.
[SVN r59859]
2010-02-24 00:14:19 +00:00
Daniel James
0be9223709 Don't include simplesectsep from doxygen output.
[SVN r59163]
2010-01-20 19:31:01 +00:00
Steven Watanabe
56a9dc1a1f Add support for friend functions defined inline
[SVN r58030]
2009-11-29 15:56:53 +00:00
Steven Watanabe
2e44e8a688 Strip out <copydoc> tags when converting from doxygen XML to Boostbook.
[SVN r57945]
2009-11-26 15:40:56 +00:00
Daniel James
8ec58236ea Pass through more elements in doxygen2boostbook. Refs #3309.
[SVN r55370]
2009-08-02 18:18:14 +00:00
Daniel James
b50982a373 Support INTERNAL ONLY enums in doxygen/boostbook documenation. Refs #3242.
Patch by Mathias Gaunard.

[SVN r54818]
2009-07-08 21:53:15 +00:00
Daniel James
34c6963030 Revert support for static mutable variables.
Of course there's no such thing.

[SVN r52349]
2009-04-12 10:50:43 +00:00
Daniel James
5252102def Workaround buggy doxygen output. Refs #2937
[SVN r52326]
2009-04-11 12:38:30 +00:00