Urbi SDK Remote for Java  2.7.5
UNamedValue.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   /*--------------.
00011   | UNamedValue.  |
00012   `--------------*/
00013 
00014 public class UNamedValue {
00015   private long swigCPtr;
00016   protected boolean swigCMemOwn;
00017 
00018   public UNamedValue(long cPtr, boolean cMemoryOwn) {
00019     swigCMemOwn = cMemoryOwn;
00020     swigCPtr = cPtr;
00021   }
00022 
00023   public static long getCPtr(UNamedValue obj) {
00024     return (obj == null) ? 0 : obj.swigCPtr;
00025   }
00026 
00027   protected void finalize() {
00028     delete();
00029   }
00030 
00031   public synchronized void delete() {
00032     if (swigCPtr != 0) {
00033       if (swigCMemOwn) {
00034         swigCMemOwn = false;
00035         urbiJNI.delete_UNamedValue(swigCPtr);
00036       }
00037       swigCPtr = 0;
00038     }
00039   }
00040 
00041   public UNamedValue(String n, UValue v) {
00042     this(urbiJNI.new_UNamedValue__SWIG_0(n, UValue.getCPtr(v), v), true);
00043   }
00044 
00045   public UNamedValue(String n) {
00046     this(urbiJNI.new_UNamedValue__SWIG_1(n), true);
00047   }
00048 
00049   public UNamedValue() {
00050     this(urbiJNI.new_UNamedValue__SWIG_2(), true);
00051   }
00052 
00053       // Used on errors.
00054  public  static UNamedValue error() {
00055     return new UNamedValue(urbiJNI.UNamedValue_error(), false);
00056   }
00057 
00058   public void setName(String value) {
00059     urbiJNI.UNamedValue_name_set(swigCPtr, this, value);
00060   }
00061 
00062   public String getName() {
00063     return urbiJNI.UNamedValue_name_get(swigCPtr, this);
00064   }
00065 
00066   public void setVal(UValue value) {
00067     urbiJNI.UNamedValue_val_set(swigCPtr, this, UValue.getCPtr(value), value);
00068   }
00069 
00070   public UValue getVal() {
00071     long cPtr = urbiJNI.UNamedValue_val_get(swigCPtr, this);
00072     return (cPtr == 0) ? null : new UValue(cPtr, false);
00073   }
00074 
00075 }