gpt4 book ai didi

前置条件下的 Doxygen 高亮参数

转载 作者:行者123 更新时间:2023-12-04 11:56:31 34 4
gpt4 key购买 nike

我有一个函数的 doxygen header ,如下所示:

/** Some description.

@param[in] grid1 First grid
@param[in] grid2 Second grid

@pre grid1 and grid2 must be of the same dimensions
*/

我要 grid1grid2在生成的文档的先决条件部分特别突出显示,因为它们是参数。在我看来,我应该能够做类似的事情
@pre #grid1 and #grid2 must be the same size

但这不起作用。

关于如何实现这一目标的任何想法?

最佳答案

如果 # 就好了自动链接到函数参数定义。但是,我无论如何都看不到在 automatic link generation 中这样做doxygen 手册的部分。

查看文档 HTML 源代码后,似乎参数的样式似乎简单地为 strong和类(class) paramname .所以像

@pre <strong class="paramname">grid1</strong> and
<strong class="paramname">grid2</strong> must be the same size.

应该给你你想要的结果。显然,每次写出来都过于冗长。但是,您应该能够定义 custom command ,说 \paramname ,要做到这一点,你就可以写
@pre \paramname{grid1} and \paramname{grid2} must be the same size.

编辑 : 这个可以通过配置文件别名来实现
ALIASES += paramname{1}="<strong class="paramname">\1</strong>"

关于前置条件下的 Doxygen 高亮参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11088537/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com