Documenting enum class vs enum
Posted: Sun Mar 12 2017 2:59 pm
Here is the code from the \enum documentation:
If I change the enum to an enum class, the documentation still generates correctly. But, what if I add another enum class, say otherFruit, which also has a pear value?
The description for Test::otherFruit::pear is placed in the description for Test::fruit::pear and there is no documentation for Test::otherFruit::pear.
Trying:
causes DoxyPress to print:
There is a workaround: document the enum values inline. However, this is not mentioned in the \enum documentation. In fact, documenting enum class does not appear to be mentioned anywhere in the DoxyPress documentation.
Code: Select all
class Test
{
public:
enum fruit { pear, orange };
/*! Another enum, with inline docs */
enum veggies
{
celery, /*!< docs for value one */
carrot /*!< docs for value two */
};
};
/*! \class Test
* The class description.
*/
/*! \enum Test::fruit
* A description of the fruit enum.
*/
/*! \var Test::fruit Test::pear
* The description of the first fruit.
*/
Code: Select all
enum fruit { pear, orange };
/*! \var Test::otherFruit Test::pear
* The description of the first otherFruit.
*/
Trying:
Code: Select all
/*! \var Test::otherFruit Test::otherFruit::pear
Is it possible to document enum classes this way?Warning: documentation found, for a class member which was not found:
Test::otherfruit Test::otherFruit::pear
There is a workaround: document the enum values inline. However, this is not mentioned in the \enum documentation. In fact, documenting enum class does not appear to be mentioned anywhere in the DoxyPress documentation.