Create a new user command that will add a section to Doxygen

I would like to create a custom command in Doxygen similar to \fn \param or \var .

For example, I would like to be able to create the \option command, which I would use as follows:

 /** \option option_1 This is the first option. \option option_2 This is the second option. */ 

With an output like:

Options:
option_1 This is the first option.
option_2 This is the second option.





A simple replacement alias does not work. For example, using this alias:

 ALIASES = option="\par Options:\n" 

I get the following output:

Options:
option_1 This is the first option.

Options:
option_2 This is the second option.

This is not what I am looking for.


BOUNTY:

If any further clarification is necessary, see my question: Doxygen - create a custom command

+8
doxygen
source share
2 answers

Although not as clean as @param, you can emulate similar behavior with the following aliases:

 ALIASES += options="<dl class="params"><dt>Options</dt><dd><table class="params">" ALIASES += option{2}="<tr><td class="paramname">\1</td><td>\2</td></tr>" ALIASES += endoptions="</table></dd></dl>" 

Aliases can be used as follows to obtain the desired result:

 /** * @options * @option{ option_1, This is the first option. } * @option{ option_2, This is the second option. } * @endoptions */ 

Note. This is HTML oriented and probably will not give a reasonable result for other formats.

+3
source share

It seems that xrefitem can do what you want, as was said in this previous question: Custom tags with Doxygen

0
source share

All Articles