Urbi SDK Remote for Java  2.7.5
UCallbackWrapper.java
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 2.0.4
00004  *
00005  * Do not make changes to this file unless you know what you are doing--modify
00006  * the SWIG interface file instead.
00007  * ----------------------------------------------------------------------------- */
00008 
00009 package urbi;
00010   /// Wrapper around a callback function. Use callback() to create them.
00011 
00012 public class UCallbackWrapper {
00013   private long swigCPtr;
00014   protected boolean swigCMemOwn;
00015 
00016   public UCallbackWrapper(long cPtr, boolean cMemoryOwn) {
00017     swigCMemOwn = cMemoryOwn;
00018     swigCPtr = cPtr;
00019   }
00020 
00021   public static long getCPtr(UCallbackWrapper obj) {
00022     return (obj == null) ? 0 : obj.swigCPtr;
00023   }
00024 
00025   protected void finalize() {
00026     delete();
00027   }
00028 
00029   public synchronized void delete() {
00030     if (swigCPtr != 0) {
00031       if (swigCMemOwn) {
00032         swigCMemOwn = false;
00033         urbiJNI.delete_UCallbackWrapper(swigCPtr);
00034       }
00035       swigCPtr = 0;
00036     }
00037   }
00038 
00039 }