在Doxygen中引用参数的正确方法是什么? [英] What's the right way to reference a parameter in Doxygen?

查看:164
本文介绍了在Doxygen中引用参数的正确方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我具有以下有关Doxygen的功能文档:

I have the following Doxygen documentation for a function:

/**
  @brief Does interesting things

  @param[in]  pfirst The first parameter: a barrel full of monkeys

  @pre
    "pfirst" must have been previously passed through BarrelFiller()
*/

请注意, pfirst

我在这里用引号将其括起来,因为我想使其与其他文本区分开来。但是最好这样做,以使Doxygen突出显示该命令,并最好将其链接到参数定义。有办法做到吗?

I've surrounded it with quotation marks here because I want to stand it off from the rest of the text. But it would be nice to do this in such a way that Doxygen will highlight the command and, preferably, link it to the parameter definition. Is there a way to do this?

如果仅使用默认配置(或其少量更改)会发生这种情况,那就特别好。

It would be especially nice if this would happen using only the default configuration (or minor alterations thereof).

推荐答案

Doxygen提供了命令 \p 表示下一个单词是该函数的参数。您将这样使用它:

Doxygen provides the command \p for indicating that the next word is a parameter to the function. You would use it like so:

... the \p x and \p y coordinates are used to ...

我相信默认情况下,它将使用打字机字体表示。我认为目前尚不提供任何自动链接功能,但将来可能会提供。

I believe by default this will be represented using a typewriter font. I don't think this currently provides any auto-linking functionality, but potentially could in the future.

有一个相关命令, \a ,用于标记成员参数。默认情况下,它以强调显示的形式显示在文本中(< em> arg< / em>

您可以找到有关各种Doxygen的更多信息特殊命令参考

You can find more information about the various Doxygen Special Commands reference.

这篇关于在Doxygen中引用参数的正确方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