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: Option to generate output for individual member groups #636

Closed
ropg opened this issue Feb 10, 2021 · 2 comments · Fixed by #637
Closed

Feature request: Option to generate output for individual member groups #636

ropg opened this issue Feb 10, 2021 · 2 comments · Fixed by #637
Assignees
Labels
code Source code enhancement Improvements, additions (also cosmetics)

Comments

@ropg
Copy link
Contributor

ropg commented Feb 10, 2021

Hi. Thank you. Breathe is amazing!

I have a project for which functionality for the classes people actually use is inherited from a number of different classes. The structure of that is not necessarily relevant to people just wanting to use the derived class. In my documentation, I follow a narrative that is focussed on what users are trying to do, which doesn't always match how these classes are structured. What would help me is a feature where I can create a member group and then pull only the members of that member group into the documentation, without anything else.

Something like:

.. doxygenclass:: someClass
   :membergroups: someMemberGroup
   :members-only:

Analogous to :members:, which takes a comma-separated list of members, this would take a comma-separated list of member groups. The new option :members-only: would suppress both the name of the class and the name of the member group(s).

This way documentation authors would be free to talk about a groups of members from anywhere, without having to go into what is inherited from where.

The INLINE_INHERITED_MEMB Doxygen config option might seem like it might help here. It doesn't because it's way too global, still follows the underlying structure too much and would force repetition where that's not desired.

@vermeeren vermeeren added code Source code enhancement Improvements, additions (also cosmetics) labels Feb 10, 2021
@vermeeren
Copy link
Collaborator

@RobertoRoos This is a nice idea, thanks. As an enhancement however the chance is high this will only be implemented soon if you or someone else (could be sponsored) provides the patches for it. Development time is unfortunately rather scarce and this is unlikely to change in the near future.

Still there is a potential workaround with the :project: option. You can let Doxygen run multiple times over your project, each with different configuration settings, and with the :project: option select which Doxygen XML you want to use per RST directive. See on https://breathe.readthedocs.io/en/latest/directives.html#config-values breathe_projects and breathe_default_project. The Breathe example docs also heavily use this feature.

That workaround fully depends on if the output you want can be achieved by tweaking Doxygen though, so it's far from ideal and may not fully do what you need as you found already with only the INLINE_INHERITED_MEMB option.

@ropg
Copy link
Contributor Author

ropg commented Feb 11, 2021

Alright: PR #637 for code and documentation changes filed. I would appreciate someone with better understanding of breathe and sphinx to have a look at adding the one missing bit that would make it way way more useful though. See the PR for details. Closing this issue so discussion can continue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Source code enhancement Improvements, additions (also cosmetics)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants