New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum Problem (Origin: bugzilla #522193) #2875

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component general for ---
Reported in version 1.5.5 on platform Other
Assigned to: Dimitri van Heesch

On 2008-03-13 09:36:04 +0000, Lorenzo Bonardi wrote:

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
{
///


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

public enum Commands : uint
{
///
/// Sample Command 0 for class 1
///

COMMAND_0,
///
/// Sample Command 1 for class 1
///

COMMAND_1,
///
/// Sample Command 2 for class 1
///

COMMAND_2,
///
/// Sample Command 3 for class 1
///

COMMAND_3,
///
/// Sample Command 4 for class 1
///

COMMAND_4,
///
/// Sample Command 5 for class 1
///

COMMAND_5,
///
/// Sample Command 6 for class 1
///

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
{
///


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

public enum Commands : uint
{
///
/// Sample Command 0 for class 2
///

COMMAND_0,
///
/// Sample Command 1 for class 2
///

COMMAND_1,
///
/// Sample Command 2 for class 2
///

COMMAND_2,
///
/// Sample Command 3 for class 2
///

COMMAND_3,
///
/// Sample Command 4 for class 2
///

COMMAND_4,
///
/// Sample Command 5 for class 2
///

COMMAND_5,
///
/// Sample Command 6 for class 2
///

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)

On 2009-08-18 14:56:05 +0000, Urs Fleisch wrote:

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

On 2009-08-19 12:55:44 +0000, Dimitri van Heesch wrote:

Confirmed. Should fixed in release 1.6.0.

On 2009-08-20 10:12:59 +0000, Dimitri van Heesch wrote:

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).

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment