[openrtm-commit:01245] r2440 - branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests

openrtm @ openrtm.org openrtm @ openrtm.org
2014年 2月 12日 (水) 09:12:05 JST


Author: win-ei
Date: 2014-02-12 09:12:05 +0900 (Wed, 12 Feb 2014)
New Revision: 2440

Added:
   branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/ExecutionContextProxy.cpp
   branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/ExecutionContextProxy.h
Log:
These files are likely to be generated by omniidl_be.

Added: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/ExecutionContextProxy.cpp
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/ExecutionContextProxy.cpp	                        (rev 0)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/ExecutionContextProxy.cpp	2014-02-12 00:12:05 UTC (rev 2440)
@@ -0,0 +1,338 @@
+// -*- C++ -*-
+/*!
+ * @file ExecutionContextProxy.cpp 
+ * @brief IExecutionContext CORBA proxy for doil
+ * @date $Date$
+ * @author This file was automatically generated form RTC.idl 
+ *         by omniidl/doil backend
+ *
+ * $Id$
+ */
+
+#include <doil/corba/CORBAManager.h>
+#include <IExecutionContext.h>
+#include <ExecutionContextProxy.h>
+#include <RTCTypeConversion.h>
+#include <doil/corba/BasicTypeConversion.h>
+
+namespace RTC 
+{
+namespace CORBA 
+{
+  /*!
+   * @brief ctor
+   */ 
+  ExecutionContextProxy::ExecutionContextProxy(::CORBA::Object_ptr obj)
+   : ::doil::CORBA::CORBAProxyBase(obj),
+     m_obj(::RTC::ExecutionContext::_nil()),
+     m_refcount(1)//   : m_obj(::RTC::ExecutionContext::_nil())
+  {
+    m_obj = ::RTC::ExecutionContext::_narrow(obj);
+    if (::CORBA::is_nil(m_obj)) throw std::bad_alloc();
+    m_obj = ::RTC::ExecutionContext::_duplicate(m_obj);
+  }
+
+  /*!
+   * @brief dtor
+   */ 
+  ExecutionContextProxy::~ExecutionContextProxy()
+  {
+    ::CORBA::release(m_obj);
+  }
+
+  
+  /*!
+   * @brief is_running 
+   */ 
+  bool ExecutionContextProxy::is_running()
+      throw ()
+  {
+    // Convert Local to CORBA.
+    // (The direction of the argument is 'in' or 'inout'.)
+
+    // Execute the method. 
+    ::CORBA::Boolean corba_ret;
+    bool local_ret;
+    corba_ret = m_obj->is_running();
+
+    // Convert CORBA to Local.
+    // (The direction of the argument is 'out' or 'inout'.)
+
+    // Generate the return value.
+//    local_ret = corba_ret;
+    corba_to_local(corba_ret, local_ret);
+    return local_ret;
+  }
+
+  /*!
+   * @brief start 
+   */ 
+  ::RTC::Local::ReturnCode_t ExecutionContextProxy::start()
+      throw ()
+  {
+    // Convert Local to CORBA.
+    // (The direction of the argument is 'in' or 'inout'.)
+
+    // Execute the method. 
+    ::RTC::ReturnCode_t corba_ret;
+    ::RTC::Local::ReturnCode_t local_ret;
+    corba_ret = m_obj->start();
+
+    // Convert CORBA to Local.
+    // (The direction of the argument is 'out' or 'inout'.)
+
+    // Generate the return value.
+    corba_to_local(corba_ret, local_ret);
+    return local_ret;
+  }
+
+  /*!
+   * @brief stop 
+   */ 
+  ::RTC::Local::ReturnCode_t ExecutionContextProxy::stop()
+      throw ()
+  {
+    // Convert Local to CORBA.
+    // (The direction of the argument is 'in' or 'inout'.)
+
+    // Execute the method. 
+    ::RTC::ReturnCode_t corba_ret;
+    ::RTC::Local::ReturnCode_t local_ret;
+    corba_ret = m_obj->stop();
+
+    // Convert CORBA to Local.
+    // (The direction of the argument is 'out' or 'inout'.)
+
+    // Generate the return value.
+    corba_to_local(corba_ret, local_ret);
+    return local_ret;
+  }
+
+  /*!
+   * @brief get_rate 
+   */ 
+  double ExecutionContextProxy::get_rate()
+      throw ()
+  {
+    // Convert Local to CORBA.
+    // (The direction of the argument is 'in' or 'inout'.)
+
+    // Execute the method. 
+    ::CORBA::Double corba_ret;
+    double local_ret;
+    corba_ret = m_obj->get_rate();
+
+    // Convert CORBA to Local.
+    // (The direction of the argument is 'out' or 'inout'.)
+
+    // Generate the return value.
+//    local_ret = corba_ret;
+    corba_to_local(corba_ret, local_ret);
+    return local_ret;
+  }
+
+  /*!
+   * @brief set_rate 
+   */ 
+  ::RTC::Local::ReturnCode_t ExecutionContextProxy::set_rate(double rate)
+      throw ()
+  {
+    // Convert Local to CORBA.
+    // (The direction of the argument is 'in' or 'inout'.)
+    ::CORBA::Double _rate;
+//    _rate = rate;
+    local_to_corba(rate, _rate);
+
+    // Execute the method. 
+    ::RTC::ReturnCode_t corba_ret;
+    ::RTC::Local::ReturnCode_t local_ret;
+    corba_ret = m_obj->set_rate(_rate);
+
+    // Convert CORBA to Local.
+    // (The direction of the argument is 'out' or 'inout'.)
+
+    // Generate the return value.
+    corba_to_local(corba_ret, local_ret);
+    return local_ret;
+  }
+
+  /*!
+   * @brief add_component 
+   */ 
+  ::RTC::Local::ReturnCode_t ExecutionContextProxy::add_component(const ::RTC::Local::ILightweightRTObject* comp)
+      throw ()
+  {
+    // Convert Local to CORBA.
+    // (The direction of the argument is 'in' or 'inout'.)
+    ::RTC::LightweightRTObject_ptr _comp;
+    local_to_corba(const_cast< ::RTC::Local::ILightweightRTObject* >(comp), _comp);
+
+    // Execute the method. 
+    ::RTC::ReturnCode_t corba_ret;
+    ::RTC::Local::ReturnCode_t local_ret;
+    corba_ret = m_obj->add_component(_comp);
+
+    // Convert CORBA to Local.
+    // (The direction of the argument is 'out' or 'inout'.)
+
+    // Generate the return value.
+    corba_to_local(corba_ret, local_ret);
+    return local_ret;
+  }
+
+  /*!
+   * @brief remove_component 
+   */ 
+  ::RTC::Local::ReturnCode_t ExecutionContextProxy::remove_component(const ::RTC::Local::ILightweightRTObject* comp)
+      throw ()
+  {
+    // Convert Local to CORBA.
+    // (The direction of the argument is 'in' or 'inout'.)
+    ::RTC::LightweightRTObject_ptr _comp;
+    local_to_corba(const_cast< ::RTC::Local::ILightweightRTObject* >(comp), _comp);
+
+    // Execute the method. 
+    ::RTC::ReturnCode_t corba_ret;
+    ::RTC::Local::ReturnCode_t local_ret;
+    corba_ret = m_obj->remove_component(_comp);
+
+    // Convert CORBA to Local.
+    // (The direction of the argument is 'out' or 'inout'.)
+
+    // Generate the return value.
+    corba_to_local(corba_ret, local_ret);
+    return local_ret;
+  }
+
+  /*!
+   * @brief activate_component 
+   */ 
+  ::RTC::Local::ReturnCode_t ExecutionContextProxy::activate_component(const ::RTC::Local::ILightweightRTObject* comp)
+      throw ()
+  {
+    // Convert Local to CORBA.
+    // (The direction of the argument is 'in' or 'inout'.)
+    ::RTC::LightweightRTObject_ptr _comp;
+    local_to_corba(const_cast< ::RTC::Local::ILightweightRTObject* >(comp), _comp);
+
+    // Execute the method. 
+    ::RTC::ReturnCode_t corba_ret;
+    ::RTC::Local::ReturnCode_t local_ret;
+    corba_ret = m_obj->activate_component(_comp);
+
+    // Convert CORBA to Local.
+    // (The direction of the argument is 'out' or 'inout'.)
+
+    // Generate the return value.
+    corba_to_local(corba_ret, local_ret);
+    return local_ret;
+  }
+
+  /*!
+   * @brief deactivate_component 
+   */ 
+  ::RTC::Local::ReturnCode_t ExecutionContextProxy::deactivate_component(const ::RTC::Local::ILightweightRTObject* comp)
+      throw ()
+  {
+    // Convert Local to CORBA.
+    // (The direction of the argument is 'in' or 'inout'.)
+    ::RTC::LightweightRTObject_ptr _comp;
+    local_to_corba(const_cast< ::RTC::Local::ILightweightRTObject* >(comp), _comp);
+
+    // Execute the method. 
+    ::RTC::ReturnCode_t corba_ret;
+    ::RTC::Local::ReturnCode_t local_ret;
+    corba_ret = m_obj->deactivate_component(_comp);
+
+    // Convert CORBA to Local.
+    // (The direction of the argument is 'out' or 'inout'.)
+
+    // Generate the return value.
+    corba_to_local(corba_ret, local_ret);
+    return local_ret;
+  }
+
+  /*!
+   * @brief reset_component 
+   */ 
+  ::RTC::Local::ReturnCode_t ExecutionContextProxy::reset_component(const ::RTC::Local::ILightweightRTObject* comp)
+      throw ()
+  {
+    // Convert Local to CORBA.
+    // (The direction of the argument is 'in' or 'inout'.)
+    ::RTC::LightweightRTObject_ptr _comp;
+    local_to_corba(const_cast< ::RTC::Local::ILightweightRTObject* >(comp), _comp);
+
+    // Execute the method. 
+    ::RTC::ReturnCode_t corba_ret;
+    ::RTC::Local::ReturnCode_t local_ret;
+    corba_ret = m_obj->reset_component(_comp);
+
+    // Convert CORBA to Local.
+    // (The direction of the argument is 'out' or 'inout'.)
+
+    // Generate the return value.
+    corba_to_local(corba_ret, local_ret);
+    return local_ret;
+  }
+
+  /*!
+   * @brief get_component_state 
+   */ 
+  ::RTC::Local::LifeCycleState ExecutionContextProxy::get_component_state(const ::RTC::Local::ILightweightRTObject* comp)
+      throw ()
+  {
+    // Convert Local to CORBA.
+    // (The direction of the argument is 'in' or 'inout'.)
+    ::RTC::LightweightRTObject_ptr _comp;
+    local_to_corba(const_cast< ::RTC::Local::ILightweightRTObject* >(comp), _comp);
+
+    // Execute the method. 
+    ::RTC::LifeCycleState corba_ret;
+    ::RTC::Local::LifeCycleState local_ret;
+    corba_ret = m_obj->get_component_state(_comp);
+
+    // Convert CORBA to Local.
+    // (The direction of the argument is 'out' or 'inout'.)
+
+    // Generate the return value.
+    corba_to_local(corba_ret, local_ret);
+    return local_ret;
+  }
+
+  /*!
+   * @brief get_kind 
+   */ 
+  ::RTC::Local::ExecutionKind ExecutionContextProxy::get_kind()
+      throw ()
+  {
+    // Convert Local to CORBA.
+    // (The direction of the argument is 'in' or 'inout'.)
+
+    // Execute the method. 
+    ::RTC::ExecutionKind corba_ret;
+    ::RTC::Local::ExecutionKind local_ret;
+    corba_ret = m_obj->get_kind();
+
+    // Convert CORBA to Local.
+    // (The direction of the argument is 'out' or 'inout'.)
+
+    // Generate the return value.
+    corba_to_local(corba_ret, local_ret);
+    return local_ret;
+  }
+
+}; // namespace CORBA
+}; // namespace RTC 
+
+extern "C"
+{
+  void ExecutionContextProxyCORBAInit(coil::Properties& prop)
+  {
+    doil::CORBA::CORBAManager& mgr(doil::CORBA::CORBAManager::instance());
+    mgr.registerProxyFactory("ExecutionContextProxy",
+                        doil::New< ::RTC::CORBA::ExecutionContextProxy >,
+                        doil::Delete< ::RTC::CORBA::ExecutionContextProxy >);
+  }
+};
+

