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

Make it possible to list namespace members in file scope for XML output #653

Merged
merged 1 commit into from Dec 26, 2018

Conversation

mosra
Copy link
Contributor

@mosra mosra commented Feb 10, 2018

For better consistency with the HTML output, where each file documentation lists (and links to) all members of given namespace. This also makes it possible to be consistent with the HTML output in case a namespace is not documented and thus all its member detailed docs should be put into corresponding file docs instead.

In order to be backwards compatible and avoid breaking stuff for existing users of the XML output, this is controlled by a new XML_NAMESPACE_MEMBERS_IN_FILE_SCOPE configuration option that defaults
to NO.

Note that this, unlike the HTML output, will put the whole detailed docs into the file scope instead of just listing them. It's up to the user of the XML output to filter and deduplicate this information. It can be done for example by comparing member ID prefixes with compound ID -- íf different, the detailed docs are already somewhere else.

Cc: @Leandros

For better consistency with the HTML output, where each file
documentation lists (and links to) all members of given namespace. This
also makes it possible to be consistent with the HTML output in case
a namespace is not documented and thus all its member detailed docs
should be put into corresponding file docs instead.

In order to be backwards compatible and avoid breaking stuff for
existing users of the XML output, this is controlled by a new
XML_NAMESPACE_MEMBERS_IN_FILE_SCOPE configuration option that defaults
to NO.

Note that this, unlike the HTML output, will put the whole detailed docs
into the file scope instead of just listing them. It's up to the user of
the XML output to deduplicate this information. It can be done for
example by comparing member ID prefixes with compound ID -- íf
different, the detailed docs are already somewhere else.
@mosra
Copy link
Contributor Author

mosra commented Nov 26, 2018

@doxygen / @albert-github any chance this could get merged? It's been almost a year since.

@albert-github
Copy link
Collaborator

Are these the quick member links in HTML ? If so why not use the same type of construct as used in the routine writeQuickMemberLinks of namespacedef.cpp instead of adding a new configuration tag?

Can you add a small example of how it looks in HTML / an image of the relevant part and the corresponding source code?

@mosra
Copy link
Contributor Author

mosra commented Nov 26, 2018

Um, no, this is not about any quick member links at all. Smallest possible example and expected XML output is already in the test files part of this PR.

To give you images: If I use the test files to generate HTML, it will look like this for the *.h file:

image

with each of these member links pointing to the namespace documentation, which then looks like this:

image


The thing is, the above information for the *.h file is not exposed to the XML output at all, because, if you look at the actual code, for some reason there's this:

    // namespace members are also inserted in the file scope, but 
    // to prevent this duplication in the XML output, we filter those here.
    if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)

So this PR adds that, under a new default-to-off configuration option (because I assume just adding these would cause problems for existing tools like Breathe which do not expect duplicate members).

@doxygen
Copy link
Owner

doxygen commented Dec 26, 2018

I'll rename the option to XML_NS_MEMB_FILE_SCOPE (to meet maximum length limitations for proper alignment in the config file) and move the tests to 077 and 078.

@doxygen doxygen merged commit f5ed505 into doxygen:master Dec 26, 2018
@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 XML XML Output labels Dec 26, 2018
@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 Dec 28, 2018
@mosra
Copy link
Contributor Author

mosra commented Dec 29, 2018

Excellent, thank you a lot! :)

@mosra mosra deleted the xml-namespace-members-in-file-scope branch December 29, 2018 12:52
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 XML XML Output
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants