|
Urbi SDK Remote for Java
2.7.5
|
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 /** UVar class definition 00011 00012 Each UVar instance corresponds to one URBI variable. The class 00013 provides access to the variable properties, and reading/writing 00014 the value to/from all known types. */ 00015 00016 public class UVar extends UContext { 00017 private long swigCPtr; 00018 00019 public UVar(long cPtr, boolean cMemoryOwn) { 00020 super(urbiJNI.UVar_SWIGUpcast(cPtr), cMemoryOwn); 00021 swigCPtr = cPtr; 00022 } 00023 00024 public static long getCPtr(UVar obj) { 00025 return (obj == null) ? 0 : obj.swigCPtr; 00026 } 00027 00028 protected void finalize() { 00029 delete(); 00030 } 00031 00032 public synchronized void delete() { 00033 if (swigCPtr != 0) { 00034 if (swigCMemOwn) { 00035 swigCMemOwn = false; 00036 urbiJNI.delete_UVar(swigCPtr); 00037 } 00038 swigCPtr = 0; 00039 } 00040 super.delete(); 00041 } 00042 00043 /// Creates an unbound UVar. Call init() to bind it. 00044 public UVar() { 00045 this(urbiJNI.new_UVar__SWIG_0(), true); 00046 } 00047 00048 /// Creates an unbound UVar. Call init() to bind it. 00049 public UVar(String arg0, UContextImpl arg1) { 00050 this(urbiJNI.new_UVar__SWIG_1(arg0, UContextImpl.getCPtr(arg1), arg1), true); 00051 } 00052 00053 /// Creates an unbound UVar. Call init() to bind it. 00054 public UVar(String arg0) { 00055 this(urbiJNI.new_UVar__SWIG_2(arg0), true); 00056 } 00057 00058 /// Creates an unbound UVar. Call init() to bind it. 00059 public UVar(String arg0, String arg1, UContextImpl arg2) { 00060 this(urbiJNI.new_UVar__SWIG_3(arg0, arg1, UContextImpl.getCPtr(arg2), arg2), true); 00061 } 00062 00063 /// Creates an unbound UVar. Call init() to bind it. 00064 public UVar(String arg0, String arg1) { 00065 this(urbiJNI.new_UVar__SWIG_4(arg0, arg1), true); 00066 } 00067 00068 /// Creates an unbound UVar. Call init() to bind it. 00069 public UVar(UObjectCPP arg0, String arg1, UContextImpl arg2) { 00070 this(urbiJNI.new_UVar__SWIG_5(UObjectCPP.getCPtr(arg0), arg0, arg1, UContextImpl.getCPtr(arg2), arg2), true); 00071 } 00072 00073 /// Creates an unbound UVar. Call init() to bind it. 00074 public UVar(UObjectCPP arg0, String arg1) { 00075 this(urbiJNI.new_UVar__SWIG_6(UObjectCPP.getCPtr(arg0), arg0, arg1), true); 00076 } 00077 00078 /// Creates an unbound UVar. Call init() to bind it. 00079 public UVar(UVar arg0) { 00080 this(urbiJNI.new_UVar__SWIG_7(UVar.getCPtr(arg0), arg0), true); 00081 } 00082 00083 // Bind to \a object.slot. 00084 public void init(String varname, UContextImpl arg1) { 00085 urbiJNI.UVar_init__SWIG_0(swigCPtr, this, varname, UContextImpl.getCPtr(arg1), arg1); 00086 } 00087 00088 // Bind to \a object.slot. 00089 public void init(String varname) { 00090 urbiJNI.UVar_init__SWIG_1(swigCPtr, this, varname); 00091 } 00092 00093 // Bind to \a object.slot. 00094 public void init(String object, String slot, UContextImpl arg2) { 00095 urbiJNI.UVar_init__SWIG_2(swigCPtr, this, object, slot, UContextImpl.getCPtr(arg2), arg2); 00096 } 00097 00098 // Bind to \a object.slot. 00099 public void init(String object, String slot) { 00100 urbiJNI.UVar_init__SWIG_3(swigCPtr, this, object, slot); 00101 } 00102 00103 public void setOwned() { 00104 urbiJNI.UVar_setOwned(swigCPtr, this); 00105 } 00106 00107 /// The type of the current content. 00108 public UDataType type() { 00109 return UDataType.swigToEnum(urbiJNI.UVar_type(swigCPtr, this)); 00110 } 00111 00112 /// Request the current value, wait until it is available. 00113 public void syncValue() { 00114 urbiJNI.UVar_syncValue(swigCPtr, this); 00115 } 00116 00117 /// Keep this UVar synchronized with kernel value. 00118 public void keepSynchronized() { 00119 urbiJNI.UVar_keepSynchronized(swigCPtr, this); 00120 } 00121 00122 public void reset(double arg0) { 00123 urbiJNI.UVar_reset(swigCPtr, this, arg0); 00124 } 00125 00126 public UVar setValue(double arg0) { 00127 return new UVar(urbiJNI.UVar_setValue__SWIG_0(swigCPtr, this, arg0), false); 00128 } 00129 00130 public UVar setValue(String arg0) { 00131 return new UVar(urbiJNI.UVar_setValue__SWIG_1(swigCPtr, this, arg0), false); 00132 } 00133 00134 /// Deep copy. 00135 public UVar setValue(UBinary arg0) { 00136 return new UVar(urbiJNI.UVar_setValue__SWIG_2(swigCPtr, this, UBinary.getCPtr(arg0), arg0), false); 00137 } 00138 00139 /// Deep copy. 00140 public UVar setValue(UImage i) { 00141 return new UVar(urbiJNI.UVar_setValue__SWIG_3(swigCPtr, this, UImage.getCPtr(i), i), false); 00142 } 00143 00144 /// Deep copy. 00145 public UVar setValue(USound s) { 00146 return new UVar(urbiJNI.UVar_setValue__SWIG_4(swigCPtr, this, USound.getCPtr(s), s), false); 00147 } 00148 00149 public UVar setValue(UList l) { 00150 return new UVar(urbiJNI.UVar_setValue__SWIG_5(swigCPtr, this, UList.getCPtr(l), l), false); 00151 } 00152 00153 public UVar setValue(UDictionary d) { 00154 return new UVar(urbiJNI.UVar_setValue__SWIG_6(swigCPtr, this, UDictionary.getCPtr(d), d), false); 00155 } 00156 00157 public UVar setValue(UValue v) { 00158 return new UVar(urbiJNI.UVar_setValue__SWIG_7(swigCPtr, this, UValue.getCPtr(v), v), false); 00159 } 00160 00161 public int intValue() { 00162 return urbiJNI.UVar_intValue(swigCPtr, this); 00163 } 00164 00165 public boolean booleanValue() { 00166 return urbiJNI.UVar_booleanValue(swigCPtr, this); 00167 } 00168 00169 public UBinary ubinaryValue() { 00170 return new UBinary(urbiJNI.UVar_ubinaryValue__SWIG_0(swigCPtr, this), false); 00171 } 00172 00173 public UImage uimageValue() { 00174 return new UImage(urbiJNI.UVar_uimageValue(swigCPtr, this), true); 00175 } 00176 00177 public USound usoundValue() { 00178 return new USound(urbiJNI.UVar_usoundValue(swigCPtr, this), true); 00179 } 00180 00181 public double doubleValue() { 00182 return urbiJNI.UVar_doubleValue(swigCPtr, this); 00183 } 00184 00185 public String stringValue() { 00186 return urbiJNI.UVar_stringValue(swigCPtr, this); 00187 } 00188 00189 public UList ulistValue() { 00190 return new UList(urbiJNI.UVar_ulistValue(swigCPtr, this), true); 00191 } 00192 00193 public UDictionary udictionaryValue() { 00194 return new UDictionary(urbiJNI.UVar_udictionaryValue(swigCPtr, this), true); 00195 } 00196 00197 /// Deactivate all callbacks associated with this UVar and stop synchro. 00198 public void unnotify() { 00199 urbiJNI.UVar_unnotify(swigCPtr, this); 00200 } 00201 00202 public void setOwned(boolean value) { 00203 urbiJNI.UVar_owned_set(swigCPtr, this, value); 00204 } 00205 00206 public boolean getOwned() { 00207 return urbiJNI.UVar_owned_get(swigCPtr, this); 00208 } 00209 00210 public UValue getProp(UProperty prop) { 00211 return new UValue(urbiJNI.UVar_getProp(swigCPtr, this, prop.swigValue()), true); 00212 } 00213 00214 public void setProp(UProperty prop, UValue v) { 00215 urbiJNI.UVar_setProp__SWIG_0(swigCPtr, this, prop.swigValue(), UValue.getCPtr(v), v); 00216 } 00217 00218 public void setProp(UProperty prop, double v) { 00219 urbiJNI.UVar_setProp__SWIG_1(swigCPtr, this, prop.swigValue(), v); 00220 } 00221 00222 public void setProp(UProperty prop, String v) { 00223 urbiJNI.UVar_setProp__SWIG_2(swigCPtr, this, prop.swigValue(), v); 00224 } 00225 00226 /// Enable bypass-mode for this UVar. Plugin-mode only. 00227 /// In bypass mode, if the UVar contains binary data, the data is never 00228 /// copied. The consequence is that the data is only accessible from 00229 /// notifyChange callbacks (urbiScript or C++): it is invalidated as soon 00230 /// as all callbacks have returned. 00231 public boolean setBypass(boolean enable) { 00232 return urbiJNI.UVar_setBypass__SWIG_0(swigCPtr, this, enable); 00233 } 00234 00235 /// Enable bypass-mode for this UVar. Plugin-mode only. 00236 /// In bypass mode, if the UVar contains binary data, the data is never 00237 /// copied. The consequence is that the data is only accessible from 00238 /// notifyChange callbacks (urbiScript or C++): it is invalidated as soon 00239 /// as all callbacks have returned. 00240 public boolean setBypass() { 00241 return urbiJNI.UVar_setBypass__SWIG_1(swigCPtr, this); 00242 } 00243 00244 /// Use RTP mode to transmit this variable if possible. 00245 public void useRTP(boolean enable) { 00246 urbiJNI.UVar_useRTP__SWIG_0(swigCPtr, this, enable); 00247 } 00248 00249 /// Use RTP mode to transmit this variable if possible. 00250 public void useRTP() { 00251 urbiJNI.UVar_useRTP__SWIG_1(swigCPtr, this); 00252 } 00253 00254 public void setImpl_(UVarImpl value) { 00255 urbiJNI.UVar_impl__set(swigCPtr, this, UVarImpl.getCPtr(value), value); 00256 } 00257 00258 public UVarImpl getImpl_() { 00259 long cPtr = urbiJNI.UVar_impl__get(swigCPtr, this); 00260 return (cPtr == 0) ? null : new UVarImpl(cPtr, false); 00261 } 00262 00263 public UValue val() { 00264 return new UValue(urbiJNI.UVar_val(swigCPtr, this), false); 00265 } 00266 00267 public long timestamp() { 00268 return urbiJNI.UVar_timestamp(swigCPtr, this); 00269 } 00270 00271 public void check() { 00272 urbiJNI.UVar_check(swigCPtr, this); 00273 } 00274 00275 public boolean get_temp() { 00276 return urbiJNI.UVar_get_temp__SWIG_0(swigCPtr, this); 00277 } 00278 00279 public void set_temp(boolean v) { 00280 urbiJNI.UVar_set_temp(swigCPtr, this, v); 00281 } 00282 00283 public UVar.RtpMode get_rtp() { 00284 return UVar.RtpMode.swigToEnum(urbiJNI.UVar_get_rtp__SWIG_0(swigCPtr, this)); 00285 } 00286 00287 public void set_rtp(UVar.RtpMode v) { 00288 urbiJNI.UVar_set_rtp(swigCPtr, this, v.swigValue()); 00289 } 00290 00291 public boolean get_local() { 00292 return urbiJNI.UVar_get_local__SWIG_0(swigCPtr, this); 00293 } 00294 00295 public void set_local(boolean v) { 00296 urbiJNI.UVar_set_local(swigCPtr, this, v); 00297 } 00298 00299 public UValue getUValue() { 00300 return new UValue(urbiJNI.UVar_getUValue(swigCPtr, this), false); 00301 } 00302 00303 public String getName() { 00304 return urbiJNI.UVar_getName(swigCPtr, this); 00305 } 00306 00307 public void setName(String name) { 00308 urbiJNI.UVar_setName(swigCPtr, this, name); 00309 } 00310 00311 public enum RtpMode { 00312 RTP_DEFAULT, 00313 RTP_YES, 00314 RTP_NO; 00315 00316 public final int swigValue() { 00317 return swigValue; 00318 } 00319 00320 public static RtpMode swigToEnum(int swigValue) { 00321 RtpMode[] swigValues = RtpMode.class.getEnumConstants(); 00322 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 00323 return swigValues[swigValue]; 00324 for (RtpMode swigEnum : swigValues) 00325 if (swigEnum.swigValue == swigValue) 00326 return swigEnum; 00327 throw new IllegalArgumentException("No enum " + RtpMode.class + " with value " + swigValue); 00328 } 00329 00330 @SuppressWarnings("unused") 00331 private RtpMode() { 00332 this.swigValue = SwigNext.next++; 00333 } 00334 00335 @SuppressWarnings("unused") 00336 private RtpMode(int swigValue) { 00337 this.swigValue = swigValue; 00338 SwigNext.next = swigValue+1; 00339 } 00340 00341 @SuppressWarnings("unused") 00342 private RtpMode(RtpMode swigEnum) { 00343 this.swigValue = swigEnum.swigValue; 00344 SwigNext.next = this.swigValue+1; 00345 } 00346 00347 private final int swigValue; 00348 00349 private static class SwigNext { 00350 private static int next = 0; 00351 } 00352 } 00353 00354 }