[openrtm-commit:01292] r2487 - branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs

openrtm @ openrtm.org openrtm @ openrtm.org
2014年 2月 13日 (木) 23:23:52 JST


Author: win-ei
Date: 2014-02-13 23:23:51 +0900 (Thu, 13 Feb 2014)
New Revision: 2487

Added:
   branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/ComponentActionImpl.cpp
   branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/ComponentActionImpl.h
Modified:
   branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/Makefile.am
Log:
Daily work.

Added: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/ComponentActionImpl.cpp
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/ComponentActionImpl.cpp	                        (rev 0)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/ComponentActionImpl.cpp	2014-02-13 14:23:51 UTC (rev 2487)
@@ -0,0 +1,137 @@
+// -*- C++ -*-
+/*!
+ * @file ComponentActionImpl.h
+ * @brief ComponentActionImpl C++ implementation sample for doil
+ * @date $Date$
+ * @author 
+ *
+ * $Id$
+ */
+
+
+#include <stdio.h>
+#include <ComponentActionImpl.h>
+#include <iostream>
+#include <Logger.h>
+
+namespace UnitTest
+{
+namespace Servant
+{
+  /*!
+   * @if jp
+   * @class ComponentActionImpl
+   * @brief ComponentActionServant試験用インプリメントクラス
+   * @else
+   * @class ComponentActionImpl
+   * @brief ComponentAction implementation class for ComponentActionServant' unittest.
+   * @endif
+   */
+    ComponentActionImpl::ComponentActionImpl()
+    {
+      ++count;
+      m_logger = new Logger();
+    } 
+    ComponentActionImpl::ComponentActionImpl(Logger& aLogger)
+    {
+      ++count;
+      m_logger = &aLogger;
+    } 
+
+    ComponentActionImpl::~ComponentActionImpl()
+    {
+    }
+
+    ::RTC::Local::ReturnCode_t ComponentActionImpl::on_initialize()
+      throw ()
+    {
+        if (m_logger != NULL) 
+          {
+            m_logger->push("on_initialize");
+          }
+        return RTC::Local::RTC_OK;
+    }
+
+    ::RTC::Local::ReturnCode_t ComponentActionImpl::on_finalize()
+      throw ()
+    {
+        if (m_logger != NULL) 
+          {
+            m_logger->push("on_finalize");
+          }
+        return RTC::Local::RTC_OK;
+    }
+
+    ::RTC::Local::ReturnCode_t ComponentActionImpl::on_startup(::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ()
+    {
+        if (m_logger != NULL) 
+          {
+            m_logger->push("on_startup");
+          }
+        return RTC::Local::RTC_OK;
+    }
+
+    ::RTC::Local::ReturnCode_t ComponentActionImpl::on_shutdown(::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ()
+    {
+        if (m_logger != NULL) 
+          {
+            m_logger->push("on_shutdown");
+          }
+        return RTC::Local::RTC_OK;
+    }
+
+    ::RTC::Local::ReturnCode_t ComponentActionImpl::on_activated(::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ()
+    {
+        if (m_logger != NULL) 
+          {
+            m_logger->push("on_activated");
+          }
+        return RTC::Local::RTC_OK;
+    }
+
+    ::RTC::Local::ReturnCode_t ComponentActionImpl::on_deactivated(::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ()
+    {
+        if (m_logger != NULL) 
+          {
+            m_logger->push("on_deactivated");
+          }
+        return RTC::Local::RTC_OK;
+    }
+
+    ::RTC::Local::ReturnCode_t ComponentActionImpl::on_aborting(::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ()
+    {
+        if (m_logger != NULL) 
+          {
+            m_logger->push("on_aborting");
+          }
+        return RTC::Local::RTC_OK;
+    }
+
+    ::RTC::Local::ReturnCode_t ComponentActionImpl::on_error(::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ()
+    {
+        if (m_logger != NULL) 
+          {
+            m_logger->push("on_error");
+          }
+        return RTC::Local::RTC_OK;
+    }
+
+    ::RTC::Local::ReturnCode_t ComponentActionImpl::on_reset(::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ()
+    {
+        if (m_logger != NULL) 
+          {
+            m_logger->push("on_reset");
+          }
+        return RTC::Local::RTC_OK;
+    }
+
+
+}; // namespace Local 
+}; // namespace SDOPackage 

Added: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/ComponentActionImpl.h
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/ComponentActionImpl.h	                        (rev 0)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/ComponentActionImpl.h	2014-02-13 14:23:51 UTC (rev 2487)
@@ -0,0 +1,82 @@
+// -*- C++ -*-
+/*!
+ * @file ComponentActionImpl.h
+ * @brief ComponentActionImpl C++ implementation sample for doil
+ * @date $Date$
+ * @author 
+ *
+ * $Id$
+ */
+
+#ifndef COMPONENTACTION_IMPL_H
+#define COMPONENTACTION_IMPL_H
+
+
+#include <doil/ImplBase.h>
+#include <IComponentAction.h>
+#include <Logger.h>
+
+namespace UnitTest
+{
+namespace Servant
+{
+
+  /*!
+   * @if jp
+   * @class ComponentActionImpl
+   * @brief ComponentActionServant試験用インプリメントクラス
+   * @else
+   * @class ComponentActionImpl
+   * @brief ComponentAction implementation class for ComponentActionServant' unittest.
+   * @endif
+   */
+
+  class ComponentActionImpl
+   : public virtual doil::ImplBase,
+     public virtual RTC::Local::IComponentAction
+
+  {
+  public:
+    ComponentActionImpl();
+    ComponentActionImpl(Logger& aLogger);
+
+    virtual ~ComponentActionImpl();
+
+    virtual ::RTC::Local::ReturnCode_t on_initialize()
+      throw ();
+
+    virtual ::RTC::Local::ReturnCode_t on_finalize()
+      throw ();
+
+    virtual ::RTC::Local::ReturnCode_t on_startup(::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ();
+
+    virtual ::RTC::Local::ReturnCode_t on_shutdown(::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ();
+
+    virtual ::RTC::Local::ReturnCode_t on_activated(::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ();
+
+    virtual ::RTC::Local::ReturnCode_t on_deactivated(::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ();
+
+    virtual ::RTC::Local::ReturnCode_t on_aborting(::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ();
+
+    virtual ::RTC::Local::ReturnCode_t on_error(::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ();
+
+    virtual ::RTC::Local::ReturnCode_t on_reset(::RTC::Local::ExecutionContextHandle_t exec_handle)
+      throw ();
+
+  private:
+    static int count;
+    char m_name[32];
+    int refcount;
+    Logger *m_logger;
+  };
+
+}; // namespace Servant
+}; // namespace UnitTest
+
+#endif  // 

Modified: branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/Makefile.am
===================================================================
--- branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/Makefile.am	2014-02-13 07:46:42 UTC (rev 2486)
+++ branches/work_ForDoil/OpenRTM-aist/src/lib/doil/utils/omniidl_be/tests/unitTest/stubs/Makefile.am	2014-02-13 14:23:51 UTC (rev 2487)
@@ -38,6 +38,7 @@
 lib_LIBRARIES = libstubs.a
 libstubs_a_SOURCES = ConfigurationImpl.cpp
 libstubs_a_SOURCES += Logger.cpp
+libstubs_a_SOURCES += ComponentActionImpl.cpp
 stubsdir = .
 
 noinst_LIBRARIES = libstubs.a



More information about the openrtm-commit mailing list