GNOME Bugzilla – Bug 561227
Wrong documentation generated for enum
Last modified: 2011-02-20 21:44:17 UTC
Please describe the problem: typedef enum AccountDescriptor { ///NoDescriptor NoDescriptor///1 ///PrimaryAccount ,PrimaryAccount///2 ///SecondaryAccount ,SecondaryAccount///3 }AccountDescriptor; Steps to reproduce: 1. Please look at the comments created by Doxygen for the code provided Actual results: Enumerator: NoDescriptor NoDescriptor. 1 PrimaryAccount PrimaryAccount SecondaryAccount. 2 SecondaryAccount 3 Expected results: Enumerator: NoDescriptor NoDescriptor. PrimaryAccount PrimaryAccount. 2 SecondaryAccount SecondaryAccount. 3 Does this happen every time? Yes Other information:
Maybe it's just the formatting, but I can't see what you are trying to tell us. What library is this?
Is this a doxygen bug that has come to glibmm by mistake? Is it really a bug, or is it the result of an unusual layout of code and documentation comments that doxygen does not support? I was curious and made some tests with doxygen. A conclusion is that doxygen treats the commas as delimiters between the enum constants. All documentation before the first comma belongs to the first constant. All documentation between the two commas belongs to the second constant. Not altogether unreasonable, is it? typedef enum AccountDescriptorx { ///NoDescriptorx NoDescriptorx,///1 ///PrimaryAccountx PrimaryAccountx,///2 ///SecondaryAccountx SecondaryAccountx///3 }AccountDescriptorx; With the commas moved the documentation looks like so: Enumerator: NoDescriptorx NoDescriptorx. PrimaryAccountx PrimaryAccountx. 1 SecondaryAccountx SecondaryAccountx. 23 Another test: typedef enum AccountDescriptory { ///NoDescriptory NoDescriptory,///<1 ///PrimaryAccounty PrimaryAccounty,///<2 ///SecondaryAccounty SecondaryAccounty///<3 }AccountDescriptory; Now the documentation looks almost as expected: Enumerator: NoDescriptory NoDescriptory. 1 PrimaryAccounty PrimaryAccounty. 2 SecondaryAccounty SecondaryAccounty. 3
Doxygen site has good example on how enum should be documented [1]. And gmmproc does not generate documentation for enums - dunno why, I haven't investigated it yet. But there is no word about gmmproc, so probably this bug should be assigned to doxygen or closed as NOTABUG, hm? [1] http://www.stack.nl/~dimitri/doxygen/commands.html#cmdenum
Oh, and in fact this bug seems to be issued by mistake - please see Alex's profile to notice that he moments later filed the same bug for Doxygen (which has number larger by one that this one). Closing it as invalid.