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 522193 - Enum Problem
Enum Problem
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.5.5
Other All
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2008-03-13 09:36 UTC by Lorenzo Bonardi
Modified: 2009-08-20 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Lorenzo Bonardi 2008-03-13 09:36:04 UTC
Please describe the problem:
I have two classes, in different files of a c# project. In both of these classes I have an enum, with the same name, link in the following sample:

//Contents of the file Class1.cs

namespace WindowsApplication1
{
    class Class1
    {
        /// <summary>
        /// This enum is used for specifying the command managed by this class
        /// </summary>
        public enum Commands : uint
        {
            /// <summary>
            /// Sample Command 0 for class 1
            /// </summary>
            COMMAND_0,
            /// <summary>
            /// Sample Command 1 for class 1
            /// </summary>
            COMMAND_1,
            /// <summary>
            /// Sample Command 2 for class 1
            /// </summary>
            COMMAND_2,
            /// <summary>
            /// Sample Command 3 for class 1
            /// </summary>
            COMMAND_3,
            /// <summary>
            /// Sample Command 4 for class 1
            /// </summary>
            COMMAND_4,
            /// <summary>
            /// Sample Command 5 for class 1
            /// </summary>
            COMMAND_5,
            /// <summary>
            /// Sample Command 6 for class 1
            /// </summary>
            COMMAND_6,
            COMMAND_NUM
        }
        public Class1()
        {
            Console.WriteLine("I'm Class1 and I'm being created");
        }  
    }
}

//Contents of the file Class2.cs

namespace WindowsApplication1
{
    class Class2
    {
        /// <summary>
        /// This enum is used for specifying the command managed by this class
        /// </summary>
        public enum Commands : uint
        {
            /// <summary>
            /// Sample Command 0 for class 2
            /// </summary>
            COMMAND_0,
            /// <summary>
            /// Sample Command 1 for class 2
            /// </summary>
            COMMAND_1,
            /// <summary>
            /// Sample Command 2 for class 2
            /// </summary>
            COMMAND_2,
            /// <summary>
            /// Sample Command 3 for class 2
            /// </summary>
            COMMAND_3,
            /// <summary>
            /// Sample Command 4 for class 2
            /// </summary>
            COMMAND_4,
            /// <summary>
            /// Sample Command 5 for class 2
            /// </summary>
            COMMAND_5,
            /// <summary>
            /// Sample Command 6 for class 2
            /// </summary>
            COMMAND_6,
            COMMAND_NUM
         }
        public Class2()
        {
            Console.WriteLine("I'm Class1 and I'm being created");
        }  
    }
}



Steps to reproduce:
1. Create a project with the above reported class
2. Create a Doxygen project for it
3. Run Doxygen


Actual results:
When I generate the documentation with Doxygen, and I look for the Class1::Commands item, I obtain the following output:

// output on Doxygen doc:

enum WindowsApplication1::Class1::Commands  

This enum is used for specifying the command managed by this class. 


Enumerator: 
COMMAND_0  Sample Command 0 for class 1. 
 
COMMAND_1  Sample Command 1 for class 1. 
 
COMMAND_2  Sample Command 2 for class 1. 
 
COMMAND_3  Sample Command 3 for class 1. 
 
COMMAND_4  Sample Command 4 for class 1. 
 
COMMAND_5  Sample Command 5 for class 1. 
 
COMMAND_6  Sample Command 6 for class 1. 
 
COMMAND_0  Sample Command 0 for class 2. 
 
COMMAND_1  Sample Command 1 for class 2. 
 
COMMAND_2  Sample Command 2 for class 2. 
 
COMMAND_3  Sample Command 3 for class 2. 
 
COMMAND_4  Sample Command 4 for class 2. 
 
COMMAND_5  Sample Command 5 for class 2. 
 
COMMAND_6  Sample Command 6 for class 2. 
 

Definition at line 12 of file Class1.cs.

// End of generated documentation



Expected results:
When I generate the documentation with Doxygen, and I look for the Class1::Commands item, I obtain the following output:

// output on Doxygen doc:

enum WindowsApplication1::Class1::Commands  

This enum is used for specifying the command managed by this class. 


Enumerator: 
COMMAND_0  Sample Command 0 for class 1. 
 
COMMAND_1  Sample Command 1 for class 1. 
 
COMMAND_2  Sample Command 2 for class 1. 
 
COMMAND_3  Sample Command 3 for class 1. 
 
COMMAND_4  Sample Command 4 for class 1. 
 
COMMAND_5  Sample Command 5 for class 1. 
 
COMMAND_6  Sample Command 6 for class 1. 

Definition at line 12 of file Class1.cs.

// End of generated documentation



Does this happen every time?
Yes

Other information:
I'm using the last version of Doxygen (1.5.5)
Comment 1 Urs Fleisch 2009-08-18 14:56:05 UTC
I can confirm this bug with the latest release 1.5.9. Enums with the same name get merged. See also

http://stackoverflow.com/questions/1234077/doxygen-c-xml-comments-multiply-enums-with-same-name-and-different-scope-got-m
Comment 2 Dimitri van Heesch 2009-08-19 12:55:44 UTC
Confirmed. Should fixed in release 1.6.0.
Comment 3 Dimitri van Heesch 2009-08-20 10:12:59 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.6.0. Please verify if this is indeed the case and reopen the
bug if you think it is not fixed (include any additional information that you
think can be relevant).