doxygen-vb-filter
doxygen-vb-filter copied to clipboard
bug on interface with enum
The following vb.net code:
Public Interface ISample
Inherits IDisposable
''' <summary>
''' simple property
''' </summary>
''' <value>returns a string value</value>
Property StringProperty() As String
Enum SampleEnum1 As Short
Value1 ' first value
''' <summary>
''' second value
''' </summary>
Value2
Value3 = 1234 ' third assigned value
Value4 ' fourth value
End Enum
End Interface
correctly produces this c#:
public interface ISample
: IDisposable
{
/**
* <summary>
* simple property
* </summary>
* <value>returns a string value</value>
*/
string StringProperty
{ get; set; }
enum SampleEnum1
{
Value1, /**< \brief first value */
/**
* <summary>
* second value
* </summary>
*/
Value2,
Value3 = 1234, /**< \brief third assigned value */
Value4 /**< \brief fourth value */
}
}
However if you swap the enum and property order around: the following vb.net code:
Public Interface ISample
Inherits IDisposable
Enum SampleEnum1 As Short
Value1 ' first value
''' <summary>
''' second value
''' </summary>
Value2
Value3 = 1234 ' third assigned value
Value4 ' fourth value
End Enum
''' <summary>
''' simple property
''' </summary>
''' <value>returns a string value</value>
Property StringProperty() As String
End Interface
produces the following broken c#:
public interface ISample
enum SampleEnum1
{
Value1, /**< \brief first value */
/**
* <summary>
* second value
* </summary>
*/
Value2,
Value3 = 1234, /**< \brief third assigned value */
Value4 /**< \brief fourth value */
}
: IDisposable
{
/**
* <summary>
* simple property
* </summary>
* <value>returns a string value</value>
*/
string StringProperty
{ get; set; }
}
Notice the enum is declared in the middle of the interface declaration line, not in the body. This confuses doxygen mightily!
This also seems to happen with enums on classes
I know your comment is long time ago but I'm working on a fork for this script and already fixed this issue. Just let me know if you are still interested.