Loading...
Searching...
No Matches
UserLocationView.java
Go to the documentation of this file.
1package com.navigine.idl.java;
2
3import java.util.concurrent.atomic.AtomicBoolean;
4
14public abstract class UserLocationView {
28 public abstract IconMapObject getArrow();
29
44
45 private static final class CppProxy extends UserLocationView
46 {
47 private final long nativeRef;
48 private final AtomicBoolean destroyed = new AtomicBoolean(false);
49
50 private CppProxy(long nativeRef)
51 {
52 if (nativeRef == 0) throw new RuntimeException("nativeRef is zero");
53 this.nativeRef = nativeRef;
54 }
55
56 private native void nativeDestroy(long nativeRef);
57 public void _djinni_private_destroy()
58 {
59 boolean destroyed = this.destroyed.getAndSet(true);
60 if (!destroyed) nativeDestroy(this.nativeRef);
61 }
62 protected void finalize() throws java.lang.Throwable
63 {
64 _djinni_private_destroy();
65 super.finalize();
66 }
67
68 // UserLocationView methods
69
70 @Override
71 public IconMapObject getArrow()
72 {
73 assert !this.destroyed.get() : "trying to use a destroyed object";
74 return native_getArrow(this.nativeRef);
75 }
76 private native IconMapObject native_getArrow(long _nativeRef);
77
78 @Override
79 public CircleMapObject getAccuracyCircle()
80 {
81 assert !this.destroyed.get() : "trying to use a destroyed object";
82 return native_getAccuracyCircle(this.nativeRef);
83 }
84 private native CircleMapObject native_getAccuracyCircle(long _nativeRef);
85 }
86}