Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I think my question is basically the same as this one, but it didn't get a good answer: Create new custom command that will add to a section in Doxygen

I pretty much want to do the same thing, I think. I want to completely duplicate the exact functionality of the @param option, except to give it the heading "Options" instead of "Parameters". I want the arguments to be the same (data type, variable name, and description) and want them to look all the same and everything. Literally, the only thing I need different is the heading.

I also tried doing this:

ALIASES = option"\par Options:\n"

in my Doxyfile, but I also get each individual option in its own section instead of all of them being in the same section. They also don't have the same arguments as the @param option.

I also tried to do something with \xrefitem which, of course, didn't work. I tried this:

ALIASES = option="\xrefitem param \"Option\" \"Options\" "

but it looks like \xrefitem is used for creating something more like a compiled list from different sections, like the Todo list.

Help is greatly appreciated. Thanks!


EDIT:

Just to clarify, the output I'm looking for would look something like this:

Options:
    string    $option1  This is option 1.
    string    $option2  This is option 2.

share|improve this question

2 Answers 2

I am pretty sure that this is not possible without modifying doxygen. I would just use \li and list the options insteand of using \param then.

http://www.stack.nl/~dimitri/doxygen/commands.html#cmdli

share|improve this answer
    
Modifying doxygen would entail downloading the source code, modifying it, and compiling it, right? Probably more work than I'm looking to do for this. Perhaps I will submit a feature request. Using \li, can I make a header for the section of \li elements to let the user know that these are Options? –  Travesty3 Aug 10 '11 at 13:10
up vote 0 down vote accepted

The closest I was able to come up with was to use this:

@par Options:
@li @e string @b $option1 This is option 1.
@li @e string @b $option2 This is option 2.

This almost works decently, except that it doesn't line up each part nicely, like it does with @param. So if the first option's name is something like $option1 and the second option's name is $thisIsTheSecondOption, the beginning of the descriptions will not be lined up. It looks more like:

Options:
    string  $option1 This is option 1.
    int  $thisIsTheSecondOption This is option 2.

Which makes it more difficult to read.

:-\

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.