Loading...
Searching...
No Matches
Sublocation.java
Go to the documentation of this file.
1package com.navigine.idl.java;
2
3import java.util.ArrayList;
4import java.util.concurrent.atomic.AtomicBoolean;
5
19public abstract class Sublocation {
34 public abstract android.graphics.Bitmap getImage(Integer maxTextureSize);
35
51 public abstract LocationPoint globalToLocal(GlobalPoint globalPoint);
52
68 public abstract GlobalPoint localToGlobal(LocationPoint localPoint);
69
85 public abstract Graph getGraph(String tag);
86
102 public abstract Venue getVenueById(int id);
103
119 public abstract Zone getZoneById(int id);
120
133 public abstract int getId();
134
146 public abstract int getLocation();
147
159 public abstract String getName();
160
172 public abstract float getWidth();
173
185 public abstract float getHeight();
186
198 public abstract Float getAltitude();
199
211 public abstract float getAzimuth();
212
224 public abstract GlobalPoint getOriginPoint();
225
237 public abstract String getLevelId();
238
250 public abstract String getExternalId();
251
263 public abstract ArrayList<Beacon> getBeacons();
264
276 public abstract ArrayList<Eddystone> getEddystones();
277
289 public abstract ArrayList<Wifi> getWifis();
290
294 public abstract ArrayList<ReferencePoint> getReferencePoints();
295
308 public abstract ArrayList<Venue> getVenues();
309
321 public abstract ArrayList<Zone> getZones();
322
323 private static final class CppProxy extends Sublocation
324 {
325 private final long nativeRef;
326 private final AtomicBoolean destroyed = new AtomicBoolean(false);
327
328 private CppProxy(long nativeRef)
329 {
330 if (nativeRef == 0) throw new RuntimeException("nativeRef is zero");
331 this.nativeRef = nativeRef;
332 }
333
334 private native void nativeDestroy(long nativeRef);
335 public void _djinni_private_destroy()
336 {
337 boolean destroyed = this.destroyed.getAndSet(true);
338 if (!destroyed) nativeDestroy(this.nativeRef);
339 }
340 protected void finalize() throws java.lang.Throwable
341 {
342 _djinni_private_destroy();
343 super.finalize();
344 }
345
346 // Sublocation methods
347
348 @Override
349 public android.graphics.Bitmap getImage(Integer maxTextureSize)
350 {
351 assert !this.destroyed.get() : "trying to use a destroyed object";
352 return native_getImage(this.nativeRef, maxTextureSize);
353 }
354 private native android.graphics.Bitmap native_getImage(long _nativeRef, Integer maxTextureSize);
355
356 @Override
357 public LocationPoint globalToLocal(GlobalPoint globalPoint)
358 {
359 assert !this.destroyed.get() : "trying to use a destroyed object";
360 return native_globalToLocal(this.nativeRef, globalPoint);
361 }
362 private native LocationPoint native_globalToLocal(long _nativeRef, GlobalPoint globalPoint);
363
364 @Override
365 public GlobalPoint localToGlobal(LocationPoint localPoint)
366 {
367 assert !this.destroyed.get() : "trying to use a destroyed object";
368 return native_localToGlobal(this.nativeRef, localPoint);
369 }
370 private native GlobalPoint native_localToGlobal(long _nativeRef, LocationPoint localPoint);
371
372 @Override
373 public Graph getGraph(String tag)
374 {
375 assert !this.destroyed.get() : "trying to use a destroyed object";
376 return native_getGraph(this.nativeRef, tag);
377 }
378 private native Graph native_getGraph(long _nativeRef, String tag);
379
380 @Override
381 public Venue getVenueById(int id)
382 {
383 assert !this.destroyed.get() : "trying to use a destroyed object";
384 return native_getVenueById(this.nativeRef, id);
385 }
386 private native Venue native_getVenueById(long _nativeRef, int id);
387
388 @Override
389 public Zone getZoneById(int id)
390 {
391 assert !this.destroyed.get() : "trying to use a destroyed object";
392 return native_getZoneById(this.nativeRef, id);
393 }
394 private native Zone native_getZoneById(long _nativeRef, int id);
395
396 @Override
397 public int getId()
398 {
399 assert !this.destroyed.get() : "trying to use a destroyed object";
400 return native_getId(this.nativeRef);
401 }
402 private native int native_getId(long _nativeRef);
403
404 @Override
405 public int getLocation()
406 {
407 assert !this.destroyed.get() : "trying to use a destroyed object";
408 return native_getLocation(this.nativeRef);
409 }
410 private native int native_getLocation(long _nativeRef);
411
412 @Override
413 public String getName()
414 {
415 assert !this.destroyed.get() : "trying to use a destroyed object";
416 return native_getName(this.nativeRef);
417 }
418 private native String native_getName(long _nativeRef);
419
420 @Override
421 public float getWidth()
422 {
423 assert !this.destroyed.get() : "trying to use a destroyed object";
424 return native_getWidth(this.nativeRef);
425 }
426 private native float native_getWidth(long _nativeRef);
427
428 @Override
429 public float getHeight()
430 {
431 assert !this.destroyed.get() : "trying to use a destroyed object";
432 return native_getHeight(this.nativeRef);
433 }
434 private native float native_getHeight(long _nativeRef);
435
436 @Override
437 public Float getAltitude()
438 {
439 assert !this.destroyed.get() : "trying to use a destroyed object";
440 return native_getAltitude(this.nativeRef);
441 }
442 private native Float native_getAltitude(long _nativeRef);
443
444 @Override
445 public float getAzimuth()
446 {
447 assert !this.destroyed.get() : "trying to use a destroyed object";
448 return native_getAzimuth(this.nativeRef);
449 }
450 private native float native_getAzimuth(long _nativeRef);
451
452 @Override
453 public GlobalPoint getOriginPoint()
454 {
455 assert !this.destroyed.get() : "trying to use a destroyed object";
456 return native_getOriginPoint(this.nativeRef);
457 }
458 private native GlobalPoint native_getOriginPoint(long _nativeRef);
459
460 @Override
461 public String getLevelId()
462 {
463 assert !this.destroyed.get() : "trying to use a destroyed object";
464 return native_getLevelId(this.nativeRef);
465 }
466 private native String native_getLevelId(long _nativeRef);
467
468 @Override
469 public String getExternalId()
470 {
471 assert !this.destroyed.get() : "trying to use a destroyed object";
472 return native_getExternalId(this.nativeRef);
473 }
474 private native String native_getExternalId(long _nativeRef);
475
476 @Override
477 public ArrayList<Beacon> getBeacons()
478 {
479 assert !this.destroyed.get() : "trying to use a destroyed object";
480 return native_getBeacons(this.nativeRef);
481 }
482 private native ArrayList<Beacon> native_getBeacons(long _nativeRef);
483
484 @Override
485 public ArrayList<Eddystone> getEddystones()
486 {
487 assert !this.destroyed.get() : "trying to use a destroyed object";
488 return native_getEddystones(this.nativeRef);
489 }
490 private native ArrayList<Eddystone> native_getEddystones(long _nativeRef);
491
492 @Override
493 public ArrayList<Wifi> getWifis()
494 {
495 assert !this.destroyed.get() : "trying to use a destroyed object";
496 return native_getWifis(this.nativeRef);
497 }
498 private native ArrayList<Wifi> native_getWifis(long _nativeRef);
499
500 @Override
501 public ArrayList<ReferencePoint> getReferencePoints()
502 {
503 assert !this.destroyed.get() : "trying to use a destroyed object";
504 return native_getReferencePoints(this.nativeRef);
505 }
506 private native ArrayList<ReferencePoint> native_getReferencePoints(long _nativeRef);
507
508 @Override
509 public ArrayList<Venue> getVenues()
510 {
511 assert !this.destroyed.get() : "trying to use a destroyed object";
512 return native_getVenues(this.nativeRef);
513 }
514 private native ArrayList<Venue> native_getVenues(long _nativeRef);
515
516 @Override
517 public ArrayList<Zone> getZones()
518 {
519 assert !this.destroyed.get() : "trying to use a destroyed object";
520 return native_getZones(this.nativeRef);
521 }
522 private native ArrayList<Zone> native_getZones(long _nativeRef);
523 }
524}