After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 765369 - Collaboration diagram generation requires EXTRACT_PRIVATE = YES
Collaboration diagram generation requires EXTRACT_PRIVATE = YES
Status: RESOLVED OBSOLETE
Product: doxygen
Classification: Other
Component: general
1.8.11
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
[moved_to_github]
Depends on:
Blocks:
 
 
Reported: 2016-04-21 11:44 UTC by John Olsson
Modified: 2018-07-30 10:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example of when EXTRACT_PRIVATE affects collaboration diagram (3.20 MB, application/zip)
2016-04-22 13:59 UTC, John Olsson
Details
Added dependencies via methods (1.02 KB, text/x-c++hdr)
2016-04-25 06:30 UTC, John Olsson
Details

Description John Olsson 2016-04-21 11:44:47 UTC
Correct collaboration diagrams are only generated when EXTRACT_PRIVATE is also enabled. That is, if I set
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_PACKAGE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = YES
EXTRACT_ANON_NSPACES = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO

I get only a single class for the collaboration diagram.

If I set EXTRACT_PRIVATE = YES, then the collaboration diagram magically appear!
Comment 1 albert 2016-04-21 16:27:20 UTC
Can you please attach a self-contained example (source+config file in a tar or zip) that allows us to reproduce the problem?
Comment 2 John Olsson 2016-04-22 13:59:36 UTC
Created attachment 326551 [details]
Example of when EXTRACT_PRIVATE affects collaboration diagram

Toggling of EXTRACT_PRIVATE from NO to YES affects the collaboration diagrams. When set to NO it is not seen that Bar is used, when set to YES it is seen.

There is a Use Case when you do not want to extract documentation for private members, but still see in the collaboration diagram classes that are stored in private attributes.
Comment 3 albert 2016-04-24 12:44:43 UTC
Thanks for the case and the explanation.
I think it is a bit strange to expose the privately inherited class, there might be use cases that this is required but which relation (in case of EXTRACT_PRIVATE = YES : _aBarReference) is to be mentioned? No relation means that we have a complete inheritance relation.
At the moment I don't see a conceptual fix for this.
Comment 4 John Olsson 2016-04-25 06:30:30 UTC
Created attachment 326658 [details]
Added dependencies via methods

I have now modified the file Foo.hpp; two public methods with the following signatures were added

  Bar getBar();

  void setBar(Bar bar);

This exposes (via a puplic interface) that the Foo class indeed collaborates with the Bar class. Still the collaboration diagram generated by Doxygen (when EXTRACT_PRIVATE=NO) only contains the Foo class... Why?

Another example is that if you start with a UML model showing the relationship between classes, then you expose relations even though those relations are usually stored as private members. It is nothing weired in that. What is weired is that Doxygen requires us to document all private members (due to that we want all public and protected members to be documented) in order to have meaningful collaboration diagrams...

Thus it is only those members that carries the dependencies to other classes that needs to be exposed, not those with containing internal data and internal states. But this is not possible to express using the current set of configuration options for Doxygen. :(

What I am after is that the collaboration diagram generated by Doxygen should at least contain all classes that are exposed within the documented method signatures.
Comment 5 André Klapper 2018-07-30 10:43:35 UTC
As discussed in https://github.com/doxygen/doxygen/pull/734 , Doxygen has moved its issue tracking to 

   https://github.com/doxygen/doxygen/issues

All Doxygen tickets in GNOME Bugzilla have been migrated to Github. You can subscribe and participate in the new ticket in Github. You can find the corresponding Github ticket by searching for its Bugzilla ID (number) in Github.

Hence I am closing this GNOME Bugzilla ticket.
Please use the corresponding ticket in Github instead. Thanks a lot!