【发布时间】:2011-11-30 22:44:10
【问题描述】:
我正在尝试使用 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的描述是:
栈上的变量
栈上的操作数
有没有办法专门记录它们中的每一个?
【问题讨论】:
-
Doxygen 对 C++11 的支持很差。
-
如果将其中一个枚举放入命名空间,然后将枚举导入父命名空间,它是否有效?我想有一种不那么丑陋的方式,但我不太了解 doxygen。希望它对 C++11 的支持能够快速改进