14

I want to exclude a class from documentation in Doxygen. Usually these classes are in files named the same, but there are many times when they are included inside other class definitions. This is mainly for classes starting with "_" or "Private".

How can I tell Doxygen to exclude a C++ class?

Thanks in advance.

jww
  • 97,681
  • 90
  • 411
  • 885
Kristopher Ives
  • 281
  • 1
  • 2
  • 7

3 Answers3

18

You can use the \cond tag. Before the class definition, add:

\cond HIDDEN_SYMBOLS

and after the class definition add:

\endcond

Unless you define HIDDEN_SYMBOLS in your doxyfile, the contents between the \cond and \endcond tags will not be documented. You can replace HIDDEN_SYMBOLS with whatever you like.

Andreas Haferburg
  • 5,189
  • 3
  • 37
  • 63
James McNellis
  • 348,265
  • 75
  • 913
  • 977
  • Is there a way to do it in the sources without `\cond` and `\endcond`? Maybe something like `\nodoc` or `\nodoxygen` on the class? I did not see a command in the Doxygen manual under [Special Commands](https://www.stack.nl/~dimitri/doxygen/manual/commands.html), but I may have missed it. – jww Dec 25 '17 at 01:09
12

EXCLUDE_SYMBOLS may be my answer.

Quinn Taylor
  • 44,553
  • 16
  • 113
  • 131
Kristopher Ives
  • 281
  • 1
  • 2
  • 7
2

Using Doxygen GUI you can find multiple exclude options under

"expert > input"

You may find specially useful:

  • Exclude symbols: Excludes everything containing a determined word regex like /word/
  • Exclude patterns: Excludes a determinated path regex like /folder/ or /some/file.cs/
Adrian Lopez
  • 2,601
  • 5
  • 31
  • 48