How to get Doxygen to ignore inheritance relationship?
I'm trying to get Doxygen to ignore an inheritance relationship when drawing collaboration diagrams.
Let's say my class definition looks like this:
Now, when I run Doxygen, I don't want to see Base class in the generated collaboration diagram.
At first glance, it seems that the cleanest way to do this would be to use the EXCLUDE_SYMBOLS
directive in my Doxyfile. Specifically:
However, I've found that this does not work: The Base class still shows up in my collaboration diagram for Derived.
I've tried this on both Doxygen 1.8.6 and 1.8.11 and
with different permutations of Base wildcards (Base*, *as*, etc), same behavior. The Base class always shows up in my collaboration diagram.
To be fair, I have found 2 workarounds, but they both involve putting conditional statements into my code. For completeness, I'll include both here:
First Workaround Method:
#endif/* DOXYGEN_SHOULD_SKIP_THIS */
Then ensure that the following two directives are set inside the Doxyfile:
PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
ENABLE_PREPROCESSING = YES
Second Workaround Method:
/// @cond DOXYGEN_IGNORE
To be clear, these workarounds do indeed make Doxygen ignore the inheritance relationship, but I'd prefer not to unnecessarily pollute my code base, especially if there's a better
/ cleaner way to accomplish my goal.
My question is -- Why doesn't EXCLUDE_SYMBOLS make
Doxygen ignore my Base class when it draws the collaboration diagram?