PageRenderTime 41ms CodeModel.GetById 39ms app.highlight 0ms 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
 8// const enum SWIGTYPE & typemaps
 9%typemap(jni) const enum SWIGTYPE & "jint"
10%typemap(jtype) const enum SWIGTYPE & "int"
11%typemap(jstype) const enum SWIGTYPE & "int"
12
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
18%typemap(directorout,warning=SWIG_WARN_TYPEMAP_THREAD_UNSAFE) const enum SWIGTYPE &
19%{ static $*1_ltype temp;
20   temp = ($*1_ltype)$input; 
21   $1 = &temp; %}
22%typemap(directorin, descriptor="I") const enum SWIGTYPE &    "$input = (jint)$1_name;"
23%typemap(javadirectorin) const enum SWIGTYPE & "$jniinput"
24%typemap(javadirectorout) const enum SWIGTYPE & "$javacall"
25
26%typecheck(SWIG_TYPECHECK_INT32) const enum SWIGTYPE & ""
27
28%typemap(throws) const enum SWIGTYPE & %{
29  (void)$1;
30  SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown");
31%}
32
33%typemap(javain) const enum SWIGTYPE & "$javainput"
34%typemap(javaout) const enum SWIGTYPE & {
35    return $jnicall;
36  }
37
38
39// enum SWIGTYPE typemaps
40%typemap(jni) enum SWIGTYPE "jint"
41%typemap(jtype) enum SWIGTYPE "int"
42%typemap(jstype) enum SWIGTYPE "int"
43
44%typemap(in) enum SWIGTYPE  %{ $1 = ($1_ltype)$input; %}
45%typemap(out) enum SWIGTYPE  %{ $result = (jint)$1; %}
46
47%typemap(directorout) enum SWIGTYPE  %{ $1 = ($1_ltype)$input; %}
48%typemap(directorin, descriptor="I") enum SWIGTYPE    "$input = (jint) $1;"
49%typemap(javadirectorin) enum SWIGTYPE "$jniinput"
50%typemap(javadirectorout) enum SWIGTYPE "$javacall"
51
52%typecheck(SWIG_TYPECHECK_INT32) enum SWIGTYPE ""
53
54%typemap(throws) enum SWIGTYPE %{
55  (void)$1;
56  SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown");
57%}
58
59%typemap(javain) enum SWIGTYPE "$javainput"
60%typemap(javaout) enum SWIGTYPE {
61    return $jnicall;
62  }
63
64%typemap(javaclassmodifiers) enum SWIGTYPE ""
65%typemap(javabase)           enum SWIGTYPE ""
66%typemap(javacode)           enum SWIGTYPE ""
67%typemap(javaimports)        enum SWIGTYPE ""
68%typemap(javainterfaces)     enum SWIGTYPE ""
69%typemap(javabody)           enum SWIGTYPE ""
70
71%javaenum(simple);
72