Urbi SDK Remote for Java  2.7.5
UContextImpl.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 public class UContextImpl {
00012   private long swigCPtr;
00013   protected boolean swigCMemOwn;
00014 
00015   public UContextImpl(long cPtr, boolean cMemoryOwn) {
00016     swigCMemOwn = cMemoryOwn;
00017     swigCPtr = cPtr;
00018   }
00019 
00020   public static long getCPtr(UContextImpl obj) {
00021     return (obj == null) ? 0 : obj.swigCPtr;
00022   }
00023 
00024   protected void finalize() {
00025     delete();
00026   }
00027 
00028   public synchronized void delete() {
00029     if (swigCPtr != 0) {
00030       if (swigCMemOwn) {
00031         swigCMemOwn = false;
00032         urbiJNI.delete_UContextImpl(swigCPtr);
00033       }
00034       swigCPtr = 0;
00035     }
00036   }
00037 
00038         /// Inject all loaded uobjects in the system by calling newUObjectClass.
00039  public  void init() {
00040     urbiJNI.UContextImpl_init(swigCPtr, this);
00041   }
00042 
00043         /// Inject a specific uobject
00044  public  boolean bind(String name, String rename) {
00045     return urbiJNI.UContextImpl_bind__SWIG_0(swigCPtr, this, name, rename);
00046   }
00047 
00048         /// Inject a specific uobject
00049  public  boolean bind(String name) {
00050     return urbiJNI.UContextImpl_bind__SWIG_1(swigCPtr, this, name);
00051   }
00052 
00053         /// Called to instanciate the first Object of class.
00054  public  void newUObjectClass(baseURBIStarter s) {
00055     urbiJNI.UContextImpl_newUObjectClass(swigCPtr, this, baseURBIStarter.getCPtr(s), s);
00056   }
00057 
00058   public void newUObjectHubClass(baseURBIStarterHub s) {
00059     urbiJNI.UContextImpl_newUObjectHubClass(swigCPtr, this, baseURBIStarterHub.getCPtr(s), s);
00060   }
00061 
00062         /// Retrieve a UObjectHub based on its name or return 0 if not found.
00063  public  UObjectHub getUObjectHub(String n) {
00064     long cPtr = urbiJNI.UContextImpl_getUObjectHub(swigCPtr, this, n);
00065     return (cPtr == 0) ? null : new UObjectHub(cPtr, false);
00066   }
00067 
00068         /// Retrieve a UObject based on its name or return 0 if not found.
00069  public  UObjectCPP getUObject(String n) {
00070     long cPtr = urbiJNI.UContextImpl_getUObject(swigCPtr, this, n);
00071     return (cPtr == 0) ? null : new UObjectCPP(cPtr, false);
00072   }
00073 
00074         /// Send Urbi code (ghost connection in plugin mode, default
00075       /// connection in remote mode).
00076  public  void uobject_unarmorAndSend(String str) {
00077     urbiJNI.UContextImpl_uobject_unarmorAndSend(swigCPtr, this, str);
00078   }
00079 
00080         /// Send buf to the connection hosting the UObject.
00081  public  void send(String str) {
00082     urbiJNI.UContextImpl_send__SWIG_0(swigCPtr, this, str);
00083   }
00084 
00085   public void call(String object, String method, SWIGTYPE_p_UAutoValue v1, SWIGTYPE_p_UAutoValue v2, SWIGTYPE_p_UAutoValue v3, SWIGTYPE_p_UAutoValue v4, SWIGTYPE_p_UAutoValue v5, SWIGTYPE_p_UAutoValue v6) {
00086     urbiJNI.UContextImpl_call__SWIG_0(swigCPtr, this, object, method, SWIGTYPE_p_UAutoValue.getCPtr(v1), SWIGTYPE_p_UAutoValue.getCPtr(v2), SWIGTYPE_p_UAutoValue.getCPtr(v3), SWIGTYPE_p_UAutoValue.getCPtr(v4), SWIGTYPE_p_UAutoValue.getCPtr(v5), SWIGTYPE_p_UAutoValue.getCPtr(v6));
00087   }
00088 
00089   public void call(String object, String method, SWIGTYPE_p_UAutoValue v1, SWIGTYPE_p_UAutoValue v2, SWIGTYPE_p_UAutoValue v3, SWIGTYPE_p_UAutoValue v4, SWIGTYPE_p_UAutoValue v5) {
00090     urbiJNI.UContextImpl_call__SWIG_1(swigCPtr, this, object, method, SWIGTYPE_p_UAutoValue.getCPtr(v1), SWIGTYPE_p_UAutoValue.getCPtr(v2), SWIGTYPE_p_UAutoValue.getCPtr(v3), SWIGTYPE_p_UAutoValue.getCPtr(v4), SWIGTYPE_p_UAutoValue.getCPtr(v5));
00091   }
00092 
00093   public void call(String object, String method, SWIGTYPE_p_UAutoValue v1, SWIGTYPE_p_UAutoValue v2, SWIGTYPE_p_UAutoValue v3, SWIGTYPE_p_UAutoValue v4) {
00094     urbiJNI.UContextImpl_call__SWIG_2(swigCPtr, this, object, method, SWIGTYPE_p_UAutoValue.getCPtr(v1), SWIGTYPE_p_UAutoValue.getCPtr(v2), SWIGTYPE_p_UAutoValue.getCPtr(v3), SWIGTYPE_p_UAutoValue.getCPtr(v4));
00095   }
00096 
00097   public void call(String object, String method, SWIGTYPE_p_UAutoValue v1, SWIGTYPE_p_UAutoValue v2, SWIGTYPE_p_UAutoValue v3) {
00098     urbiJNI.UContextImpl_call__SWIG_3(swigCPtr, this, object, method, SWIGTYPE_p_UAutoValue.getCPtr(v1), SWIGTYPE_p_UAutoValue.getCPtr(v2), SWIGTYPE_p_UAutoValue.getCPtr(v3));
00099   }
00100 
00101   public void call(String object, String method, SWIGTYPE_p_UAutoValue v1, SWIGTYPE_p_UAutoValue v2) {
00102     urbiJNI.UContextImpl_call__SWIG_4(swigCPtr, this, object, method, SWIGTYPE_p_UAutoValue.getCPtr(v1), SWIGTYPE_p_UAutoValue.getCPtr(v2));
00103   }
00104 
00105   public void call(String object, String method, SWIGTYPE_p_UAutoValue v1) {
00106     urbiJNI.UContextImpl_call__SWIG_5(swigCPtr, this, object, method, SWIGTYPE_p_UAutoValue.getCPtr(v1));
00107   }
00108 
00109   public void call(String object, String method) {
00110     urbiJNI.UContextImpl_call__SWIG_6(swigCPtr, this, object, method);
00111   }
00112 
00113   public void declare_event(UEvent owner) {
00114     urbiJNI.UContextImpl_declare_event(swigCPtr, this, UEvent.getCPtr(owner), owner);
00115   }
00116 
00117   public void emit(String object, SWIGTYPE_p_UAutoValue v1, SWIGTYPE_p_UAutoValue v2, SWIGTYPE_p_UAutoValue v3, SWIGTYPE_p_UAutoValue v4, SWIGTYPE_p_UAutoValue v5, SWIGTYPE_p_UAutoValue v6, SWIGTYPE_p_UAutoValue v7) {
00118     urbiJNI.UContextImpl_emit(swigCPtr, this, object, SWIGTYPE_p_UAutoValue.getCPtr(v1), SWIGTYPE_p_UAutoValue.getCPtr(v2), SWIGTYPE_p_UAutoValue.getCPtr(v3), SWIGTYPE_p_UAutoValue.getCPtr(v4), SWIGTYPE_p_UAutoValue.getCPtr(v5), SWIGTYPE_p_UAutoValue.getCPtr(v6), SWIGTYPE_p_UAutoValue.getCPtr(v7));
00119   }
00120 
00121         /// Return the mode in which the code is running.
00122  public  SWIGTYPE_p_UObjectMode getRunningMode() {
00123     return new SWIGTYPE_p_UObjectMode(urbiJNI.UContextImpl_getRunningMode(swigCPtr, this), true);
00124   }
00125 
00126         /// Get the kernel major,minor version
00127  public  IntPair kernelVersion() {
00128     return new IntPair(urbiJNI.UContextImpl_kernelVersion(swigCPtr, this), true);
00129   }
00130 
00131         /// Yield execution until next cycle.
00132       /// Process pending messages in remote mode.
00133  public  void yield() {
00134     urbiJNI.UContextImpl_yield(swigCPtr, this);
00135   }
00136 
00137         /// Yield execution until \b deadline is met (see libport::utime()).
00138  public  void yield_until(long deadline) {
00139     urbiJNI.UContextImpl_yield_until(swigCPtr, this, deadline);
00140   }
00141 
00142         /// Yield execution for \b delay.
00143       /// Bounces to yield_until.
00144  public  void yield_for(long delay) {
00145     urbiJNI.UContextImpl_yield_for(swigCPtr, this, delay);
00146   }
00147 
00148         /** Yield execution until something else is scheduled,
00149        *  or until a message is received in remote mode.
00150        */
00151  public  void yield_until_things_changed() {
00152     urbiJNI.UContextImpl_yield_until_things_changed(swigCPtr, this);
00153   }
00154 
00155         /** If \b s is true, mark the current task as having no side effect.
00156        * This call has no effect in remote mode.
00157        */
00158  public  void side_effect_free_set(boolean s) {
00159     urbiJNI.UContextImpl_side_effect_free_set(swigCPtr, this, s);
00160   }
00161 
00162         /// Get the current side_effect_free state.
00163  public  boolean side_effect_free_get() {
00164     return urbiJNI.UContextImpl_side_effect_free_get(swigCPtr, this);
00165   }
00166 
00167   public UVarImpl getVarImpl() {
00168     long cPtr = urbiJNI.UContextImpl_getVarImpl(swigCPtr, this);
00169     return (cPtr == 0) ? null : new UVarImpl(cPtr, false);
00170   }
00171 
00172   public UObjectImpl getObjectImpl() {
00173     long cPtr = urbiJNI.UContextImpl_getObjectImpl(swigCPtr, this);
00174     return (cPtr == 0) ? null : new UObjectImpl(cPtr, false);
00175   }
00176 
00177         /// Default implementations appends to 'objects'.
00178  public  void registerObject(UObjectCPP o) {
00179     urbiJNI.UContextImpl_registerObject(swigCPtr, this, UObjectCPP.getCPtr(o), o);
00180   }
00181 
00182   public void registerHub(UObjectHub arg0) {
00183     urbiJNI.UContextImpl_registerHub(swigCPtr, this, UObjectHub.getCPtr(arg0), arg0);
00184   }
00185 
00186   public void removeHub(UObjectHub arg0) {
00187     urbiJNI.UContextImpl_removeHub(swigCPtr, this, UObjectHub.getCPtr(arg0), arg0);
00188   }
00189 
00190   public void setHubUpdate(UObjectHub arg0, double arg1) {
00191     urbiJNI.UContextImpl_setHubUpdate(swigCPtr, this, UObjectHub.getCPtr(arg0), arg0, arg1);
00192   }
00193 
00194         /// Called by the urbiStarter after each UObject instanciation.
00195  public  void instanciated(UObjectCPP arg0) {
00196     urbiJNI.UContextImpl_instanciated(swigCPtr, this, UObjectCPP.getCPtr(arg0), arg0);
00197   }
00198 
00199   public void addCleanup(SWIGTYPE_p_boost__function0T_void_t op) {
00200     urbiJNI.UContextImpl_addCleanup(swigCPtr, this, SWIGTYPE_p_boost__function0T_void_t.getCPtr(op));
00201   }
00202 
00203   public void pushCleanupStack() {
00204     urbiJNI.UContextImpl_pushCleanupStack(swigCPtr, this);
00205   }
00206 
00207   public void popCleanupStack() {
00208     urbiJNI.UContextImpl_popCleanupStack(swigCPtr, this);
00209   }
00210 
00211   public void lock() {
00212     urbiJNI.UContextImpl_lock(swigCPtr, this);
00213   }
00214 
00215   public void unlock() {
00216     urbiJNI.UContextImpl_unlock(swigCPtr, this);
00217   }
00218 
00219   public void setRtpSend(SWIGTYPE_p_f_p_urbi__UObject_r_q_const__urbi__UValue__void value) {
00220     urbiJNI.UContextImpl_rtpSend_set(swigCPtr, this, SWIGTYPE_p_f_p_urbi__UObject_r_q_const__urbi__UValue__void.getCPtr(value));
00221   }
00222 
00223   public SWIGTYPE_p_f_p_urbi__UObject_r_q_const__urbi__UValue__void getRtpSend() {
00224     long cPtr = urbiJNI.UContextImpl_rtpSend_get(swigCPtr, this);
00225     return (cPtr == 0) ? null : new SWIGTYPE_p_f_p_urbi__UObject_r_q_const__urbi__UValue__void(cPtr, false);
00226   }
00227 
00228   public void setRtpSendGrouped(SWIGTYPE_p_f_p_urbi__UObject_r_q_const__std__string_r_q_const__urbi__UValue_long_long__void value) {
00229     urbiJNI.UContextImpl_rtpSendGrouped_set(swigCPtr, this, SWIGTYPE_p_f_p_urbi__UObject_r_q_const__std__string_r_q_const__urbi__UValue_long_long__void.getCPtr(value));
00230   }
00231 
00232   public SWIGTYPE_p_f_p_urbi__UObject_r_q_const__std__string_r_q_const__urbi__UValue_long_long__void getRtpSendGrouped() {
00233     long cPtr = urbiJNI.UContextImpl_rtpSendGrouped_get(swigCPtr, this);
00234     return (cPtr == 0) ? null : new SWIGTYPE_p_f_p_urbi__UObject_r_q_const__std__string_r_q_const__urbi__UValue_long_long__void(cPtr, false);
00235   }
00236 
00237 }