使用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的一个bug?文档中的示例工作。 (点击枚举的名字不会带给我任何地方)
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屋!