khoi ngo
khoi ngo

Reputation: 43

Doxygen How to general documention for folder

I would like to add descriptions for each folder as noted in the picture:

enter image description here

Is this possible?

Upvotes: 1

Views: 906

Answers (1)

Michael
Michael

Reputation: 2250

You can document folders with the \dir or @dir command

http://www.doxygen.nl/manual/commands.html#cmddir

The documentation on this is not great. But I did already go through the time to figure out how it works. In any source file you want you can add the documentation for the folder (or even create a specific file for the folder's documentation).

In your case

/** \dir workspace
 *  \brief "Folder description that shows up where you want"
 *  \details More details to be displayed on the folder's page.
 */


/** \dir workspace/SWTtutotial
 *  \brief "Folder description that shows up where you want"
 *  \details More details to be displayed on the folder's page.
 */

Note... watch your spelling of "tutorial" ;)

A side note: I noticed a bug related to folders names having a common suffix. I get the following warning:

file.cpp:180: warning: \dir command matches multiple directories.
  Applying the command for directory /sources/
  Ignoring the command for directory /testsources/

The comment at line 180 causing this warning

/**
 * \dir "sources"
 * \details Adding details later 3...
 */ //works but complains about also matching "testsources".  Doxygen Bug?

I fixed it by using \dir /sources instead of the quotes. This is ok if the path does not have spaces in it... otherwise we need a bug fix.

Upvotes: 5

Related Questions