Documenting enum class values with doxygen

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.


I was having a similar issue with global enums. Some header files generated a link for enums and other header files did not. You must explicitly document the file.

Here is a excerpt from this page int the documentation. http://www.doxygen.nl/manual/docblocks.html#memberdoc

To document a global C function, typedef, enum or preprocessor definition you must first document the file that contains it (usually this will be a header file, because that file contains the information that is exported to other source files).

Attention Let's repeat that, because it is often overlooked: to document global objects (functions, typedefs, enum, macros, etc), you must document the file in which they are defined. In other words, there must at least be a

/*! \file */ 

or a

/** @file */ 

line in this file.

Tags:

C++

Doxygen