-
-
Notifications
You must be signed in to change notification settings - Fork 591
Open
Labels
Description
One of the patterns of using C enum
s is to use them in combination with typedef
(for instance in Spinnaker API). Consider following enum
definition.
typedef enum _ENameSpace
{
Custom,
Standard,
_UndefinedNameSpace
} ENameSpace;
Using "new Info().enumerate()" a Java enum class named _ENameSpace
is generated:
@Namespace("Spinnaker::GenApi") public enum _ENameSpace {
...
}
But the usage in the original code (C++) is without underscore: ENameSpace
. The request is to provide option to make javacpp to create class without "_", using typedef
name ENameSpace
.
Note: following suggested in the mailing list does not work (will not create enum named ENameSpace
)
new Info("Spinnaker::GenApi::ENameSpace").enumerate().javaNames("ENameSpace")
Note: a work around to make _ENameSpace
work is to use:
new Info("ENameSpace")
.valueTypes("_ENameSpace")
.pointerTypes("@Cast(\"ENameSpace*\") @ByPtrPtr _ENameSpace")
in Java code you then need to use _ENameSpace