使用doxygen记录枚举值 [英] Documenting enum values with doxygen
问题描述
给定:
namespace Foo {
class Foo {
public:
/// Foo enum, possible ways to foo
enum class Foo {
/// Foo it with an A
A,
/// Foo it with a B
B,
/// Foo it with a C
C
}
}
}
并且使用 doxygen -g
创建的默认Doxyfile,我得到:
And the default Doxyfile made with doxygen -g
, I get this:
我可以得到枚举值记录吗?我尝试在成员之前/之后的注释,使用 ///<
等,没有效果。可能这只是doxygen的一个错误?文档中的示例工作。 (点击枚举名称不会带给我任何地方)
How can I get the enum values documented? I tried putting the comment before/after the member, using ///<
, etc, to no avail. Might this just be a bug in doxygen? The examples in the docs work. (Clicking on the name of the enum doesn't bring me anywhere)
推荐答案
使用Doxygen 1.8.2,对我来说:
With Doxygen 1.8.2, both the following work for me:
使用 ///
Using ///
/// This is an enum class
enum class fooenum {
FOO, ///< this is foo
BAR, ///< this is bar
};
使用 / *! ... * /
Using /*! ... */
/*! This is an enum class */
enum class fooenum {
FOO, /*!< this is foo */
BAR, /*!< this is bar */
};
doxygen changelog 说,枚举类
在Doxygen 1.8.2中是支持的,所以我怀疑你的命令可能有一些小的语法问题。
The doxygen changelog says that enum class
is supported in Doxygen 1.8.2, so I suspect there may be some minor syntax issue in your commands. Could you please compare your commands with the above two snippets?
新功能
New features
添加了对C ++ 11的支持:
Added support for C++11:
strongly typed enums, e.g.:
enum class E
这篇关于使用doxygen记录枚举值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!