tags:

views:

781

answers:

2

To be precise: I know how to dox enums at the point of declaration, I want to dox them out-of-line instead.

I want to keep the header file free of doxygen comments; they're all in the .cpp file. This is not a problem for functions, classes, typedefs and so on. I can also document the enum itself like this:

/*!
  \enum MyClass::MyEnum

  Foo Bar Baz

  \value FirstEnumValue <- doesn't work
*/

but how do I document the values of the enum there?

Thanks!

+4  A: 

You need to use \var according to the docs

rve
Doh, thanks. The example was longer than my attention span :)
A: 

I think you have to use something along the lines of

/*!
  \enum MyClass::MyEnum

  Foo Bar Baz

  \var MyClass::MyEnum::FirstEnumValue Description
 */

but I've never used this as I find that keeping the comments near the code increases maintainability, so the format might not be quite right.

See here.

Al
Doesn't work. The `\var` needs to be in a comment block of it's own and the `Description` needs to be on a line of it's own. Thank for trying, though.
As I said: "the format might not be quite right".
Al