Added: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/ExecutionContextProxy.h
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/ExecutionContextProxy.h	                        (rev 0)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/ExecutionContextProxy.h	2014-02-12 00:12:05 UTC (rev 2440)
@@ -0,0 +1,124 @@
+// -*- C++ -*-
+/*!
+ * @file ExecutionContextProxy.h 
+ * @brief ExecutionContextProxy CORBA proxy for doil
+ * @date $Date$
+ * @author This file was automatically generated from RTC.idl 
+ *         by omniidl/doil backend
+ *
+ * $Id$
+ */
+#ifndef RTC_EXECUTIONCONTEXTPROXY_H 
+#define RTC_EXECUTIONCONTEXTPROXY_H 
+
+#include <coil/Properties.h>
+#include <coil/Mutex.h>
+#include <coil/Guard.h>
+#include <doil/corba/CORBAManager.h>
+#include <doil/corba/CORBAProxyBase.h>
+#include <IExecutionContext.h>
+#include <SDOPackageTypes.h>
+#include <rtc/corba/idl/RTCSkel.h>
+
+
+namespace RTC 
+{
+namespace CORBA 
+{
+
+  class ExecutionContextProxy 
+  : public virtual ::doil::CORBA::CORBAProxyBase,
+    public virtual ::RTC::Local::IExecutionContext
+  {
+    typedef coil::Mutex Mutex;
+    typedef coil::Guard<Mutex> Guard;
+  public:
+    ExecutionContextProxy(::CORBA::Object_ptr obj);
+    virtual ~ExecutionContextProxy();
+
+    virtual bool is_running()
+      throw ();
+
+
+    virtual ::RTC::Local::ReturnCode_t start()
+      throw ();
+
+
+    virtual ::RTC::Local::ReturnCode_t stop()
+      throw ();
+
+
+    virtual double get_rate()
+      throw ();
+
+
+    virtual ::RTC::Local::ReturnCode_t set_rate(double rate)
+      throw ();
+
+
+    virtual ::RTC::Local::ReturnCode_t add_component(const ::RTC::Local::ILightweightRTObject* comp)
+      throw ();
+
+
+    virtual ::RTC::Local::ReturnCode_t remove_component(const ::RTC::Local::ILightweightRTObject* comp)
+      throw ();
+
+
+    virtual ::RTC::Local::ReturnCode_t activate_component(const ::RTC::Local::ILightweightRTObject* comp)
+      throw ();
+
+
+    virtual ::RTC::Local::ReturnCode_t deactivate_component(const ::RTC::Local::ILightweightRTObject* comp)
+      throw ();
+
+
+    virtual ::RTC::Local::ReturnCode_t reset_component(const ::RTC::Local::ILightweightRTObject* comp)
+      throw ();
+
+
+    virtual ::RTC::Local::LifeCycleState get_component_state(const ::RTC::Local::ILightweightRTObject* comp)
+      throw ();
+
+
+    virtual ::RTC::Local::ExecutionKind get_kind()
+      throw ();
+
+
+
+    const char* id() {return "ExecutionContext";}
+    const char* name() {return m_name.c_str();}
+    void incRef()
+    {
+      Guard guard(m_refcountMutex);
+      ++m_refcount;
+    }
+    void decRef()
+    {
+      Guard guard(m_refcountMutex);
+      --m_refcount;
+      if (m_refcount == 0)
+        delete this;
+    }
+
+  private:
+    ::RTC::ExecutionContext_ptr m_obj;
+  private:
+    std::string m_name;
+    Mutex m_refcountMutex;
+    int m_refcount;
+  };
+
+}; // namespace CORBA
+}; // namespace RTC 
+
+#ifndef RTC_EXECUTIONCONTEXTSERVANT_H 
+
+
+#endif // RTC_EXECUTIONCONTEXTSERVANT_H
+
+extern "C"
+{
+  void ExecutionContextProxyCORBAInit(coil::Properties& prop);
+};
+
+#endif // RTC_EXECUTIONCONTEXTPROXY_H



More information about the openrtm-commit mailing list