我应该如何使用 Doxygen 对 typedef 进行分类?

发布于 2024-12-12 15:50:16 字数 322 浏览 3 评论 0原文

我的 C++ 代码中有 typedef 结构。截至目前,它们被列为 \var typedef。有更好的方法吗?下面是我所拥有的示例:

/*! \var typedef etc
 * \brief A type defined structure for etc 
 *
 * \param x type- Variable declaration for x
 * \param y type- Variable declaration for y
 */

我知道我什至不应该说 param。还有什么可以用的?

I have typedef structs in my C++ code. As of right now they are listed as \var typedef. Is there a better way to do this? Below is example of what I have:

/*! \var typedef etc
 * \brief A type defined structure for etc 
 *
 * \param x type- Variable declaration for x
 * \param y type- Variable declaration for y
 */

I know I shouldn't even be saying param. What else is there to use?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

疯了 2024-12-19 15:50:19

根据 Doxygen 文档 有一个 \typedef 命令。该命令的行为与 \var 命令相同。

According to the Doxygen documentation there is a \typedef command. The command behaves the same as the \var command.

神魇的王 2024-12-19 15:50:18

如果将注释块放在 typedef 前面,则不需要使用任何特殊命令。

/** This is the documentation for the following typedef */
typedef MyClass MyTypedef;

如果您喜欢将其放在 typedef 之后,请使用以下命令:

typedef MyClass MyTypedef;
/**< This is the documentation for the preceding typedef */

仅当注释块必须位于与实际 typedef 不同的位置时,您才需要使用 \typedef。

If you put the comment block in front of the typedef you don't need to use any special command.

/** This is the documentation for the following typedef */
typedef MyClass MyTypedef;

If you prefer to put it after the typedef use the following:

typedef MyClass MyTypedef;
/**< This is the documentation for the preceding typedef */

Only when the comment block must be at a different location than the actual typedef, you need to use \typedef.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文