Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Separate "internal" from "external" documentation in doxygen

Tags:

doxygen

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?

like image 625
timos Avatar asked Jun 14 '12 02:06

timos


People also ask

How do I exclude a file in doxygen?

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.

How do I add a main page in doxygen?

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.

Are doxygen commands case sensitive?

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.


2 Answers

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.).

like image 165
Mike Kwan Avatar answered Sep 22 '22 15:09

Mike Kwan


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

like image 42
Thomas O'Dell Avatar answered Sep 20 '22 15:09

Thomas O'Dell