in my project I use enum class a lot and I'm using doxygen as documentation system. I find very difficult to produce documentation of enum classes when multiple enum classes are declared in the same file and they have the same members. For example, the following code is not generating the correct documentation for enum class IMAGE_REPORTING in final HTML output:
namespace mapper
{
/* CONNECTION RELATED */
/** @enum mapper::SECURE_WEBSOCKET
* \author Michele Adduci
* \ingroup Core
* @brief is a strongly typed enum class representing the status of websocket connection
* @var mapper::SECURE_WEBSOCKET::DISABLED
* is coded as std::int8_t of value 0
* @var mapper::SECURE_WEBSOCKET::ENABLED
* is coded as std::int8_t of value 1
*/
enum class SECURE_WEBSOCKET : std::int8_t {DISABLED = 0, ENABLED = 1};
/* IMAGE RELATED */
/** @enum mapper::IMAGE_REPORTING
* \author Michele Adduci
* \ingroup Core
* @brief is a strongly typed enum class representing the status of image reporting
* @var mapper::IMAGE_REPORTING::DISABLED
* is coded as std::int8_t of value 0
* @var mapper::IMAGE_REPORTING::ENABLED
* is coded as std::int8_t of value 1
*/
enum class IMAGE_REPORTING : std::int8_t {DISABLED = 0, ENABLED = 1};
}
Output:
Any idea of what is the problem?
You can use inline documentation, which works for me:
/** @enum mapper::IMAGE_REPORTING
* \author Michele Adduci
* \ingroup Core
* @brief is a strongly typed enum class representing the status of image reporting
*/
enum class IMAGE_REPORTING : std::int8_t {
DISABLED = 0, /**< is coded as std::int8_t of value 0 */
ENABLED = 1 /**< is coded as std::int8_t of value 1 */
}
and similar for the other.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With