Reputation: 177
i'm writing documentation oh this code:
namespace A {
enum ENUM
{
/// \var step to frame
ENUM_1 = 0, //!< val1
ENUM_1 = 1, //!< val2
ENUM_2 = 2 //!< val3
};
}
in result, comments values of ENUM don't displayed.
When i remove the namespace, everything is good, but no now
Upvotes: 3
Views: 1614
Reputation: 129
This is an old post but for the people like me struggling with global enums, functions, etc. under a namespace here is the simple solution without \addtogroup
Just be sure that you add a description for your namespace. With this, even autolinking works flawlessly.
/// this the namespace A
namespace A {
/// step to frame
enum ENUM
{
ENUM_1 = 0, //!< val1
ENUM_1 = 1, //!< val2
ENUM_2 = 2 //!< val3
};
}
For nested namespaces, you should put description for the namespace enclosing your other vars, enums, functions, etc.
namespace A {
/// this the namespace A::B
namespace B {
/// step to frame
enum ENUM
{
ENUM_1 = 0, //!< val1
ENUM_1 = 1, //!< val2
ENUM_2 = 2 //!< val3
};
}
}
By the way tested in 1.8.7
Upvotes: 1
Reputation: 321
You have to use this format:
namespace A {
/*!
* \addtogroup A
* @{
*/
/// step to frame
enum ENUM
{
ENUM_1 = 0, //!< val1
ENUM_1 = 1, //!< val2
ENUM_2 = 2 //!< val3
};
/*! @} */
}
Upvotes: 2
Reputation: 409404
You are placing the enum
document header in the from place, it should be directly above the enum
definition:
/// \brief Step to frame
enum ENUM
{
...
};
Upvotes: 1