I've just added Doxygen to my toolset, and whilst I'm comfortable with most of the techniques, I'm a little confused on how I should go about documenting enum flags (also applicable to documentation in general, with or without Doxygen). Given the following class:
class foo
{
/// @enum Options
/// @brief Specifies options for the object. Options are combined using
/// the bitwise OR operator e.g. "OPTION1 | OPTION2".
enum Options
{
OPTION1 = 1, //< Option 1 description.
OPTION2 = 2, //< Option 2 description.
OPTION3 = 4 //< Option 3 description.
};
/// @brief Does something.
/// @param options Specifies options.
void bar(int options) {/* Do something */}
};
How do I go about indicating to the user how to use the options parameter of the bar function? The parameter is of type int, not Options, so there is no direct link between the parameter and the enum. If the parameter was of type Options, then the documentation would link to the description of the enum, which is the behavior I want.