如何使用 Doxygen 记录具有相同名称的枚举值?
我正在尝试使用 Doxygen 记录包含一些相似值的两个类枚举。但这会为每个具有相同名称的字段生成重复的文本。
这是我的两个枚举:
/*!
* \enum OperandType
* \brief A type of operand. Represents the location of the operand.
*/
enum class OperandType : unsigned int {
IMMEDIATE, /**< An immediate operand */
REGISTER, /**< An operand in a register */
STACK, /**< An operand on the stack */
GLOBAL /**< A global operand */
};
/*!
* \enum PositionType
* \brief A type of position for a variable
*/
enum class PositionType : unsigned int {
STACK, /**< A variable on the stack */
PARAMETER, /**< A parameter */
GLOBAL, /**< A global variable */
CONST /**< A const variable.*/
};
每个枚举的 STACK 成员的描述是两个描述的串联,并且 GLOBAL 也存在同样的问题。
STACK的描述是:
栈上的变量
栈上的操作数
有没有办法专门记录它们中的每一个?
I'm trying to document two class enumerations containing some similar values with Doxygen. But that generates duplicates text for each field with the same name.
Here are my two enumerations :
/*!
* \enum OperandType
* \brief A type of operand. Represents the location of the operand.
*/
enum class OperandType : unsigned int {
IMMEDIATE, /**< An immediate operand */
REGISTER, /**< An operand in a register */
STACK, /**< An operand on the stack */
GLOBAL /**< A global operand */
};
/*!
* \enum PositionType
* \brief A type of position for a variable
*/
enum class PositionType : unsigned int {
STACK, /**< A variable on the stack */
PARAMETER, /**< A parameter */
GLOBAL, /**< A global variable */
CONST /**< A const variable.*/
};
The description for the STACK member of each enumeration is the concatenation of both descriptions and there is the same problem for GLOBAL.
The description of STACK is :
A variable on the stack
An operand on the stack
Is there a way to document each of them specifically ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决方法是将其放入命名空间中,然后使用
using
将其取出。如果您不喜欢这种分离,可以将
PositionType
放在单独的命名空间(枚举
)中。Workaround is to put it in a namespace and
using
to bring it out.You can put
PositionType
in a separate namespace (enumeration
) if you don't like the separation.