I wasn't able to show documentation for values of enum classes without setting EXTRACT_ALL
. The comments for preserve, truncate and append aren't there. The enum itself is documented. If I enable EXTRACT_ALL
I get a list.
My code is:
namespace grimoire
{
...
/// @brief Behaviour of function open_for_write for already existing files.
/// @see open_for_write()
enum class OpenMode
{
preserve = std::ofstream::out, /// Already existing file aren't opened.
truncate = std::ofstream::trunc, /// Discard existing contents.
append = std::ofstream::app /// Append to existing contents.
};
...
}
I'm using CMake to run Doxygen with:
#set(DOXYGEN_EXTRACT_ALL YES)
doxygen_add_docs(
docs
"${CMAKE_CURRENT_SOURCE_DIR}/include/grimoire"
"${CMAKE_CURRENT_SOURCE_DIR}/src")
Edit:
It doesn't even work with a classical enum and without explicit values. It looks like it has to do with my settings.
Solved:
I had to add a comment to the enclosing namespace. Doxygen extracted the enum itself and other stuff like functions and classes inside that namespace but not the enum entries.