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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4