[openrtm-commit:01276] r2471 - branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests
openrtm @ openrtm.org
openrtm @ openrtm.org
2014年 2月 12日 (水) 23:59:39 JST
Author: win-ei
Date: 2014-02-12 23:59:39 +0900 (Wed, 12 Feb 2014)
New Revision: 2471
Added:
branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/ModeProxy.cpp
branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/ModeProxy.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/ModeProxy.cpp
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/ModeProxy.cpp (rev 0)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/ModeProxy.cpp 2014-02-12 14:59:39 UTC (rev 2471)
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+/*!
+ * @file ModeProxy.cpp
+ * @brief IMode 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 <IMode.h>
+#include <ModeProxy.h>
+#include <RTCTypeConversion.h>
+#include <doil/corba/BasicTypeConversion.h>
+
+namespace RTC
+{
+namespace CORBA
+{
+ /*!
+ * @brief ctor
+ */
+ ModeProxy::ModeProxy(::CORBA::Object_ptr obj)
+ : ::doil::CORBA::CORBAProxyBase(obj),
+ m_obj(::RTC::Mode::_nil()),
+ m_refcount(1)// : m_obj(::RTC::Mode::_nil())
+ {
+ m_obj = ::RTC::Mode::_narrow(obj);
+ if (::CORBA::is_nil(m_obj)) throw std::bad_alloc();
+ m_obj = ::RTC::Mode::_duplicate(m_obj);
+ }
+
+ /*!
+ * @brief dtor
+ */
+ ModeProxy::~ModeProxy()
+ {
+ ::CORBA::release(m_obj);
+ }
+
+
+}; // namespace CORBA
+}; // namespace RTC
+
+extern "C"
+{
+ void ModeProxyCORBAInit(coil::Properties& prop)
+ {
+ doil::CORBA::CORBAManager& mgr(doil::CORBA::CORBAManager::instance());
+ mgr.registerProxyFactory("ModeProxy",
+ doil::New< ::RTC::CORBA::ModeProxy >,
+ doil::Delete< ::RTC::CORBA::ModeProxy >);
+ }
+};
+
Added: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/ModeProxy.h
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/ModeProxy.h (rev 0)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/ModeProxy.h 2014-02-12 14:59:39 UTC (rev 2471)
@@ -0,0 +1,76 @@
+// -*- C++ -*-
+/*!
+ * @file ModeProxy.h
+ * @brief ModeProxy CORBA proxy for doil
+ * @date $Date$
+ * @author This file was automatically generated from RTC.idl
+ * by omniidl/doil backend
+ *
+ * $Id$
+ */
+#ifndef RTC_MODEPROXY_H
+#define RTC_MODEPROXY_H
+
+#include <coil/Properties.h>
+#include <coil/Mutex.h>
+#include <coil/Guard.h>
+#include <doil/corba/CORBAManager.h>
+#include <doil/corba/CORBAProxyBase.h>
+#include <IMode.h>
+#include <SDOPackageTypes.h>
+#include <rtc/corba/idl/RTCSkel.h>
+
+
+namespace RTC
+{
+namespace CORBA
+{
+
+ class ModeProxy
+ : public virtual ::doil::CORBA::CORBAProxyBase,
+ public virtual ::RTC::Local::IMode
+ {
+ typedef coil::Mutex Mutex;
+ typedef coil::Guard<Mutex> Guard;
+ public:
+ ModeProxy(::CORBA::Object_ptr obj);
+ virtual ~ModeProxy();
+
+
+ const char* id() {return "Mode";}
+ 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::Mode_ptr m_obj;
+ private:
+ std::string m_name;
+ Mutex m_refcountMutex;
+ int m_refcount;
+ };
+
+}; // namespace CORBA
+}; // namespace RTC
+
+#ifndef RTC_MODESERVANT_H
+
+
+#endif // RTC_MODESERVANT_H
+
+extern "C"
+{
+ void ModeProxyCORBAInit(coil::Properties& prop);
+};
+
+#endif // RTC_MODEPROXY_H
More information about the openrtm-commit
mailing list