PageRenderTime 50ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-25/SWIG/Lib/java/enumsimple.swg

#
Unknown | 72 lines | 56 code | 16 blank | 0 comment | 0 complexity | a25743550b52b6913d8f5143f5604df9 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. /* -----------------------------------------------------------------------------
  2. * This file provides backwards compatible enum wrapping. SWIG versions 1.3.21
  3. * and earlier wrapped global enums with constant integers in the module class
  4. * or Constants interface. Enums declared within a C++ class were wrapped by
  5. * constant integers in the Java proxy class.
  6. * ----------------------------------------------------------------------------- */
  7. // const enum SWIGTYPE & typemaps
  8. %typemap(jni) const enum SWIGTYPE & "jint"
  9. %typemap(jtype) const enum SWIGTYPE & "int"
  10. %typemap(jstype) const enum SWIGTYPE & "int"
  11. %typemap(in) const enum SWIGTYPE & ($*1_ltype temp)
  12. %{ temp = ($*1_ltype)$input;
  13. $1 = &temp; %}
  14. %typemap(out) const enum SWIGTYPE & %{ $result = (jint)*$1; %}
  15. %typemap(directorout,warning=SWIG_WARN_TYPEMAP_THREAD_UNSAFE) const enum SWIGTYPE &
  16. %{ static $*1_ltype temp;
  17. temp = ($*1_ltype)$input;
  18. $1 = &temp; %}
  19. %typemap(directorin, descriptor="I") const enum SWIGTYPE & "$input = (jint)$1_name;"
  20. %typemap(javadirectorin) const enum SWIGTYPE & "$jniinput"
  21. %typemap(javadirectorout) const enum SWIGTYPE & "$javacall"
  22. %typecheck(SWIG_TYPECHECK_INT32) const enum SWIGTYPE & ""
  23. %typemap(throws) const enum SWIGTYPE & %{
  24. (void)$1;
  25. SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown");
  26. %}
  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 %{ $1 = ($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. %}
  46. %typemap(javain) enum SWIGTYPE "$javainput"
  47. %typemap(javaout) enum SWIGTYPE {
  48. return $jnicall;
  49. }
  50. %typemap(javaclassmodifiers) enum SWIGTYPE ""
  51. %typemap(javabase) enum SWIGTYPE ""
  52. %typemap(javacode) enum SWIGTYPE ""
  53. %typemap(javaimports) enum SWIGTYPE ""
  54. %typemap(javainterfaces) enum SWIGTYPE ""
  55. %typemap(javabody) enum SWIGTYPE ""
  56. %javaenum(simple);