[openrtm-commit:01239] r2434 - branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests
openrtm @ openrtm.org
openrtm @ openrtm.org
2014年 2月 11日 (火) 23:14:43 JST
Author: win-ei
Date: 2014-02-11 23:14:43 +0900 (Tue, 11 Feb 2014)
New Revision: 2434
Added:
branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/PortServiceProxy.cpp
branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/PortServiceProxy.h
branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/SDOServiceProxy.cpp
branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/SDOServiceProxy.h
Log:
?\227?\128?\128?\227?\128?\128These files are likely to be generated by omniidl_be.
Added: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/PortServiceProxy.cpp
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/PortServiceProxy.cpp (rev 0)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/PortServiceProxy.cpp 2014-02-11 14:14:43 UTC (rev 2434)
@@ -0,0 +1,250 @@
+// -*- C++ -*-
+/*!
+ * @file PortServiceProxy.cpp
+ * @brief IPortService 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 <IPortService.h>
+#include <PortServiceProxy.h>
+#include <RTCTypeConversion.h>
+#include <doil/corba/BasicTypeConversion.h>
+
+namespace RTC
+{
+namespace CORBA
+{
+ /*!
+ * @brief ctor
+ */
+ PortServiceProxy::PortServiceProxy(::CORBA::Object_ptr obj)
+ : ::doil::CORBA::CORBAProxyBase(obj),
+ m_obj(::RTC::PortService::_nil()),
+ m_refcount(1),
+ ::SDOPackage::CORBA::SDOServiceProxy(obj)// : m_obj(::RTC::PortService::_nil()),
+// ::SDOPackage::SDOServiceProxy(obj)
+ {
+ m_obj = ::RTC::PortService::_narrow(obj);
+ if (::CORBA::is_nil(m_obj)) throw std::bad_alloc();
+ m_obj = ::RTC::PortService::_duplicate(m_obj);
+ }
+
+ /*!
+ * @brief dtor
+ */
+ PortServiceProxy::~PortServiceProxy()
+ {
+ ::CORBA::release(m_obj);
+ }
+
+
+ /*!
+ * @brief get_port_profile
+ */
+ ::RTC::Local::PortProfile PortServiceProxy::get_port_profile()
+ throw ()
+ {
+ // Convert Local to CORBA.
+ // (The direction of the argument is 'in' or 'inout'.)
+
+ // Execute the method.
+ ::RTC::PortProfile* corba_ret;
+ ::RTC::Local::PortProfile local_ret;
+ corba_ret = m_obj->get_port_profile();
+
+ // Convert CORBA to Local.
+ // (The direction of the argument is 'out' or 'inout'.)
+
+ // Generate the return value.
+ corba_to_local(*corba_ret, local_ret);
+ delete corba_ret;
+ return local_ret;
+ }
+
+ /*!
+ * @brief get_connector_profiles
+ */
+ ::RTC::Local::ConnectorProfileList PortServiceProxy::get_connector_profiles()
+ throw ()
+ {
+ // Convert Local to CORBA.
+ // (The direction of the argument is 'in' or 'inout'.)
+
+ // Execute the method.
+ ::RTC::ConnectorProfileList* corba_ret;
+ ::RTC::Local::ConnectorProfileList local_ret;
+ corba_ret = m_obj->get_connector_profiles();
+
+ // Convert CORBA to Local.
+ // (The direction of the argument is 'out' or 'inout'.)
+
+ // Generate the return value.
+ corba_to_local(*corba_ret, local_ret);
+ delete corba_ret;
+ return local_ret;
+ }
+
+ /*!
+ * @brief get_connector_profile
+ */
+ ::RTC::Local::ConnectorProfile PortServiceProxy::get_connector_profile(const ::std::string& connector_id)
+ throw ()
+ {
+ // Convert Local to CORBA.
+ // (The direction of the argument is 'in' or 'inout'.)
+ char* _connector_id;
+ local_to_corba(connector_id, _connector_id);
+
+ // Execute the method.
+ ::RTC::ConnectorProfile* corba_ret;
+ ::RTC::Local::ConnectorProfile local_ret;
+ corba_ret = m_obj->get_connector_profile(_connector_id);
+
+ // Convert CORBA to Local.
+ // (The direction of the argument is 'out' or 'inout'.)
+
+ // Generate the return value.
+ corba_to_local(*corba_ret, local_ret);
+ delete corba_ret;
+ return local_ret;
+ }
+
+ /*!
+ * @brief connect
+ */
+ ::RTC::Local::ReturnCode_t PortServiceProxy::connect(::RTC::Local::ConnectorProfile& connector_profile)
+ throw ()
+ {
+ // Convert Local to CORBA.
+ // (The direction of the argument is 'in' or 'inout'.)
+ ::RTC::ConnectorProfile _connector_profile;
+ local_to_corba(connector_profile, _connector_profile);
+
+ // Execute the method.
+ ::RTC::ReturnCode_t corba_ret;
+ ::RTC::Local::ReturnCode_t local_ret;
+ corba_ret = m_obj->connect(_connector_profile);
+
+ // Convert CORBA to Local.
+ // (The direction of the argument is 'out' or 'inout'.)
+ corba_to_local(_connector_profile, connector_profile);
+
+ // Generate the return value.
+ corba_to_local(corba_ret, local_ret);
+ return local_ret;
+ }
+
+ /*!
+ * @brief disconnect
+ */
+ ::RTC::Local::ReturnCode_t PortServiceProxy::disconnect(const ::std::string& connector_id)
+ throw ()
+ {
+ // Convert Local to CORBA.
+ // (The direction of the argument is 'in' or 'inout'.)
+ char* _connector_id;
+ local_to_corba(connector_id, _connector_id);
+
+ // Execute the method.
+ ::RTC::ReturnCode_t corba_ret;
+ ::RTC::Local::ReturnCode_t local_ret;
+ corba_ret = m_obj->disconnect(_connector_id);
+
+ // 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 disconnect_all
+ */
+ ::RTC::Local::ReturnCode_t PortServiceProxy::disconnect_all()
+ 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->disconnect_all();
+
+ // 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 notify_connect
+ */
+ ::RTC::Local::ReturnCode_t PortServiceProxy::notify_connect(::RTC::Local::ConnectorProfile& connector_profile)
+ throw ()
+ {
+ // Convert Local to CORBA.
+ // (The direction of the argument is 'in' or 'inout'.)
+ ::RTC::ConnectorProfile _connector_profile;
+ local_to_corba(connector_profile, _connector_profile);
+
+ // Execute the method.
+ ::RTC::ReturnCode_t corba_ret;
+ ::RTC::Local::ReturnCode_t local_ret;
+ corba_ret = m_obj->notify_connect(_connector_profile);
+
+ // Convert CORBA to Local.
+ // (The direction of the argument is 'out' or 'inout'.)
+ corba_to_local(_connector_profile, connector_profile);
+
+ // Generate the return value.
+ corba_to_local(corba_ret, local_ret);
+ return local_ret;
+ }
+
+ /*!
+ * @brief notify_disconnect
+ */
+ ::RTC::Local::ReturnCode_t PortServiceProxy::notify_disconnect(const ::std::string& connector_id)
+ throw ()
+ {
+ // Convert Local to CORBA.
+ // (The direction of the argument is 'in' or 'inout'.)
+ char* _connector_id;
+ local_to_corba(connector_id, _connector_id);
+
+ // Execute the method.
+ ::RTC::ReturnCode_t corba_ret;
+ ::RTC::Local::ReturnCode_t local_ret;
+ corba_ret = m_obj->notify_disconnect(_connector_id);
+
+ // 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 PortServiceProxyCORBAInit(coil::Properties& prop)
+ {
+ doil::CORBA::CORBAManager& mgr(doil::CORBA::CORBAManager::instance());
+ mgr.registerProxyFactory("PortServiceProxy",
+ doil::New< ::RTC::CORBA::PortServiceProxy >,
+ doil::Delete< ::RTC::CORBA::PortServiceProxy >);
+ }
+};
+
Added: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/PortServiceProxy.h
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/PortServiceProxy.h (rev 0)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/PortServiceProxy.h 2014-02-11 14:14:43 UTC (rev 2434)
@@ -0,0 +1,110 @@
+// -*- C++ -*-
+/*!
+ * @file PortServiceProxy.h
+ * @brief PortServiceProxy CORBA proxy for doil
+ * @date $Date$
+ * @author This file was automatically generated from RTC.idl
+ * by omniidl/doil backend
+ *
+ * $Id$
+ */
+#ifndef RTC_PORTSERVICEPROXY_H
+#define RTC_PORTSERVICEPROXY_H
+
+#include <coil/Properties.h>
+#include <coil/Mutex.h>
+#include <coil/Guard.h>
+#include <doil/corba/CORBAManager.h>
+#include <doil/corba/CORBAProxyBase.h>
+#include <IPortService.h>
+#include <SDOServiceProxy.h>
+#include <SDOPackageTypes.h>
+#include <rtc/corba/idl/RTCSkel.h>
+
+
+namespace RTC
+{
+namespace CORBA
+{
+
+ class PortServiceProxy
+ : public virtual ::doil::CORBA::CORBAProxyBase,
+ public virtual ::SDOPackage::CORBA::SDOServiceProxy,
+ public virtual ::RTC::Local::IPortService
+ {
+ typedef coil::Mutex Mutex;
+ typedef coil::Guard<Mutex> Guard;
+ public:
+ PortServiceProxy(::CORBA::Object_ptr obj);
+ virtual ~PortServiceProxy();
+
+ virtual ::RTC::Local::PortProfile get_port_profile()
+ throw ();
+
+
+ virtual ::RTC::Local::ConnectorProfileList get_connector_profiles()
+ throw ();
+
+
+ virtual ::RTC::Local::ConnectorProfile get_connector_profile(const ::std::string& connector_id)
+ throw ();
+
+
+ virtual ::RTC::Local::ReturnCode_t connect(::RTC::Local::ConnectorProfile& connector_profile)
+ throw ();
+
+
+ virtual ::RTC::Local::ReturnCode_t disconnect(const ::std::string& connector_id)
+ throw ();
+
+
+ virtual ::RTC::Local::ReturnCode_t disconnect_all()
+ throw ();
+
+
+ virtual ::RTC::Local::ReturnCode_t notify_connect(::RTC::Local::ConnectorProfile& connector_profile)
+ throw ();
+
+
+ virtual ::RTC::Local::ReturnCode_t notify_disconnect(const ::std::string& connector_id)
+ throw ();
+
+
+
+ const char* id() {return "PortService";}
+ 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::PortService_ptr m_obj;
+ private:
+ std::string m_name;
+ Mutex m_refcountMutex;
+ int m_refcount;
+ };
+
+}; // namespace CORBA
+}; // namespace RTC
+
+#ifndef RTC_PORTSERVICESERVANT_H
+
+
+#endif // RTC_PORTSERVICESERVANT_H
+
+extern "C"
+{
+ void PortServiceProxyCORBAInit(coil::Properties& prop);
+};
+
+#endif // RTC_PORTSERVICEPROXY_H
Added: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/SDOServiceProxy.cpp
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/SDOServiceProxy.cpp (rev 0)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/SDOServiceProxy.cpp 2014-02-11 14:14:43 UTC (rev 2434)
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+/*!
+ * @file SDOServiceProxy.cpp
+ * @brief ISDOService CORBA proxy for doil
+ * @date $Date$
+ * @author This file was automatically generated form SDOPackage.idl
+ * by omniidl/doil backend
+ *
+ * $Id$
+ */
+
+#include <doil/corba/CORBAManager.h>
+#include <ISDOService.h>
+#include <SDOServiceProxy.h>
+#include <SDOPackageTypeConversion.h>
+#include <doil/corba/BasicTypeConversion.h>
+
+namespace SDOPackage
+{
+namespace CORBA
+{
+ /*!
+ * @brief ctor
+ */
+ SDOServiceProxy::SDOServiceProxy(::CORBA::Object_ptr obj)
+ : ::doil::CORBA::CORBAProxyBase(obj),
+ m_obj(::SDOPackage::SDOService::_nil()),
+ m_refcount(1)// : m_obj(::SDOPackage::SDOService::_nil())
+ {
+ m_obj = ::SDOPackage::SDOService::_narrow(obj);
+ if (::CORBA::is_nil(m_obj)) throw std::bad_alloc();
+ m_obj = ::SDOPackage::SDOService::_duplicate(m_obj);
+ }
+
+ /*!
+ * @brief dtor
+ */
+ SDOServiceProxy::~SDOServiceProxy()
+ {
+ ::CORBA::release(m_obj);
+ }
+
+
+}; // namespace CORBA
+}; // namespace SDOPackage
+
+extern "C"
+{
+ void SDOServiceProxyCORBAInit(coil::Properties& prop)
+ {
+ doil::CORBA::CORBAManager& mgr(doil::CORBA::CORBAManager::instance());
+ mgr.registerProxyFactory("SDOServiceProxy",
+ doil::New< ::SDOPackage::CORBA::SDOServiceProxy >,
+ doil::Delete< ::SDOPackage::CORBA::SDOServiceProxy >);
+ }
+};
+
Added: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/SDOServiceProxy.h
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/SDOServiceProxy.h (rev 0)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/SDOServiceProxy.h 2014-02-11 14:14:43 UTC (rev 2434)
@@ -0,0 +1,75 @@
+// -*- C++ -*-
+/*!
+ * @file SDOServiceProxy.h
+ * @brief SDOServiceProxy CORBA proxy for doil
+ * @date $Date$
+ * @author This file was automatically generated from SDOPackage.idl
+ * by omniidl/doil backend
+ *
+ * $Id$
+ */
+#ifndef SDOPACKAGE_SDOSERVICEPROXY_H
+#define SDOPACKAGE_SDOSERVICEPROXY_H
+
+#include <coil/Properties.h>
+#include <coil/Mutex.h>
+#include <coil/Guard.h>
+#include <doil/corba/CORBAManager.h>
+#include <doil/corba/CORBAProxyBase.h>
+#include <ISDOService.h>
+#include <rtc/corba/idl/SDOPackageSkel.h>
+
+
+namespace SDOPackage
+{
+namespace CORBA
+{
+
+ class SDOServiceProxy
+ : public virtual ::doil::CORBA::CORBAProxyBase,
+ public virtual ::SDOPackage::Local::ISDOService
+ {
+ typedef coil::Mutex Mutex;
+ typedef coil::Guard<Mutex> Guard;
+ public:
+ SDOServiceProxy(::CORBA::Object_ptr obj);
+ virtual ~SDOServiceProxy();
+
+
+ const char* id() {return "SDOService";}
+ 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:
+ ::SDOPackage::SDOService_ptr m_obj;
+ private:
+ std::string m_name;
+ Mutex m_refcountMutex;
+ int m_refcount;
+ };
+
+}; // namespace CORBA
+}; // namespace SDOPackage
+
+#ifndef SDOPACKAGE_SDOSERVICESERVANT_H
+
+
+#endif // SDOPACKAGE_SDOSERVICESERVANT_H
+
+extern "C"
+{
+ void SDOServiceProxyCORBAInit(coil::Properties& prop);
+};
+
+#endif // SDOPACKAGE_SDOSERVICEPROXY_H
More information about the openrtm-commit
mailing list