After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 561227 - Wrong documentation generated for enum
Wrong documentation generated for enum
Status: RESOLVED INVALID
Product: glibmm
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2008-11-17 15:56 UTC by Alex
Modified: 2011-02-20 21:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alex 2008-11-17 15:56:46 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:
Comment 1 Murray Cumming 2008-11-17 20:26:52 UTC
Maybe it's just the formatting, but I can't see what you are trying to tell us. What library is this?
Comment 2 Kjell Ahlstedt 2011-02-20 18:21:14 UTC
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
Comment 3 Krzesimir Nowak 2011-02-20 21:39:28 UTC
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
Comment 4 Krzesimir Nowak 2011-02-20 21:44:17 UTC
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.