使用doxygen记录枚举类值

mad*_*uci 7 c++ doxygen

在我的项目中,我使用enum类很多,我使用doxygen作为文档系统.当在同一个文件中声明多个枚举类并且它们具有相同的成员时,我发现很难生成枚举类的文档.例如,以下代码未在最终HTML输出中为枚举类IMAGE_REPORTING生成正确的文档:

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};
}
Run Code Online (Sandbox Code Playgroud)

输出: 输出氧气

知道什么是问题吗?

mar*_*tin 7

您可以使用适用于我的内联文档:

/** @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 */
}
Run Code Online (Sandbox Code Playgroud)

和另一个相似.