From 809b4da400fca9bb286ea5ebd49afd1e7a4c2ecd Mon Sep 17 00:00:00 2001
From: Rainer Kartmann <rainer.kartmann@kit.edu>
Date: Mon, 25 May 2020 14:36:14 +0200
Subject: [PATCH] Add library RobotAPIArmarXObjects

---
 .../libraries/ArmarXObjects/ArmarXObjects.cpp | 28 +++++++++++++++
 .../libraries/ArmarXObjects/ArmarXObjects.h   | 29 +++++++++++++++
 .../libraries/ArmarXObjects/CMakeLists.txt    | 35 ++++++++++++++++++
 .../ArmarXObjects/test/ArmarXObjectsTest.cpp  | 36 +++++++++++++++++++
 .../ArmarXObjects/test/CMakeLists.txt         |  5 +++
 source/RobotAPI/libraries/CMakeLists.txt      |  6 ++--
 6 files changed, 137 insertions(+), 2 deletions(-)
 create mode 100644 source/RobotAPI/libraries/ArmarXObjects/ArmarXObjects.cpp
 create mode 100644 source/RobotAPI/libraries/ArmarXObjects/ArmarXObjects.h
 create mode 100644 source/RobotAPI/libraries/ArmarXObjects/CMakeLists.txt
 create mode 100644 source/RobotAPI/libraries/ArmarXObjects/test/ArmarXObjectsTest.cpp
 create mode 100644 source/RobotAPI/libraries/ArmarXObjects/test/CMakeLists.txt

diff --git a/source/RobotAPI/libraries/ArmarXObjects/ArmarXObjects.cpp b/source/RobotAPI/libraries/ArmarXObjects/ArmarXObjects.cpp
new file mode 100644
index 000000000..5a3e68a75
--- /dev/null
+++ b/source/RobotAPI/libraries/ArmarXObjects/ArmarXObjects.cpp
@@ -0,0 +1,28 @@
+/*
+ * This file is part of ArmarX.
+ *
+ * ArmarX is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * ArmarX is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @package    RobotAPI::ArmarXObjects::ArmarXObjects
+ * @author     Rainer Kartmann ( rainer dot kartmann at kit dot edu )
+ * @date       2020
+ * @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
+ *             GNU General Public License
+ */
+
+#include "ArmarXObjects.h"
+
+namespace armarx
+{
+
+}
diff --git a/source/RobotAPI/libraries/ArmarXObjects/ArmarXObjects.h b/source/RobotAPI/libraries/ArmarXObjects/ArmarXObjects.h
new file mode 100644
index 000000000..a1ebfe2e2
--- /dev/null
+++ b/source/RobotAPI/libraries/ArmarXObjects/ArmarXObjects.h
@@ -0,0 +1,29 @@
+/*
+ * This file is part of ArmarX.
+ *
+ * ArmarX is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * ArmarX is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @package    RobotAPI::ArmarXObjects::ArmarXObjects
+ * @author     Rainer Kartmann ( rainer dot kartmann at kit dot edu )
+ * @date       2020
+ * @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
+ *             GNU General Public License
+ */
+
+#pragma once
+
+
+namespace armarx
+{
+
+}
diff --git a/source/RobotAPI/libraries/ArmarXObjects/CMakeLists.txt b/source/RobotAPI/libraries/ArmarXObjects/CMakeLists.txt
new file mode 100644
index 000000000..c819dd3e7
--- /dev/null
+++ b/source/RobotAPI/libraries/ArmarXObjects/CMakeLists.txt
@@ -0,0 +1,35 @@
+set(LIB_NAME       ${PROJECT_NAME}ArmarXObjects)
+
+armarx_component_set_name("${LIB_NAME}")
+armarx_set_target("Library: ${LIB_NAME}")
+
+set(LIBS
+    ArmarXCoreInterfaces ArmarXCore
+)
+
+set(LIB_FILES
+    ArmarXObjects.cpp
+
+    ObjectFinder.cpp
+    ObjectInfo.cpp
+)
+set(LIB_HEADERS
+    ArmarXObjects.h
+
+    ObjectFinder.h
+    ObjectInfo.h
+)
+
+
+armarx_add_library("${LIB_NAME}" "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}")
+
+#find_package(MyLib QUIET)
+#armarx_build_if(MyLib_FOUND "MyLib not available")
+# all target_include_directories must be guarded by if(Xyz_FOUND)
+# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
+#if(MyLib_FOUND)
+#    target_include_directories(ArmarXObjects PUBLIC ${MyLib_INCLUDE_DIRS})
+#endif()
+
+# add unit tests
+add_subdirectory(test)
diff --git a/source/RobotAPI/libraries/ArmarXObjects/test/ArmarXObjectsTest.cpp b/source/RobotAPI/libraries/ArmarXObjects/test/ArmarXObjectsTest.cpp
new file mode 100644
index 000000000..0af92b11d
--- /dev/null
+++ b/source/RobotAPI/libraries/ArmarXObjects/test/ArmarXObjectsTest.cpp
@@ -0,0 +1,36 @@
+/*
+ * This file is part of ArmarX.
+ *
+ * ArmarX is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * ArmarX is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @package    RobotAPI::ArmarXObjects::ArmarXObjects
+ * @author     Rainer Kartmann ( rainer dot kartmann at kit dot edu )
+ * @date       2020
+ * @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
+ *             GNU General Public License
+ */
+
+#define BOOST_TEST_MODULE RobotAPI::ArmarXLibraries::ArmarXObjects
+
+#define ARMARX_BOOST_TEST
+
+#include <RobotAPI/Test.h>
+#include "../ArmarXObjects.h"
+
+#include <iostream>
+
+BOOST_AUTO_TEST_CASE(testExample)
+{
+
+    BOOST_CHECK_EQUAL(true, true);
+}
diff --git a/source/RobotAPI/libraries/ArmarXObjects/test/CMakeLists.txt b/source/RobotAPI/libraries/ArmarXObjects/test/CMakeLists.txt
new file mode 100644
index 000000000..2ad25f7ea
--- /dev/null
+++ b/source/RobotAPI/libraries/ArmarXObjects/test/CMakeLists.txt
@@ -0,0 +1,5 @@
+
+# Libs required for the tests
+SET(LIBS ${LIBS} ArmarXCore ${LIB_NAME})
+
+armarx_add_test(ArmarXObjectsTest ArmarXObjectsTest.cpp "${LIBS}")
diff --git a/source/RobotAPI/libraries/CMakeLists.txt b/source/RobotAPI/libraries/CMakeLists.txt
index 049d3fd2e..90a62cd30 100644
--- a/source/RobotAPI/libraries/CMakeLists.txt
+++ b/source/RobotAPI/libraries/CMakeLists.txt
@@ -1,4 +1,5 @@
 add_subdirectory(ArmarXEtherCAT)
+add_subdirectory(ArmarXObjects)
 add_subdirectory(ControllerUIUtility)
 add_subdirectory(core)
 add_subdirectory(DebugDrawerConfigWidget)
@@ -12,8 +13,9 @@ add_subdirectory(RobotStatechartHelpers)
 add_subdirectory(SimpleJsonLogger)
 add_subdirectory(SimpleTrajectory)
 add_subdirectory(widgets)
-add_subdirectory(natik)
-add_subdirectory(aron)
 
 add_subdirectory(diffik)
+add_subdirectory(natik)
+
 add_subdirectory(armem)
+add_subdirectory(aron)
-- 
GitLab