4

I've got a templated C++ class in my project that gets used only for debugging purposes -- in normal builds it compiles down to an empty/no-op class. This class gets privately-inherited by many of my other classes.

That works fine for its purpose; the problem is that it makes my DOxygen-generated inheritance-graphs really messy -- nearly doubling the number of visible nodes in the graph, in some cases. This class is a private implementation detail and its presence in the inheritance graphs doesn't add any useful information to the graphs, just lots clutter.

Therefore I'd like to exclude the class from the inheritance graphs, in order to make them easier to understand at a glance.

I've already tried the following without any luck:

  1. Added @cond HIDDEN_SYMBOLS and @endcond around that class (inside its header file)
  2. Added the unwanted class's name to the EXCLUDE_SYMBOLS line in my .dox file
  3. Added #ifndef DOXYGEN_SHOULD_IGNORE_THIS / #endif guards around the class's declaration in its header file and added DOXYGEN_SHOULD_IGNORE_THIS to the PREDEFINED line of my .dox file.

All of the above efforts just make the unwanted nodes in the inheritance graph un-clickable/gray -- but they don't hide/exclude them from the graph.

Is there any way to remove the class from the inheritance graphs only? (I don't care that much whether DOxygen documents the class or not; I'd just like it excluded from all the inheritance graphs)

Or, failing that, is there a way to remove all privately-inherited superclasses from the inheritance graphs? That might be "good enough" for my purposes.

Jeremy Friesner
  • 70,199
  • 15
  • 131
  • 234
  • 1
    Would a solution be to do the ```#ifdef`` on the class and on the inherited part create a version for the debugging and one for the non-debugging part by means of a define s well and use the PREDEFINEND etc. settings in the Doxyfile? – albert Apr 19 '18 at 08:13
  • I think #ifdef'ing would work, but it would make the header files kind of odd-looking, so what I did instead was change my classes so that the debugging-class is now included as a private member-variable rather than as a private superclass. This solves my immediate problem (since private member variables aren't documented by DOxygen), but I can imagine other scenarios where the original question would still apply, so I'll leave this question open. – Jeremy Friesner Apr 30 '18 at 22:05

0 Answers0