• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 %typemap(javabase, notderived="1") SWIGTYPE "BulletBase"
2 
3 %typemap(javabody) SWIGTYPE %{
4 	private long swigCPtr;
5 
$javaclassname(final String className,long cPtr,boolean cMemoryOwn)6 	protected $javaclassname(final String className, long cPtr, boolean cMemoryOwn) {
7 		super(className, cPtr, cMemoryOwn);
8 		swigCPtr = cPtr;
9 	}
10 
11 	/** Construct a new $javaclassname, normally you should not need this constructor it's intended for low-level usage. */
$javaclassname(long cPtr,boolean cMemoryOwn)12 	public $javaclassname(long cPtr, boolean cMemoryOwn) {
13 		this("$javaclassname", cPtr, cMemoryOwn);
14 		construct();
15 	}
16 
17 	@Override
reset(long cPtr,boolean cMemoryOwn)18 	protected void reset(long cPtr, boolean cMemoryOwn) {
19 		if (!destroyed)
20 			destroy();
21 		super.reset(swigCPtr = cPtr, cMemoryOwn);
22 	}
23 
getCPtr($javaclassname obj)24 	public static long getCPtr($javaclassname obj) {
25 		return (obj == null) ? 0 : obj.swigCPtr;
26 	}
27 %}
28 
29 %typemap(javabody_derived) SWIGTYPE %{
30 	private long swigCPtr;
31 
$javaclassname(final String className,long cPtr,boolean cMemoryOwn)32 	protected $javaclassname(final String className, long cPtr, boolean cMemoryOwn) {
33 		super(className, $imclassname.$javaclazznameSWIGUpcast(cPtr), cMemoryOwn);
34 		swigCPtr = cPtr;
35 	}
36 
37 	/** Construct a new $javaclassname, normally you should not need this constructor it's intended for low-level usage. */
$javaclassname(long cPtr,boolean cMemoryOwn)38 	public $javaclassname(long cPtr, boolean cMemoryOwn) {
39 		this("$javaclassname", cPtr, cMemoryOwn);
40 		construct();
41 	}
42 
43 	@Override
reset(long cPtr,boolean cMemoryOwn)44 	protected void reset(long cPtr, boolean cMemoryOwn) {
45 		if (!destroyed)
46 			destroy();
47 		super.reset($imclassname.$javaclazznameSWIGUpcast(swigCPtr = cPtr), cMemoryOwn);
48 	}
49 
getCPtr($javaclassname obj)50 	public static long getCPtr($javaclassname obj) {
51 		return (obj == null) ? 0 : obj.swigCPtr;
52 	}
53 %}
54 
55 %typemap(javadestruct, methodname="delete", methodmodifiers="@Override protected synchronized") SWIGTYPE {
56 		if (swigCPtr != 0) {
57 			if (swigCMemOwn) {
58 				swigCMemOwn = false;
59 				$jnicall;
60 			}
61 			swigCPtr = 0;
62 		}
63 		super.delete();
64 	}
65 
66 %typemap(javadestruct_derived, methodname="delete", methodmodifiers="@Override protected synchronized") SWIGTYPE {
67 		if (swigCPtr != 0) {
68 			if (swigCMemOwn) {
69 				swigCMemOwn = false;
70 				$jnicall;
71 			}
72 			swigCPtr = 0;
73 		}
74 		super.delete();
75 	}
76 
77 %typemap(javafinalize) SWIGTYPE %{
78 	@Override
finalize()79 	protected void finalize() throws Throwable {
80 		if (!destroyed)
81 			destroy();
82 		super.finalize();
83 	}
84 %}