enumsimple.swg 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* -----------------------------------------------------------------------------
  2. * enumsimple.swg
  3. *
  4. * This file provides backwards compatible enum wrapping. SWIG versions 1.3.21
  5. * and earlier wrapped global enums with constant integers in the module class
  6. * or Constants interface. Enums declared within a C++ class were wrapped by
  7. * constant integers in the Java proxy class.
  8. * ----------------------------------------------------------------------------- */
  9. // const enum SWIGTYPE & typemaps
  10. %typemap(jni) const enum SWIGTYPE & "jint"
  11. %typemap(jtype) const enum SWIGTYPE & "int"
  12. %typemap(jstype) const enum SWIGTYPE & "int"
  13. %typemap(in) const enum SWIGTYPE & ($*1_ltype temp)
  14. %{ temp = ($*1_ltype)$input;
  15. $1 = &temp; %}
  16. %typemap(out) const enum SWIGTYPE & %{ $result = (jint)*$1; %}
  17. %typemap(directorout,warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const enum SWIGTYPE &
  18. %{ static $*1_ltype temp = ($*1_ltype)$input;
  19. $result = &temp; %}
  20. %typemap(directorin, descriptor="I") const enum SWIGTYPE & "$input = (jint)$1;"
  21. %typemap(javadirectorin) const enum SWIGTYPE & "$jniinput"
  22. %typemap(javadirectorout) const enum SWIGTYPE & "$javacall"
  23. %typecheck(SWIG_TYPECHECK_INT32) const enum SWIGTYPE & ""
  24. %typemap(throws) const enum SWIGTYPE &
  25. %{ (void)$1;
  26. SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown"); %}
  27. %typemap(javain) const enum SWIGTYPE & "$javainput"
  28. %typemap(javaout) const enum SWIGTYPE & {
  29. return $jnicall;
  30. }
  31. // enum SWIGTYPE typemaps
  32. %typemap(jni) enum SWIGTYPE "jint"
  33. %typemap(jtype) enum SWIGTYPE "int"
  34. %typemap(jstype) enum SWIGTYPE "int"
  35. %typemap(in) enum SWIGTYPE %{ $1 = ($1_ltype)$input; %}
  36. %typemap(out) enum SWIGTYPE %{ $result = (jint)$1; %}
  37. %typemap(directorout) enum SWIGTYPE %{ $result = ($1_ltype)$input; %}
  38. %typemap(directorin, descriptor="I") enum SWIGTYPE "$input = (jint) $1;"
  39. %typemap(javadirectorin) enum SWIGTYPE "$jniinput"
  40. %typemap(javadirectorout) enum SWIGTYPE "$javacall"
  41. %typecheck(SWIG_TYPECHECK_INT32) enum SWIGTYPE ""
  42. %typemap(throws) enum SWIGTYPE
  43. %{ (void)$1;
  44. SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown"); %}
  45. %typemap(javain) enum SWIGTYPE "$javainput"
  46. %typemap(javaout) enum SWIGTYPE {
  47. return $jnicall;
  48. }
  49. %typemap(javaclassmodifiers) enum SWIGTYPE ""
  50. %typemap(javabase) enum SWIGTYPE ""
  51. %typemap(javacode) enum SWIGTYPE ""
  52. %typemap(javaimports) enum SWIGTYPE ""
  53. %typemap(javainterfaces) enum SWIGTYPE ""
  54. %typemap(javabody) enum SWIGTYPE ""
  55. %javaenum(simple);