I have #define
values in headers that I certainly want Doxygen to document but I have others in C files that I treat as static constants and I don't want Doxygen to document them. Something as simple and stupid as
#define NUMBER_OF(a) (sizeof((a))/sizeof((a)[0]))
#define MSTR(e) #e
How can I keep Doxygen from putting those #define
s in the documentation it creates? I've tried marking it with @internal
but that didn't seem to help.
A somewhat-related question on Doxygen and #define
, how can I get:
#define SOME_CONSTANT 1234 /**< An explanation */
to put "SOME_CONSTANT" and "An explanation" but not "1234" in the output?
How can I make doxygen ignore some code fragment? The new and easiest way is to add one comment block with a \cond command at the start and one comment block with a \endcond command at the end of the piece of code that should be ignored.
In general, these Doxygen style function comment blocks should only be placed in the class header file, not the source file, in order to avoid confusion as to which one doxygen will use when generating the documentation.
Doxygen takes about 12 hours to run on our code base. This is primarily because there is a lot of code to process (~1.5M lines).
There is no need to use the \cond
and \endcond
commands. You can hide the initializer by simply using the \hideinitializer
command:
#define SOME_CONSTANT 1234 /**< An explanation @hideinitializer */
Regarding the first question, you may set HIDE_UNDOC_MEMBERS = YES
and only the macros having a Doxygen documentation block will be shown in the output.
You can set MAX_INITIALIZER_LINES = 0 in your doxyfile to hide the values of your defines.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With