让 Doxygen 在 C 中记录枚举的问题
我对 Doxygen(Mac OS X Snow Leopard 上的 1.6.1)有一个相当奇怪的问题,因为无论我做什么,它似乎都没有记录我的枚举。我正在用 C 语言进行编程,并按照手册中的说明进行操作。这是我的代码:
/**
* \enum dccp_pkt_type
* \brief specifies the available DCCP packet types
*/
enum dccp_pkt_type
{
DCCP_REQUEST = 0, /**< DCCP Request Packet */
DCCP_RESPONSE, /**< DCCP Response Packet */
DCCP_DATA, /**< DCCP Data Packet */
DCCP_ACK, /**< DCCP Ack Packet */
DCCP_DATAACK, /**< DCCP Data Ack Packet */
DCCP_CLOSEREQ, /**< DCCP Close Request Packet */
DCCP_CLOSE, /**< DCCP Close Packet */
DCCP_RESET, /**< DCCP Reset Packet */
DCCP_SYNC, /**< DCCP Sync Packet */
DCCP_SYNCACK, /**< DCCP Sync Ack Packet */
DCCP_RESERVED, /**< DCCP Reserved Packet Type - Receivers MUST
ignore any packets with this type */
};
它应该根据 doxygen 手册生成正确记录的输出,但它什么也没生成。我很可能错过了一些简单的事情,如果有人能指出我正确的方向,我将不胜感激。
I have a rather odd problem with Doxygen (1.6.1 on Mac OS X Snow Leopard) in that it does not seem to document my enums no matter what I do. I am programming in C and have followed the instructions in the manual. Here is my code:
/**
* \enum dccp_pkt_type
* \brief specifies the available DCCP packet types
*/
enum dccp_pkt_type
{
DCCP_REQUEST = 0, /**< DCCP Request Packet */
DCCP_RESPONSE, /**< DCCP Response Packet */
DCCP_DATA, /**< DCCP Data Packet */
DCCP_ACK, /**< DCCP Ack Packet */
DCCP_DATAACK, /**< DCCP Data Ack Packet */
DCCP_CLOSEREQ, /**< DCCP Close Request Packet */
DCCP_CLOSE, /**< DCCP Close Packet */
DCCP_RESET, /**< DCCP Reset Packet */
DCCP_SYNC, /**< DCCP Sync Packet */
DCCP_SYNCACK, /**< DCCP Sync Ack Packet */
DCCP_RESERVED, /**< DCCP Reserved Packet Type - Receivers MUST
ignore any packets with this type */
};
It should according to the doxygen manual produce properly documentated output but instead it produces nothing. I am most likely missing something simple, if anyone could point me in the right direction I would be grateful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
来自 Doxygen 手册:
From the Doxygen manual:
我的经验与在 doxygen 1.8.9.1 中使用
EXTRACT_ALL=NO
和SHOW_INCLUDE_FILES=NO
的体验相同 - 即使/*! 全局枚举类型也没有列出或链接。 \file */
存在,并且全局enum
由记录的复合结构引用。为了解决这个问题,我最终定义了一个枚举组:
<代码>/*!
\defgroup 枚举
公共枚举类型
*/
对于枚举类型,我使用
\ingroup Enumerations
将枚举包含在新组中。然后,Doxygen 能够从复合结构自动链接到枚举类型。My experience is the same using
EXTRACT_ALL=NO
andSHOW_INCLUDE_FILES=NO
with doxygen 1.8.9.1 - global enum types were not listed nor linked even though/*! \file */
is present and the globalenum
is referenced by a documented compound structure.To work around this, I ended up defining an Enumerations group:
/*!
\defgroup Enumerations
Public enumeration types
*/
and for the enum types I used
\ingroup Enumerations
to include the enums in the new group. Doxygen then was able to autolink from the compound structures to the enum types.如果内存正常,则不会显示枚举文档,除非该文件也已记录。尝试添加 @file 部分。
If memory serves correctly, enum documentation doesn't show up unless the file is also documented. Try adding a @file section.