lamefun
lamefun

Reputation: 4232

How to document a variable that isn't really there in Doxygen?

For example, I have $theme global variable that is defined in the configuration file, which is not processed by Doxygen. But I want to document it. I tried to do this:

/**
 * @var $theme
 * @brief Active theme.
 */

but it didn't work.

Upvotes: 3

Views: 409

Answers (1)

DRH
DRH

Reputation: 8308

You can create a doxygen specific file for documenting variables, something like:

config.dox

/**
 * @defgroup configuration Configuration
 */

/**
 * @ingroup configuration
 * @brief Active Theme
 */
$theme;

This will create a new Doxygen module named "Configuration" which will contain the variable $theme. You could also associate $theme with a particular class (use @memberof instead of @ingroup).

Upvotes: 4

Related Questions