Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: new config option for \headerfile output #8639

Closed
jwakely opened this issue Jul 1, 2021 · 3 comments · Fixed by #8666
Closed

Feature request: new config option for \headerfile output #8639

jwakely opened this issue Jul 1, 2021 · 3 comments · Fixed by #8666
Labels
enhancement a request to enhance doxygen, not a bug

Comments

@jwakely
Copy link
Contributor

jwakely commented Jul 1, 2021

The SHOW_INCLUDE_FILES option seems to control two things. It causes the relevant header for a class to be shown in the docs for that class, and it also shows which header files a file includes in the docs for that file.

For example, SHOW_INCLUDE_FILES=YES for a class shows:

std::error_condition Class Reference
#include <system_error>

And for a file it shows:

system_error File Reference

#include <bits/c++config.h>
#include <bits/error_constants.h>
#include <iosfwd>
#include <stdexcept>
#include <bits/functional_hash.h>
Go to the source code of this file.

I want to be able to get the first effects, without the second. I do want to display the correct header that should be included for the definition of each class (that is an important part of the user-facing API that I want to document). But I don't want to show which files are included by each of my files (that is an implementation detail and not something I want the user-facing documentation to show).

It seems that there is one config option that conflates these two things, only one of which is documented:

SHOW_INCLUDE_FILES

If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of the files that are included by a file in the documentation of that file.

The default value is: YES.

Could there be a new config option to control whether the header for a class is shown in the class' docs?

Also, could \headerfile be supported for arbitrary comment blocks, not only classes and unions? I have non-member functions which are defined in some internal header file such as <bits/unique_ptr.h>, but I want to document that some other header such as <memory> is the correct way to get the definition of std::make_unique.

@jwakely
Copy link
Contributor Author

jwakely commented Jul 1, 2021

As a workaround I can decorate the includes in the file like this:

/// @cond undocumented
#include <bits/c++config.h>
#include <bits/error_constants.h>
#include <iosfwd>
#include <stdexcept>
/// @endcond

And now they will only get shown if I use ENABLED_SECTIONS=undocumented but it would be better if that wasn't necessary (I'm already having to compromise the readability of the code to work around various doxygen quirks, I'd rather not add more).

jwakely added a commit to jwakely/doxygen that referenced this issue Jul 12, 2021
This adds a new configuration option that controls whether to show the
file specified by \headerfile (or the header-file argument of \class) in
the documentation for a class or concept.

Previously that was controlled by SHOW_INCLUDE_FILES, but that should be
used for showing the include list for \file documentation. With this
change, there are two separate options to control the two separate
behaviours.

Fixes doxygen#8639
jwakely added a commit to jwakely/doxygen that referenced this issue Jul 12, 2021
This adds a new configuration option that controls whether to show the
file specified by \headerfile (or the header-file argument of \class) in
the documentation for a class or concept.

Previously that was controlled by SHOW_INCLUDE_FILES, but that should be
used for showing the include list for \file documentation. With this
change, there are two separate options to control the two separate
behaviours.

Fixes doxygen#8639
jwakely added a commit to jwakely/doxygen that referenced this issue Jul 13, 2021
This adds a new configuration option that controls whether to show the
file specified by \headerfile (or the header-file argument of \class) in
the documentation for a class or concept.

Previously that was controlled by SHOW_INCLUDE_FILES, but that should be
used for showing the include list for \file documentation. With this
change, there are two separate options to control the two separate
behaviours.

Fixes doxygen#8639
@albert-github albert-github added enhancement a request to enhance doxygen, not a bug fixed but not released Bug is fixed in github, but still needs to make its way to an official release labels Jul 22, 2021
@albert-github
Copy link
Collaborator

Code has been integrated in master on GitHub (please don't close the issue, it was now automatically closed due to the linked pull request, as this will be done at the moment of an official release).

@albert-github albert-github reopened this Jul 22, 2021
@doxygen
Copy link
Owner

doxygen commented Aug 18, 2021

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.9.2.
Please verify if this is indeed the case. Reopen the
issue if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Aug 18, 2021
@doxygen doxygen closed this as completed Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a request to enhance doxygen, not a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants