Doxygen 枚举未显示

8

请问是否有可能让Doxygen为我的类头文件中声明的枚举生成文档?在此链接中名为“scope”的属性所对应的枚举类型并未显示在文档中。

2个回答

5
根据Doxygen手册这里的说明:
To document global objects (functions, typedefs, enum, macros, etc), you must document the file in which they are defined. In other words, there must at least be a

/*! \file */ 
or a
/** @file */ 
line in this file.

这里有一个例子:
/*! \file MyClass.h
    \brief A brief file description.

    More details
 */

/*! This is an enum */
enum Direction {
    kDirectionRight, /*!< this is right */
    kDirectionLeft,  /*!< this is left */
};

希望这能有所帮助。

谢谢!\file指令应该放在哪里?有没有可能给一个小例子,比如内联声明的枚举类型的eps(即在类头部分顶部声明的枚举类型)。 - Jasper Blues
谢谢 - 这很有帮助。然而,它没有起作用 - 添加文件标签和简要没有效果。但是,我修改了我的Doxyfile以包括SHOW_FILES = YES,然后只需向枚举添加一个doc-tag即可。 - Jasper Blues

0

编辑您的Doxyfile配置文件并设置以下内容:

SHOW_FILES = YES

然后只需向枚举类型添加标准的文档注释。

现在将被链接并记录


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接