[openrtm-commit:01313] r2508 - branches/work_ForDoil/OpenRTM-aist/src/lib/doil/ice

openrtm @ openrtm.org openrtm @ openrtm.org
2014年 2月 17日 (月) 10:28:45 JST


Author: win-ei
Date: 2014-02-17 10:28:44 +0900 (Mon, 17 Feb 2014)
New Revision: 2508

Added:
   branches/work_ForDoil/OpenRTM-aist/src/lib/doil/ice/IceProxyBase.h
Log:
Added IceProxyBase class. 

Added: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/ice/IceProxyBase.h
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/ice/IceProxyBase.h	                        (rev 0)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/ice/IceProxyBase.h	2014-02-17 01:28:44 UTC (rev 2508)
@@ -0,0 +1,74 @@
+// -*- C++ -*-
+/*!
+ * @file IceProxyBase.h
+ * @brief Doil Ice 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_ICE_ICEPROXYBASE_H
+#define DOIL_ICE_ICEPROXYBASE_H
+
+#include <string>
+#include <rtm/config_rtc.h>
+#include <doil/ProxyBase.h>
+#include <doil/ImplBase.h>
+#include <doil/ice/Ice.h>
+
+namespace doil
+{
+namespace Ice
+{
+  class IceProxyBase
+    : public doil::ProxyBase,
+      public virtual ::Ice::Object
+  {
+  public:
+    IceProxyBase(ImplBase* impl)
+      : m_refcount(1)//, m_id(impl->id()), m_name(impl->name())
+    {
+    }
+    virtual ~IceProxyBase(){}
+
+    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 Ice
+#endif // DOIL_ICE_ICEPROXYBASE_H
+



More information about the openrtm-commit mailing list