doxygen 命令_Doxygen的 - 创建自定义命令

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.

解决方案

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.

:-\

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值