7
我想要用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.*/
};
每個枚舉的堆疊成員的描述是既描述的級聯和有是全球同樣的問題。
棧的描述是:
堆棧
堆棧
有一種方法以特異性記錄它們中的每一個上的操作數上的一個變量?
Doxygen對C++ 11的支持很差。 – Pubby
如果您將其中一個枚舉放入一個名稱空間,然後將該枚舉導入父名稱空間,是否可行?我會想象有一種不那麼醜陋的方式,但我不知道doxygen。希望它的C++ 11支持快速改進 – bames53