I want to document a library with doxygen. The documentation will be read by two classes of people: Users, which are only interested in the external API and developers which want to see documentation for all functions/structures.
I would like to use to separate doxyfiles to create the documentation. Is there some "tag" I can put in a comment block to mark a comment as internal/external?
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. This should be within the same file of course.
To add content to the mainpage, use the doxygen special command \mainpage. To enhance the documentation you produce, there are a variety of doxygen special commands placed inside doxygen comments. For example, in the class description, note the doxygen special command \author.
It is parsed by doxygen . The file may contain tabs and newlines for formatting purposes. The statements in the file are case-sensitive. Comments may be placed anywhere within the file (except within quotes). Comments begin with the # character and end at the end of the line.
Set INTERNAL_DOCS:
# The INTERNAL_DOCS tag determines if documentation
# that is typed after a \internal command is included. If the tag is set
# to NO (the default) then the documentation will be excluded.
# Set it to YES to include the internal documentation.
INTERNAL_DOCS = NO
In the documentation, you can use \internal
or @internal
at whatever granularity you want (file, function, etc.).
Use the \cond command:
\internal
(@internal
) only has granularity for the current comment block. It does not allow you any way to hide a structure definition in C.
The easiest way to do this is put
\cond INTERNAL
at the top of an internal header file and
\endcond
at the bottom. Then, in your configuration file, you add
ENABLED_SECTIONS = INTERNAL
to allow the internal items to be included in the documentation.
This way is also recommended by Doxygen users, e.g. here
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