GNOME Bugzilla – Bug 522193
Enum Problem
Last modified: 2009-08-20 10:12:59 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)
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
Confirmed. Should fixed in release 1.6.0.
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).