[openrtm-commit:01231] r2426 - branches/work_ForDoil/OpenRTM-aist/src/lib/doil/corba
openrtm @ openrtm.org
openrtm @ openrtm.org
2014年 2月 9日 (日) 22:16:58 JST
Author: win-ei
Date: 2014-02-09 22:16:58 +0900 (Sun, 09 Feb 2014)
New Revision: 2426
Added:
branches/work_ForDoil/OpenRTM-aist/src/lib/doil/corba/CORBAProxyBase.h
Modified:
branches/work_ForDoil/OpenRTM-aist/src/lib/doil/corba/CORBAManager.h
Log:
Added CORBAProxyBase class.
Modified: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/corba/CORBAManager.h
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/corba/CORBAManager.h 2014-02-09 08:58:59 UTC (rev 2425)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/corba/CORBAManager.h 2014-02-09 13:16:58 UTC (rev 2426)
@@ -26,7 +26,7 @@
#include <doil/ProxyFactory.h>
#include <doil/corba/CORBA.h>
#include <doil/corba/CORBAServantBase.h>
-//#include <doil/corba/CORBAProxyBase.h>
+#include <doil/corba/CORBAProxyBase.h>
#include <doil/ObjectManager.h>
namespace doil
Added: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/corba/CORBAProxyBase.h
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/corba/CORBAProxyBase.h (rev 0)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/corba/CORBAProxyBase.h 2014-02-09 13:16:58 UTC (rev 2426)
@@ -0,0 +1,78 @@
+// -*- C++ -*-
+/*!
+ * @file CorbaProxyBase.h
+ * @brief RTM CORBA proxy base class
+ * @date $Date$
+ * @author Noriaki Ando <n-ando at aist.go.jp>
+ *
+ * Copyright (C) 2008
+ * Task-intelligence Research Group,
+ * Intelligent Systems Research Institute,
+ * National Institute of
+ * Advanced Industrial Science and Technology (AIST), Japan
+ * All rights reserved.
+ *
+ * $Id$
+ *
+ */
+
+#ifndef DOIL_CORBA_CORBAPROXYBASE_H
+#define DOIL_CORBA_CORBAPROXYBASE_H
+
+#include <string>
+#include <rtm/config_rtc.h>
+#include <doil/ProxyBase.h>
+#include <doil/ImplBase.h>
+#include <doil/corba/CORBA.h>
+
+namespace doil
+{
+namespace CORBA
+{
+ class CORBAProxyBase
+ : public doil::ProxyBase,
+#ifdef RTC_CORBA_CXXMAPPING11
+ public virtual PortableServer::ServantBase
+#else
+ public virtual PortableServer::RefCountServantBase
+#endif
+ {
+ public:
+ CORBAProxyBase(ImplBase* impl)
+ : m_refcount(1), m_id(impl->id()), m_name(impl->name())
+ {
+ }
+ virtual ~CORBAProxyBase(){}
+
+ virtual const char* id() const
+ {
+ return m_id.c_str();
+ }
+
+ virtual const char* name() const
+ {
+ return m_name.c_str();
+ }
+
+ virtual void incRef()
+ {
+ ++m_refcount;
+ }
+
+ virtual void decRef()
+ {
+ --m_refcount;
+ if (m_refcount == 0)
+ delete this;
+ }
+
+ protected:
+ int m_refcount;
+ std::string m_id;
+ std::string m_name;
+
+ };
+}; // namespoace doil
+}; // namespace CORBA
+#endif // DOIL_CORBA_CORBAPROXYBASE_H
+
More information about the openrtm-commit
mailing list