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

openrtm @ openrtm.org openrtm @ openrtm.org
2014年 2月 12日 (水) 18:59:17 JST


Author: win-ei
Date: 2014-02-12 18:59:17 +0900 (Wed, 12 Feb 2014)
New Revision: 2460

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

Added: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/FsmObjectProxy.cpp
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/FsmObjectProxy.cpp	                        (rev 0)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/FsmObjectProxy.cpp	2014-02-12 09:59:17 UTC (rev 2460)
@@ -0,0 +1,83 @@
+// -*- C++ -*-
+/*!
+ * @file FsmObjectProxy.cpp 
+ * @brief IFsmObject 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 <IFsmObject.h>
+#include <FsmObjectProxy.h>
+#include <RTCTypeConversion.h>
+#include <doil/corba/BasicTypeConversion.h>
+
+namespace RTC 
+{
+namespace CORBA 
+{
+  /*!
+   * @brief ctor
+   */ 
+  FsmObjectProxy::FsmObjectProxy(::CORBA::Object_ptr obj)
+   : ::doil::CORBA::CORBAProxyBase(obj),
+     m_obj(::RTC::FsmObject::_nil()),
+     m_refcount(1)//   : m_obj(::RTC::FsmObject::_nil())
+  {
+    m_obj = ::RTC::FsmObject::_narrow(obj);
+    if (::CORBA::is_nil(m_obj)) throw std::bad_alloc();
+    m_obj = ::RTC::FsmObject::_duplicate(m_obj);
+  }
+
+  /*!
+   * @brief dtor
+   */ 
+  FsmObjectProxy::~FsmObjectProxy()
+  {
+    ::CORBA::release(m_obj);
+  }
+
+  
+  /*!
+   * @brief send_stimulus 
+   */ 
+  ::RTC::Local::ReturnCode_t FsmObjectProxy::send_stimulus(const ::std::string& message, ::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ()
+  {
+    // Convert Local to CORBA.
+    // (The direction of the argument is 'in' or 'inout'.)
+    char* _message;
+    ::RTC::ExecutionContextHandle_t _exec_handle;
+    local_to_corba(message, _message);
+    local_to_corba(exec_handle, _exec_handle);
+
+    // Execute the method. 
+    ::RTC::ReturnCode_t corba_ret;
+    ::RTC::Local::ReturnCode_t local_ret;
+    corba_ret = m_obj->send_stimulus(_message, _exec_handle);
+
+    // 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 FsmObjectProxyCORBAInit(coil::Properties& prop)
+  {
+    doil::CORBA::CORBAManager& mgr(doil::CORBA::CORBAManager::instance());
+    mgr.registerProxyFactory("FsmObjectProxy",
+                        doil::New< ::RTC::CORBA::FsmObjectProxy >,
+                        doil::Delete< ::RTC::CORBA::FsmObjectProxy >);
+  }
+};
+

Added: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/FsmObjectProxy.h
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/FsmObjectProxy.h	                        (rev 0)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/FsmObjectProxy.h	2014-02-12 09:59:17 UTC (rev 2460)
@@ -0,0 +1,80 @@
+// -*- C++ -*-
+/*!
+ * @file FsmObjectProxy.h 
+ * @brief FsmObjectProxy CORBA proxy for doil
+ * @date $Date$
+ * @author This file was automatically generated from RTC.idl 
+ *         by omniidl/doil backend
+ *
+ * $Id$
+ */
+#ifndef RTC_FSMOBJECTPROXY_H 
+#define RTC_FSMOBJECTPROXY_H 
+
+#include <coil/Properties.h>
+#include <coil/Mutex.h>
+#include <coil/Guard.h>
+#include <doil/corba/CORBAManager.h>
+#include <doil/corba/CORBAProxyBase.h>
+#include <IFsmObject.h>
+#include <SDOPackageTypes.h>
+#include <rtc/corba/idl/RTCSkel.h>
+
+
+namespace RTC 
+{
+namespace CORBA 
+{
+
+  class FsmObjectProxy 
+  : public virtual ::doil::CORBA::CORBAProxyBase,
+    public virtual ::RTC::Local::IFsmObject
+  {
+    typedef coil::Mutex Mutex;
+    typedef coil::Guard<Mutex> Guard;
+  public:
+    FsmObjectProxy(::CORBA::Object_ptr obj);
+    virtual ~FsmObjectProxy();
+
+    virtual ::RTC::Local::ReturnCode_t send_stimulus(const ::std::string& message, ::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ();
+
+
+
+    const char* id() {return "FsmObject";}
+    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::FsmObject_ptr m_obj;
+  private:
+    std::string m_name;
+    Mutex m_refcountMutex;
+    int m_refcount;
+  };
+
+}; // namespace CORBA
+}; // namespace RTC 
+
+#ifndef RTC_FSMOBJECTSERVANT_H 
+
+
+#endif // RTC_FSMOBJECTSERVANT_H
+
+extern "C"
+{
+  void FsmObjectProxyCORBAInit(coil::Properties& prop);
+};
+
+#endif // RTC_FSMOBJECTPROXY_H



More information about the openrtm-commit mailing list