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 {
35 public abstract android.graphics.Bitmap getImage(Integer maxTextureSize);
36
53 public abstract LocationPoint globalToLocal(GlobalPoint globalPoint);
54
71 public abstract GlobalPoint localToGlobal(LocationPoint localPoint);
72
89 public abstract Graph getGraph(String tag);
90
107 public abstract Venue getVenueById(int id);
108
125 public abstract Zone getZoneById(int id);
126
140 public abstract int getId();
141
155 public abstract int getLocation();
156
170 public abstract String getName();
171
185 public abstract float getWidth();
186
200 public abstract float getHeight();
201
215 public abstract Float getAltitude();
216
230 public abstract float getAzimuth();
231
245 public abstract GlobalPoint getOriginPoint();
246
260 public abstract String getLevelId();
261
275 public abstract String getExternalId();
276
290 public abstract String getBuildingName();
291
305 public abstract ArrayList<Beacon> getBeacons();
306
320 public abstract ArrayList<Eddystone> getEddystones();
321
335 public abstract ArrayList<Wifi> getWifis();
336
340 public abstract ArrayList<ReferencePoint> getReferencePoints();
341
357 public abstract ArrayList<Venue> getVenues();
358
372 public abstract ArrayList<Zone> getZones();
373
374 private static final class CppProxy extends Sublocation
375 {
376 private final long nativeRef;
377 private final AtomicBoolean destroyed = new AtomicBoolean(false);
378
379 private CppProxy(long nativeRef)
380 {
381 if (nativeRef == 0) throw new RuntimeException("nativeRef is zero");
382 this.nativeRef = nativeRef;
383 }
384
385 private native void nativeDestroy(long nativeRef);
386 public void _djinni_private_destroy()
387 {
388 boolean destroyed = this.destroyed.getAndSet(true);
389 if (!destroyed) nativeDestroy(this.nativeRef);
390 }
391 protected void finalize() throws java.lang.Throwable
392 {
393 _djinni_private_destroy();
394 super.finalize();
395 }
396
397 // Sublocation methods
398
399 @Override
400 public android.graphics.Bitmap getImage(Integer maxTextureSize)
401 {
402 assert !this.destroyed.get() : "trying to use a destroyed object";
403 return native_getImage(this.nativeRef, maxTextureSize);
404 }
405 private native android.graphics.Bitmap native_getImage(long _nativeRef, Integer maxTextureSize);
406
407 @Override
408 public LocationPoint globalToLocal(GlobalPoint globalPoint)
409 {
410 assert !this.destroyed.get() : "trying to use a destroyed object";
411 return native_globalToLocal(this.nativeRef, globalPoint);
412 }
413 private native LocationPoint native_globalToLocal(long _nativeRef, GlobalPoint globalPoint);
414
415 @Override
416 public GlobalPoint localToGlobal(LocationPoint localPoint)
417 {
418 assert !this.destroyed.get() : "trying to use a destroyed object";
419 return native_localToGlobal(this.nativeRef, localPoint);
420 }
421 private native GlobalPoint native_localToGlobal(long _nativeRef, LocationPoint localPoint);
422
423 @Override
424 public Graph getGraph(String tag)
425 {
426 assert !this.destroyed.get() : "trying to use a destroyed object";
427 return native_getGraph(this.nativeRef, tag);
428 }
429 private native Graph native_getGraph(long _nativeRef, String tag);
430
431 @Override
432 public Venue getVenueById(int id)
433 {
434 assert !this.destroyed.get() : "trying to use a destroyed object";
435 return native_getVenueById(this.nativeRef, id);
436 }
437 private native Venue native_getVenueById(long _nativeRef, int id);
438
439 @Override
440 public Zone getZoneById(int id)
441 {
442 assert !this.destroyed.get() : "trying to use a destroyed object";
443 return native_getZoneById(this.nativeRef, id);
444 }
445 private native Zone native_getZoneById(long _nativeRef, int id);
446
447 @Override
448 public int getId()
449 {
450 assert !this.destroyed.get() : "trying to use a destroyed object";
451 return native_getId(this.nativeRef);
452 }
453 private native int native_getId(long _nativeRef);
454
455 @Override
456 public int getLocation()
457 {
458 assert !this.destroyed.get() : "trying to use a destroyed object";
459 return native_getLocation(this.nativeRef);
460 }
461 private native int native_getLocation(long _nativeRef);
462
463 @Override
464 public String getName()
465 {
466 assert !this.destroyed.get() : "trying to use a destroyed object";
467 return native_getName(this.nativeRef);
468 }
469 private native String native_getName(long _nativeRef);
470
471 @Override
472 public float getWidth()
473 {
474 assert !this.destroyed.get() : "trying to use a destroyed object";
475 return native_getWidth(this.nativeRef);
476 }
477 private native float native_getWidth(long _nativeRef);
478
479 @Override
480 public float getHeight()
481 {
482 assert !this.destroyed.get() : "trying to use a destroyed object";
483 return native_getHeight(this.nativeRef);
484 }
485 private native float native_getHeight(long _nativeRef);
486
487 @Override
488 public Float getAltitude()
489 {
490 assert !this.destroyed.get() : "trying to use a destroyed object";
491 return native_getAltitude(this.nativeRef);
492 }
493 private native Float native_getAltitude(long _nativeRef);
494
495 @Override
496 public float getAzimuth()
497 {
498 assert !this.destroyed.get() : "trying to use a destroyed object";
499 return native_getAzimuth(this.nativeRef);
500 }
501 private native float native_getAzimuth(long _nativeRef);
502
503 @Override
504 public GlobalPoint getOriginPoint()
505 {
506 assert !this.destroyed.get() : "trying to use a destroyed object";
507 return native_getOriginPoint(this.nativeRef);
508 }
509 private native GlobalPoint native_getOriginPoint(long _nativeRef);
510
511 @Override
512 public String getLevelId()
513 {
514 assert !this.destroyed.get() : "trying to use a destroyed object";
515 return native_getLevelId(this.nativeRef);
516 }
517 private native String native_getLevelId(long _nativeRef);
518
519 @Override
520 public String getExternalId()
521 {
522 assert !this.destroyed.get() : "trying to use a destroyed object";
523 return native_getExternalId(this.nativeRef);
524 }
525 private native String native_getExternalId(long _nativeRef);
526
527 @Override
528 public String getBuildingName()
529 {
530 assert !this.destroyed.get() : "trying to use a destroyed object";
531 return native_getBuildingName(this.nativeRef);
532 }
533 private native String native_getBuildingName(long _nativeRef);
534
535 @Override
536 public ArrayList<Beacon> getBeacons()
537 {
538 assert !this.destroyed.get() : "trying to use a destroyed object";
539 return native_getBeacons(this.nativeRef);
540 }
541 private native ArrayList<Beacon> native_getBeacons(long _nativeRef);
542
543 @Override
544 public ArrayList<Eddystone> getEddystones()
545 {
546 assert !this.destroyed.get() : "trying to use a destroyed object";
547 return native_getEddystones(this.nativeRef);
548 }
549 private native ArrayList<Eddystone> native_getEddystones(long _nativeRef);
550
551 @Override
552 public ArrayList<Wifi> getWifis()
553 {
554 assert !this.destroyed.get() : "trying to use a destroyed object";
555 return native_getWifis(this.nativeRef);
556 }
557 private native ArrayList<Wifi> native_getWifis(long _nativeRef);
558
559 @Override
560 public ArrayList<ReferencePoint> getReferencePoints()
561 {
562 assert !this.destroyed.get() : "trying to use a destroyed object";
563 return native_getReferencePoints(this.nativeRef);
564 }
565 private native ArrayList<ReferencePoint> native_getReferencePoints(long _nativeRef);
566
567 @Override
568 public ArrayList<Venue> getVenues()
569 {
570 assert !this.destroyed.get() : "trying to use a destroyed object";
571 return native_getVenues(this.nativeRef);
572 }
573 private native ArrayList<Venue> native_getVenues(long _nativeRef);
574
575 @Override
576 public ArrayList<Zone> getZones()
577 {
578 assert !this.destroyed.get() : "trying to use a destroyed object";
579 return native_getZones(this.nativeRef);
580 }
581 private native ArrayList<Zone> native_getZones(long _nativeRef);
582 }
583}