Urbi SDK Remote for Java  2.7.5
UValue.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   | UValue.  |
00012   `---------*/
00013   /** Container for a value that handles all types known to URBI.
00014    */
00015 
00016 public class UValue {
00017   private long swigCPtr;
00018   protected boolean swigCMemOwn;
00019 
00020   public UValue(long cPtr, boolean cMemoryOwn) {
00021     swigCMemOwn = cMemoryOwn;
00022     swigCPtr = cPtr;
00023   }
00024 
00025   public static long getCPtr(UValue obj) {
00026     return (obj == null) ? 0 : obj.swigCPtr;
00027   }
00028 
00029   protected void finalize() {
00030     delete();
00031   }
00032 
00033   public synchronized void delete() {
00034     if (swigCPtr != 0) {
00035       if (swigCMemOwn) {
00036         swigCMemOwn = false;
00037         urbiJNI.delete_UValue(swigCPtr);
00038       }
00039       swigCPtr = 0;
00040     }
00041   }
00042 
00043   public void setType(UDataType value) {
00044     urbiJNI.UValue_type_set(swigCPtr, this, value.swigValue());
00045   }
00046 
00047   public UDataType getType() {
00048     return UDataType.swigToEnum(urbiJNI.UValue_type_get(swigCPtr, this));
00049   }
00050 
00051   public void setVal(double value) {
00052     urbiJNI.UValue_val_set(swigCPtr, this, value);
00053   }
00054 
00055   public double getVal() {
00056     return urbiJNI.UValue_val_get(swigCPtr, this);
00057   }
00058 
00059   public UValue() {
00060     this(urbiJNI.new_UValue__SWIG_0(), true);
00061   }
00062 
00063   public UValue(UValue arg0) {
00064     this(urbiJNI.new_UValue__SWIG_1(UValue.getCPtr(arg0), arg0), true);
00065   }
00066 
00067   public UValue setValue(UValue arg0) {
00068     return new UValue(urbiJNI.UValue_setValue__SWIG_0(swigCPtr, this, UValue.getCPtr(arg0), arg0), false);
00069   }
00070 
00071       /// Setter. If copy is false, binary data if present is not copied.
00072     /// This is dangerous, as the user must ensure that the source UValue
00073     /// lives longer than this one.
00074  public  UValue setValue(UValue arg0, boolean copy) {
00075     return new UValue(urbiJNI.UValue_setValue__SWIG_1(swigCPtr, this, UValue.getCPtr(arg0), arg0, copy), false);
00076   }
00077 
00078       /// Delete content and reset type to void.
00079  public  void clear() {
00080     urbiJNI.UValue_clear(swigCPtr, this);
00081   }
00082 
00083       /// A specific UValue used when we want to return an error.
00084     /// For instance, out-of-bound access returns this object.
00085  public  static UValue error() {
00086     return new UValue(urbiJNI.UValue_error(), false);
00087   }
00088 
00089       /// Return a legible definition of UDataType
00090  public  String format_string() {
00091     return urbiJNI.UValue_format_string(swigCPtr, this);
00092   }
00093 
00094   public UValue(double arg0, boolean copy) {
00095     this(urbiJNI.new_UValue__SWIG_2(arg0, copy), true);
00096   }
00097 
00098   public UValue(double arg0) {
00099     this(urbiJNI.new_UValue__SWIG_3(arg0), true);
00100   }
00101 
00102   public UValue setValue(double arg0) {
00103     return new UValue(urbiJNI.UValue_setValue__SWIG_2(swigCPtr, this, arg0), false);
00104   }
00105 
00106   public UValue(int arg0, boolean copy) {
00107     this(urbiJNI.new_UValue__SWIG_4(arg0, copy), true);
00108   }
00109 
00110   public UValue(int arg0) {
00111     this(urbiJNI.new_UValue__SWIG_5(arg0), true);
00112   }
00113 
00114   public UValue setValue(int arg0) {
00115     return new UValue(urbiJNI.UValue_setValue__SWIG_3(swigCPtr, this, arg0), false);
00116   }
00117 
00118   public UValue(long arg0) {
00119     this(urbiJNI.new_UValue__SWIG_7(arg0), true);
00120   }
00121 
00122   public UValue setValue(long arg0) {
00123     return new UValue(urbiJNI.UValue_setValue__SWIG_5(swigCPtr, this, arg0), false);
00124   }
00125 
00126   public UValue(java.math.BigInteger arg0, boolean copy) {
00127     this(urbiJNI.new_UValue__SWIG_9(arg0, copy), true);
00128   }
00129 
00130   public UValue(java.math.BigInteger arg0) {
00131     this(urbiJNI.new_UValue__SWIG_10(arg0), true);
00132   }
00133 
00134   public UValue setValue(java.math.BigInteger arg0) {
00135     return new UValue(urbiJNI.UValue_setValue__SWIG_7(swigCPtr, this, arg0), false);
00136   }
00137 
00138   public UValue(String arg0, boolean copy) {
00139     this(urbiJNI.new_UValue__SWIG_12(arg0, copy), true);
00140   }
00141 
00142   public UValue(String arg0) {
00143     this(urbiJNI.new_UValue__SWIG_13(arg0), true);
00144   }
00145 
00146   public UValue setValue(String arg0) {
00147     return new UValue(urbiJNI.UValue_setValue__SWIG_9(swigCPtr, this, arg0), false);
00148   }
00149 
00150   public UValue(UBinary arg0, boolean copy) {
00151     this(urbiJNI.new_UValue__SWIG_16(UBinary.getCPtr(arg0), arg0, copy), true);
00152   }
00153 
00154   public UValue(UBinary arg0) {
00155     this(urbiJNI.new_UValue__SWIG_17(UBinary.getCPtr(arg0), arg0), true);
00156   }
00157 
00158   public UValue setValue(UBinary arg0) {
00159     return new UValue(urbiJNI.UValue_setValue__SWIG_11(swigCPtr, this, UBinary.getCPtr(arg0), arg0), false);
00160   }
00161 
00162   public UValue(UList arg0, boolean copy) {
00163     this(urbiJNI.new_UValue__SWIG_18(UList.getCPtr(arg0), arg0, copy), true);
00164   }
00165 
00166   public UValue(UList arg0) {
00167     this(urbiJNI.new_UValue__SWIG_19(UList.getCPtr(arg0), arg0), true);
00168   }
00169 
00170   public UValue setValue(UList arg0) {
00171     return new UValue(urbiJNI.UValue_setValue__SWIG_12(swigCPtr, this, UList.getCPtr(arg0), arg0), false);
00172   }
00173 
00174   public UValue(UDictionary arg0, boolean copy) {
00175     this(urbiJNI.new_UValue__SWIG_20(UDictionary.getCPtr(arg0), arg0, copy), true);
00176   }
00177 
00178   public UValue(UDictionary arg0) {
00179     this(urbiJNI.new_UValue__SWIG_21(UDictionary.getCPtr(arg0), arg0), true);
00180   }
00181 
00182   public UValue setValue(UDictionary arg0) {
00183     return new UValue(urbiJNI.UValue_setValue__SWIG_13(swigCPtr, this, UDictionary.getCPtr(arg0), arg0), false);
00184   }
00185 
00186   public UValue(USound arg0, boolean copy) {
00187     this(urbiJNI.new_UValue__SWIG_22(USound.getCPtr(arg0), arg0, copy), true);
00188   }
00189 
00190   public UValue(USound arg0) {
00191     this(urbiJNI.new_UValue__SWIG_23(USound.getCPtr(arg0), arg0), true);
00192   }
00193 
00194   public UValue setValue(USound arg0) {
00195     return new UValue(urbiJNI.UValue_setValue__SWIG_14(swigCPtr, this, USound.getCPtr(arg0), arg0), false);
00196   }
00197 
00198   public UValue(UImage arg0, boolean copy) {
00199     this(urbiJNI.new_UValue__SWIG_24(UImage.getCPtr(arg0), arg0, copy), true);
00200   }
00201 
00202   public UValue(UImage arg0) {
00203     this(urbiJNI.new_UValue__SWIG_25(UImage.getCPtr(arg0), arg0), true);
00204   }
00205 
00206   public UValue setValue(UImage arg0) {
00207     return new UValue(urbiJNI.UValue_setValue__SWIG_15(swigCPtr, this, UImage.getCPtr(arg0), arg0), false);
00208   }
00209 
00210   public double doubleValue() {
00211     return urbiJNI.UValue_doubleValue__SWIG_0(swigCPtr, this);
00212   }
00213 
00214   public String stringValue() {
00215     return urbiJNI.UValue_stringValue(swigCPtr, this);
00216   }
00217 
00218   public int intValue() {
00219     return urbiJNI.UValue_intValue(swigCPtr, this);
00220   }
00221 
00222   public long longValue() {
00223     return urbiJNI.UValue_longValue(swigCPtr, this);
00224   }
00225 
00226   public boolean booleanValue() {
00227     return urbiJNI.UValue_booleanValue(swigCPtr, this);
00228   }
00229 
00230   public UBinary ubinaryValue() {
00231     return new UBinary(urbiJNI.UValue_ubinaryValue(swigCPtr, this), false);
00232   }
00233 
00234   public UList ulistValue() {
00235     return new UList(urbiJNI.UValue_ulistValue(swigCPtr, this), true);
00236   }
00237 
00238   public UDictionary udictionaryValue() {
00239     return new UDictionary(urbiJNI.UValue_udictionaryValue(swigCPtr, this), true);
00240   }
00241 
00242   public UImage uimageValue() {
00243     return new UImage(urbiJNI.UValue_uimageValue(swigCPtr, this), true);
00244   }
00245 
00246   public USound usoundValue() {
00247     return new USound(urbiJNI.UValue_usoundValue(swigCPtr, this), true);
00248   }
00249 
00250   public String toString() {
00251     return urbiJNI.UValue_toString(swigCPtr, this);
00252   }
00253 
00254 }