From e65c7ab766cd999ba595c7cfceed9bd73b0262ec Mon Sep 17 00:00:00 2001 From: Raphael Grimm <ufdrv@student.kit.edu> Date: Sat, 4 Jun 2016 11:23:21 +0200 Subject: [PATCH] apps now use runSimpleComponentApp (less code, less duplication) --- .../BusInspectionUnitObserverApp.h | 41 ------------- .../BusInspectionUnitObserver/CMakeLists.txt | 2 +- .../BusInspectionUnitObserver/main.cpp | 11 ++-- .../ForceTorqueObserver/CMakeLists.txt | 2 +- .../ForceTorqueObserverApp.h | 42 -------------- .../applications/ForceTorqueObserver/main.cpp | 10 ++-- .../ForceTorqueUnitSimulation/CMakeLists.txt | 2 +- .../ForceTorqueUnitSimulationApp.h | 45 --------------- .../ForceTorqueUnitSimulation/main.cpp | 11 ++-- .../HandUnitSimulationApp.h | 55 ------------------ .../applications/HandUnitSimulation/main.cpp | 10 ++-- .../HapticObserver/CMakeLists.txt | 2 +- .../HapticObserver/HapticObserverApp.h | 53 ----------------- .../applications/HapticObserver/main.cpp | 10 ++-- .../applications/HeadIKUnit/CMakeLists.txt | 2 +- .../applications/HeadIKUnit/HeadIKUnitApp.h | 42 -------------- .../RobotAPI/applications/HeadIKUnit/main.cpp | 11 ++-- .../CMakeLists.txt | 2 +- .../InertialMeasurementUnitObserverApp.h | 57 ------------------- .../InertialMeasurementUnitObserver/main.cpp | 10 ++-- .../KinematicUnitObserver/CMakeLists.txt | 2 +- .../KinematicUnitObserverApp.h | 45 --------------- .../KinematicUnitObserver/main.cpp | 10 ++-- .../KinematicUnitSimulation/CMakeLists.txt | 2 +- .../KinematicUnitSimulationApp.h | 45 --------------- .../KinematicUnitSimulation/main.cpp | 10 ++-- .../PlatformUnitObserver/CMakeLists.txt | 2 +- .../PlatformUnitObserverApp.h | 45 --------------- .../PlatformUnitObserver/main.cpp | 10 ++-- .../PlatformUnitSimulation/CMakeLists.txt | 2 +- .../PlatformUnitSimulationApp.h | 45 --------------- .../PlatformUnitSimulation/main.cpp | 10 ++-- .../applications/RobotControl/CMakeLists.txt | 2 +- .../RobotControl/RobotControlApp.h | 45 --------------- .../applications/RobotControl/main.cpp | 10 ++-- .../RobotControlUI/CMakeLists.txt | 1 - .../RobotControlUI/RobotControlUIApp.h | 45 --------------- .../applications/RobotControlUI/main.cpp | 10 ++-- .../applications/XsensIMU/CMakeLists.txt | 2 +- .../applications/XsensIMU/XsensIMUApp.h | 57 ------------------- .../RobotAPI/applications/XsensIMU/main.cpp | 10 ++-- 41 files changed, 85 insertions(+), 745 deletions(-) delete mode 100644 source/RobotAPI/applications/BusInspectionUnitObserver/BusInspectionUnitObserverApp.h delete mode 100644 source/RobotAPI/applications/ForceTorqueObserver/ForceTorqueObserverApp.h delete mode 100644 source/RobotAPI/applications/ForceTorqueUnitSimulation/ForceTorqueUnitSimulationApp.h delete mode 100644 source/RobotAPI/applications/HandUnitSimulation/HandUnitSimulationApp.h delete mode 100644 source/RobotAPI/applications/HapticObserver/HapticObserverApp.h delete mode 100644 source/RobotAPI/applications/HeadIKUnit/HeadIKUnitApp.h delete mode 100644 source/RobotAPI/applications/InertialMeasurementUnitObserver/InertialMeasurementUnitObserverApp.h delete mode 100644 source/RobotAPI/applications/KinematicUnitObserver/KinematicUnitObserverApp.h delete mode 100644 source/RobotAPI/applications/KinematicUnitSimulation/KinematicUnitSimulationApp.h delete mode 100644 source/RobotAPI/applications/PlatformUnitObserver/PlatformUnitObserverApp.h delete mode 100644 source/RobotAPI/applications/PlatformUnitSimulation/PlatformUnitSimulationApp.h delete mode 100644 source/RobotAPI/applications/RobotControl/RobotControlApp.h delete mode 100644 source/RobotAPI/applications/RobotControlUI/RobotControlUIApp.h delete mode 100644 source/RobotAPI/applications/XsensIMU/XsensIMUApp.h diff --git a/source/RobotAPI/applications/BusInspectionUnitObserver/BusInspectionUnitObserverApp.h b/source/RobotAPI/applications/BusInspectionUnitObserver/BusInspectionUnitObserverApp.h deleted file mode 100644 index 697580f92..000000000 --- a/source/RobotAPI/applications/BusInspectionUnitObserver/BusInspectionUnitObserverApp.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file is part of ArmarX. - * - * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved. - * - * 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::applications - * @author Peter Kaiser (peter dot kaiser at kit dot edu) - * @date 2015 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - -#include <ArmarXCore/core/application/Application.h> -#include <RobotAPI/components/units/BusInspectionUnitObserver.h> - -namespace armarx -{ - class BusInspectionUnitObserverApp : - virtual public armarx::Application - { - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties) - { - registry->addObject(Component::create<BusInspectionUnitObserver>(properties)); - } - }; -} - - - diff --git a/source/RobotAPI/applications/BusInspectionUnitObserver/CMakeLists.txt b/source/RobotAPI/applications/BusInspectionUnitObserver/CMakeLists.txt index a59095c00..36d65f098 100644 --- a/source/RobotAPI/applications/BusInspectionUnitObserver/CMakeLists.txt +++ b/source/RobotAPI/applications/BusInspectionUnitObserver/CMakeLists.txt @@ -11,6 +11,6 @@ endif() set(COMPONENT_LIBS RobotAPIUnits) -set(EXE_SOURCE main.cpp BusInspectionUnitObserverApp.h) +set(EXE_SOURCE main.cpp) armarx_add_component_executable("${EXE_SOURCE}") diff --git a/source/RobotAPI/applications/BusInspectionUnitObserver/main.cpp b/source/RobotAPI/applications/BusInspectionUnitObserver/main.cpp index 30b071b58..82f4b846f 100644 --- a/source/RobotAPI/applications/BusInspectionUnitObserver/main.cpp +++ b/source/RobotAPI/applications/BusInspectionUnitObserver/main.cpp @@ -22,12 +22,13 @@ * GNU General Public License */ -#include "BusInspectionUnitObserverApp.h" +#include <RobotAPI/components/units/BusInspectionUnitObserver.h> + +#include <ArmarXCore/core/application/Application.h> +#include <ArmarXCore/core/Component.h> +#include <ArmarXCore/core/logging/Logging.h> int main(int argc, char* argv[]) { - armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::BusInspectionUnitObserverApp>(); - app->setName("BusInspectionUnitObserver"); - - return app->main(argc, argv); + return armarx::runSimpleComponentApp<armarx::BusInspectionUnitObserver>(argc, argv, "BusInspectionUnitObserver"); } diff --git a/source/RobotAPI/applications/ForceTorqueObserver/CMakeLists.txt b/source/RobotAPI/applications/ForceTorqueObserver/CMakeLists.txt index db0ee2c94..2b27a6d00 100644 --- a/source/RobotAPI/applications/ForceTorqueObserver/CMakeLists.txt +++ b/source/RobotAPI/applications/ForceTorqueObserver/CMakeLists.txt @@ -11,6 +11,6 @@ endif() set(COMPONENT_LIBS RobotAPIUnits) -set(EXE_SOURCE main.cpp ForceTorqueObserverApp.h) +set(EXE_SOURCE main.cpp) armarx_add_component_executable("${EXE_SOURCE}") diff --git a/source/RobotAPI/applications/ForceTorqueObserver/ForceTorqueObserverApp.h b/source/RobotAPI/applications/ForceTorqueObserver/ForceTorqueObserverApp.h deleted file mode 100644 index 32d5ae9e6..000000000 --- a/source/RobotAPI/applications/ForceTorqueObserver/ForceTorqueObserverApp.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is part of ArmarX. - * - * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved. - * - * 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 ArmarXCore::applications - * @author Kai Welke (weöle dot at kit dot edu) - * @date 2012 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - - -#include <ArmarXCore/core/application/Application.h> -#include <RobotAPI/components/units/ForceTorqueObserver.h> - -namespace armarx -{ - class ForceTorqueObserverApp : - virtual public armarx::Application - { - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties) - { - registry->addObject(Component::create<ForceTorqueObserver>(properties)); - } - }; -} - - - diff --git a/source/RobotAPI/applications/ForceTorqueObserver/main.cpp b/source/RobotAPI/applications/ForceTorqueObserver/main.cpp index a878d500d..5bde42c5f 100644 --- a/source/RobotAPI/applications/ForceTorqueObserver/main.cpp +++ b/source/RobotAPI/applications/ForceTorqueObserver/main.cpp @@ -22,13 +22,13 @@ * GNU General Public License */ -#include "ForceTorqueObserverApp.h" +#include <RobotAPI/components/units/ForceTorqueObserver.h> + +#include <ArmarXCore/core/application/Application.h> +#include <ArmarXCore/core/Component.h> #include <ArmarXCore/core/logging/Logging.h> int main(int argc, char* argv[]) { - armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::ForceTorqueObserverApp>(); - app->setName("ForceTorqueObserver"); - - return app->main(argc, argv); + return armarx::runSimpleComponentApp<armarx::ForceTorqueObserver>(argc, argv, "ForceTorqueObserver"); } diff --git a/source/RobotAPI/applications/ForceTorqueUnitSimulation/CMakeLists.txt b/source/RobotAPI/applications/ForceTorqueUnitSimulation/CMakeLists.txt index 93f53429d..e7da9acf4 100644 --- a/source/RobotAPI/applications/ForceTorqueUnitSimulation/CMakeLists.txt +++ b/source/RobotAPI/applications/ForceTorqueUnitSimulation/CMakeLists.txt @@ -10,6 +10,6 @@ endif() set(COMPONENT_LIBS RobotAPIUnits) -set(SOURCES main.cpp ForceTorqueUnitSimulationApp.h) +set(SOURCES main.cpp) armarx_add_component_executable("${SOURCES}") diff --git a/source/RobotAPI/applications/ForceTorqueUnitSimulation/ForceTorqueUnitSimulationApp.h b/source/RobotAPI/applications/ForceTorqueUnitSimulation/ForceTorqueUnitSimulationApp.h deleted file mode 100644 index 586593eb4..000000000 --- a/source/RobotAPI/applications/ForceTorqueUnitSimulation/ForceTorqueUnitSimulationApp.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of ArmarX. - * - * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved. - * - * 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::applications - * @author Peter Kaiser - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - - -#include <ArmarXCore/core/application/Application.h> -#include <RobotAPI/components/units/ForceTorqueUnitSimulation.h> - -namespace armarx -{ - /** - * Application for testing the armarx::ForceTorqueUnitSimulation - */ - class ForceTorqueUnitSimulationApp : - virtual public armarx::Application - { - /** - * @see armarx::Application::setup() - */ - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties) - { - registry->addObject(Component::create<ForceTorqueUnitSimulation>(properties)); - } - }; -} diff --git a/source/RobotAPI/applications/ForceTorqueUnitSimulation/main.cpp b/source/RobotAPI/applications/ForceTorqueUnitSimulation/main.cpp index 52d4c4e54..26a126b4b 100644 --- a/source/RobotAPI/applications/ForceTorqueUnitSimulation/main.cpp +++ b/source/RobotAPI/applications/ForceTorqueUnitSimulation/main.cpp @@ -22,12 +22,13 @@ * GNU General Public License */ -#include "ForceTorqueUnitSimulationApp.h" +#include <RobotAPI/components/units/ForceTorqueUnitSimulation.h> + +#include <ArmarXCore/core/application/Application.h> +#include <ArmarXCore/core/Component.h> +#include <ArmarXCore/core/logging/Logging.h> int main(int argc, char* argv[]) { - armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::ForceTorqueUnitSimulationApp>(); - app->setName("ForceTorqueUnitSimulation"); - - return app->main(argc, argv); + return armarx::runSimpleComponentApp<armarx::ForceTorqueUnitSimulation>(argc, argv, "ForceTorqueUnitSimulation"); } diff --git a/source/RobotAPI/applications/HandUnitSimulation/HandUnitSimulationApp.h b/source/RobotAPI/applications/HandUnitSimulation/HandUnitSimulationApp.h deleted file mode 100644 index e39aa0e71..000000000 --- a/source/RobotAPI/applications/HandUnitSimulation/HandUnitSimulationApp.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * This file is part of ArmarX. - * - * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved. - * - * 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::application::HandUnitSimulation - * @author David Schiebener ( schiebener at kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - -#ifndef _ARMARX_APPLICATION_RobotAPI_HandUnitSimulation_H -#define _ARMARX_APPLICATION_RobotAPI_HandUnitSimulation_H - - -#include <RobotAPI/components/units/HandUnitSimulation.h> - -#include <ArmarXCore/core/application/Application.h> - -namespace armarx -{ - /** - * @class HandUnitSimulationApp - * @brief A brief description - * - * Detailed Description - */ - class HandUnitSimulationApp : - virtual public armarx::Application - { - /** - * @see armarx::Application::setup() - */ - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, - Ice::PropertiesPtr properties) - { - registry->addObject(Component::create<HandUnitSimulation>(properties)); - } - }; -} - -#endif diff --git a/source/RobotAPI/applications/HandUnitSimulation/main.cpp b/source/RobotAPI/applications/HandUnitSimulation/main.cpp index 0097fbef9..32bd1b8d3 100644 --- a/source/RobotAPI/applications/HandUnitSimulation/main.cpp +++ b/source/RobotAPI/applications/HandUnitSimulation/main.cpp @@ -22,13 +22,13 @@ * GNU General Public License */ -#include "HandUnitSimulationApp.h" +#include <RobotAPI/components/units/HandUnitSimulation.h> + +#include <ArmarXCore/core/application/Application.h> +#include <ArmarXCore/core/Component.h> #include <ArmarXCore/core/logging/Logging.h> int main(int argc, char* argv[]) { - armarx::ApplicationPtr app = armarx::Application::createInstance < armarx::HandUnitSimulationApp > (); - app->setName("HandUnitSimulation"); - - return app->main(argc, argv); + return armarx::runSimpleComponentApp<armarx::HandUnitSimulation>(argc, argv, "HandUnitSimulation"); } diff --git a/source/RobotAPI/applications/HapticObserver/CMakeLists.txt b/source/RobotAPI/applications/HapticObserver/CMakeLists.txt index f9205fbe4..4ecded180 100644 --- a/source/RobotAPI/applications/HapticObserver/CMakeLists.txt +++ b/source/RobotAPI/applications/HapticObserver/CMakeLists.txt @@ -10,6 +10,6 @@ endif() set(COMPONENT_LIBS RobotAPIUnits) -set(EXE_SOURCE main.cpp HapticObserverApp.h) +set(EXE_SOURCE main.cpp) armarx_add_component_executable("${EXE_SOURCE}") diff --git a/source/RobotAPI/applications/HapticObserver/HapticObserverApp.h b/source/RobotAPI/applications/HapticObserver/HapticObserverApp.h deleted file mode 100644 index d31398ea0..000000000 --- a/source/RobotAPI/applications/HapticObserver/HapticObserverApp.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * This file is part of ArmarX. - * - * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved. - * - * 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::application::HapticObserver - * @author Simon Ottenhaus ( simon dot ottenhaus at kit dot edu ) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - -#ifndef _ARMARX_APPLICATION_RobotAPI_HapticObserver_H -#define _ARMARX_APPLICATION_RobotAPI_HapticObserver_H - -#include <ArmarXCore/core/application/Application.h> -#include <RobotAPI/components/units/HapticObserver.h> - -namespace armarx -{ - /** - * @class HapticObserverApp - * @brief A brief description - * - * Detailed Description - */ - class HapticObserverApp : - virtual public armarx::Application - { - /** - * @see armarx::Application::setup() - */ - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, - Ice::PropertiesPtr properties) - { - registry->addObject(Component::create<HapticObserver>(properties)); - } - }; -} - -#endif diff --git a/source/RobotAPI/applications/HapticObserver/main.cpp b/source/RobotAPI/applications/HapticObserver/main.cpp index 7d8ca2521..c521a8ac8 100644 --- a/source/RobotAPI/applications/HapticObserver/main.cpp +++ b/source/RobotAPI/applications/HapticObserver/main.cpp @@ -22,13 +22,13 @@ * GNU General Public License */ -#include "HapticObserverApp.h" +#include <RobotAPI/components/units/HapticObserver.h> + +#include <ArmarXCore/core/application/Application.h> +#include <ArmarXCore/core/Component.h> #include <ArmarXCore/core/logging/Logging.h> int main(int argc, char* argv[]) { - armarx::ApplicationPtr app = armarx::Application::createInstance < armarx::HapticObserverApp > (); - app->setName("HapticObserver"); - - return app->main(argc, argv); + return armarx::runSimpleComponentApp<armarx::HapticObserver>(argc, argv, "HapticObserver"); } diff --git a/source/RobotAPI/applications/HeadIKUnit/CMakeLists.txt b/source/RobotAPI/applications/HeadIKUnit/CMakeLists.txt index 8967cc898..505fd541c 100644 --- a/source/RobotAPI/applications/HeadIKUnit/CMakeLists.txt +++ b/source/RobotAPI/applications/HeadIKUnit/CMakeLists.txt @@ -17,6 +17,6 @@ include_directories(${Simox_INCLUDE_DIRS}) set(COMPONENT_LIBS RobotAPIUnits) -set(SOURCES main.cpp HeadIKUnitApp.h) +set(SOURCES main.cpp) armarx_add_component_executable("${SOURCES}") diff --git a/source/RobotAPI/applications/HeadIKUnit/HeadIKUnitApp.h b/source/RobotAPI/applications/HeadIKUnit/HeadIKUnitApp.h deleted file mode 100644 index 2523758b7..000000000 --- a/source/RobotAPI/applications/HeadIKUnit/HeadIKUnitApp.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is part of ArmarX. - * - * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved. - * - * 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 ArmarXCore::applications - * @author David Schiebener (schiebener at kit dot edu) - * @date 2014 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - - -#include <ArmarXCore/core/application/Application.h> -#include <RobotAPI/components/units/HeadIKUnit.h> - -namespace armarx -{ - class HeadIKUnitApp : - virtual public armarx::Application - { - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties) - { - registry->addObject(Component::create<HeadIKUnit>(properties)); - } - }; -} - - - diff --git a/source/RobotAPI/applications/HeadIKUnit/main.cpp b/source/RobotAPI/applications/HeadIKUnit/main.cpp index 32c2146ef..83eadc25c 100644 --- a/source/RobotAPI/applications/HeadIKUnit/main.cpp +++ b/source/RobotAPI/applications/HeadIKUnit/main.cpp @@ -22,12 +22,13 @@ * GNU General Public License */ -#include "HeadIKUnitApp.h" +#include <RobotAPI/components/units/HeadIKUnit.h> + +#include <ArmarXCore/core/application/Application.h> +#include <ArmarXCore/core/Component.h> +#include <ArmarXCore/core/logging/Logging.h> int main(int argc, char* argv[]) { - armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::HeadIKUnitApp>(); - app->setName("HeadIKUnit"); - - return app->main(argc, argv); + return armarx::runSimpleComponentApp<armarx::HeadIKUnit>(argc, argv, "HeadIKUnit"); } diff --git a/source/RobotAPI/applications/InertialMeasurementUnitObserver/CMakeLists.txt b/source/RobotAPI/applications/InertialMeasurementUnitObserver/CMakeLists.txt index e280918bc..c481299f8 100644 --- a/source/RobotAPI/applications/InertialMeasurementUnitObserver/CMakeLists.txt +++ b/source/RobotAPI/applications/InertialMeasurementUnitObserver/CMakeLists.txt @@ -11,6 +11,6 @@ armarx_component_set_name("InertialMeasurementUnitObserverApp") set(COMPONENT_LIBS ArmarXCoreInterfaces ArmarXCore ArmarXCoreObservers RobotAPIUnits) -set(EXE_SOURCE InertialMeasurementUnitObserverApp.h main.cpp) +set(EXE_SOURCE main.cpp) armarx_add_component_executable("${EXE_SOURCE}") diff --git a/source/RobotAPI/applications/InertialMeasurementUnitObserver/InertialMeasurementUnitObserverApp.h b/source/RobotAPI/applications/InertialMeasurementUnitObserver/InertialMeasurementUnitObserverApp.h deleted file mode 100644 index 4d6592913..000000000 --- a/source/RobotAPI/applications/InertialMeasurementUnitObserver/InertialMeasurementUnitObserverApp.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This file is part of ArmarX. - * - * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved. - * - * 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::application::InertialMeasurementUnitObserver - * @author Markus Grotz ( markus-grotz at web dot de ) - * @date 2015 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - -#ifndef _ARMARX_APPLICATION_RobotAPI_InertialMeasurementUnitObserver_H -#define _ARMARX_APPLICATION_RobotAPI_InertialMeasurementUnitObserver_H - - -#include <RobotAPI/components/units/InertialMeasurementUnitObserver.h> - -#include <ArmarXCore/core/application/Application.h> -#include <ArmarXCore/core/Component.h> - - -namespace armarx -{ - /** - * @class InertialMeasurementUnitObserverApp - * @brief A brief description - * - * Detailed Description - */ - class InertialMeasurementUnitObserverApp : - virtual public armarx::Application - { - /** - * @see armarx::Application::setup() - */ - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, - Ice::PropertiesPtr properties) - { - registry->addObject(Component::create<InertialMeasurementUnitObserver>(properties)); - } - }; -} - -#endif diff --git a/source/RobotAPI/applications/InertialMeasurementUnitObserver/main.cpp b/source/RobotAPI/applications/InertialMeasurementUnitObserver/main.cpp index 3c787c737..593baa1d1 100644 --- a/source/RobotAPI/applications/InertialMeasurementUnitObserver/main.cpp +++ b/source/RobotAPI/applications/InertialMeasurementUnitObserver/main.cpp @@ -22,13 +22,13 @@ * GNU General Public License */ -#include "InertialMeasurementUnitObserverApp.h" +#include <RobotAPI/components/units/InertialMeasurementUnitObserver.h> + +#include <ArmarXCore/core/application/Application.h> +#include <ArmarXCore/core/Component.h> #include <ArmarXCore/core/logging/Logging.h> int main(int argc, char* argv[]) { - armarx::ApplicationPtr app = armarx::Application::createInstance < armarx::InertialMeasurementUnitObserverApp > (); - app->setName("InertialMeasurementUnitObserver"); - - return app->main(argc, argv); + return armarx::runSimpleComponentApp<armarx::InertialMeasurementUnitObserver>(argc, argv, "InertialMeasurementUnitObserver"); } diff --git a/source/RobotAPI/applications/KinematicUnitObserver/CMakeLists.txt b/source/RobotAPI/applications/KinematicUnitObserver/CMakeLists.txt index cea242b91..940574be8 100644 --- a/source/RobotAPI/applications/KinematicUnitObserver/CMakeLists.txt +++ b/source/RobotAPI/applications/KinematicUnitObserver/CMakeLists.txt @@ -4,6 +4,6 @@ armarx_component_set_name(KinematicUnitObserver) set(COMPONENT_LIBS RobotAPIUnits) -set(SOURCES main.cpp KinematicUnitObserverApp.h) +set(SOURCES main.cpp) armarx_add_component_executable("${SOURCES}") diff --git a/source/RobotAPI/applications/KinematicUnitObserver/KinematicUnitObserverApp.h b/source/RobotAPI/applications/KinematicUnitObserver/KinematicUnitObserverApp.h deleted file mode 100644 index d03ca16f2..000000000 --- a/source/RobotAPI/applications/KinematicUnitObserver/KinematicUnitObserverApp.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of ArmarX. - * - * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved. - * - * 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 ArmarXCore::applications - * @author Christian Boege (boege dot at kit dot edu) - * @date 2011 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - - -#include <ArmarXCore/core/application/Application.h> -#include <RobotAPI/components/units/KinematicUnitObserver.h> - -namespace armarx -{ - /** - * Application for testing the armarx::KinematicUnitObserver - */ - class KinematicUnitObserverApp : - virtual public armarx::Application - { - /** - * @see armarx::Application::setup() - */ - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties) - { - registry->addObject(Component::create<KinematicUnitObserver>(properties)); - } - }; -} diff --git a/source/RobotAPI/applications/KinematicUnitObserver/main.cpp b/source/RobotAPI/applications/KinematicUnitObserver/main.cpp index 9b33770f2..213d65125 100644 --- a/source/RobotAPI/applications/KinematicUnitObserver/main.cpp +++ b/source/RobotAPI/applications/KinematicUnitObserver/main.cpp @@ -22,13 +22,13 @@ * GNU General Public License */ -#include "KinematicUnitObserverApp.h" +#include <RobotAPI/components/units/KinematicUnitObserver.h> + +#include <ArmarXCore/core/application/Application.h> +#include <ArmarXCore/core/Component.h> #include <ArmarXCore/core/logging/Logging.h> int main(int argc, char* argv[]) { - armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::KinematicUnitObserverApp>(); - app->setName("KinematicUnitObserver"); - - return app->main(argc, argv); + return armarx::runSimpleComponentApp<armarx::KinematicUnitObserver>(argc, argv, "KinematicUnitObserver"); } diff --git a/source/RobotAPI/applications/KinematicUnitSimulation/CMakeLists.txt b/source/RobotAPI/applications/KinematicUnitSimulation/CMakeLists.txt index 48b4f0903..823267b1f 100644 --- a/source/RobotAPI/applications/KinematicUnitSimulation/CMakeLists.txt +++ b/source/RobotAPI/applications/KinematicUnitSimulation/CMakeLists.txt @@ -16,6 +16,6 @@ include_directories(${Simox_INCLUDE_DIRS}) set(COMPONENT_LIBS RobotAPIUnits) -set(SOURCES main.cpp KinematicUnitSimulationApp.h) +set(SOURCES main.cpp) armarx_add_component_executable("${SOURCES}") diff --git a/source/RobotAPI/applications/KinematicUnitSimulation/KinematicUnitSimulationApp.h b/source/RobotAPI/applications/KinematicUnitSimulation/KinematicUnitSimulationApp.h deleted file mode 100644 index 6782b1c1a..000000000 --- a/source/RobotAPI/applications/KinematicUnitSimulation/KinematicUnitSimulationApp.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of ArmarX. - * - * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved. - * - * 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 ArmarXCore::applications - * @author Christian Boege (boege at kit dot edu) - * @date 2011 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - - -#include <ArmarXCore/core/application/Application.h> -#include <RobotAPI/components/units/KinematicUnitSimulation.h> - -namespace armarx -{ - /** - * Application for testing the armarx::KinematicUnitSimulation - */ - class KinematicUnitSimulationApp : - virtual public armarx::Application - { - /** - * @see armarx::Application::setup() - */ - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties) - { - registry->addObject(Component::create<KinematicUnitSimulation>(properties)); - } - }; -} diff --git a/source/RobotAPI/applications/KinematicUnitSimulation/main.cpp b/source/RobotAPI/applications/KinematicUnitSimulation/main.cpp index fcad3cb74..766a0c8a0 100644 --- a/source/RobotAPI/applications/KinematicUnitSimulation/main.cpp +++ b/source/RobotAPI/applications/KinematicUnitSimulation/main.cpp @@ -22,13 +22,13 @@ * GNU General Public License */ -#include "KinematicUnitSimulationApp.h" +#include <RobotAPI/components/units/KinematicUnitSimulation.h> + +#include <ArmarXCore/core/application/Application.h> +#include <ArmarXCore/core/Component.h> #include <ArmarXCore/core/logging/Logging.h> int main(int argc, char* argv[]) { - armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::KinematicUnitSimulationApp>(); - app->setName("KinematicUnitSimulation"); - - return app->main(argc, argv); + return armarx::runSimpleComponentApp<armarx::KinematicUnitSimulation>(argc, argv, "KinematicUnitSimulation"); } diff --git a/source/RobotAPI/applications/PlatformUnitObserver/CMakeLists.txt b/source/RobotAPI/applications/PlatformUnitObserver/CMakeLists.txt index 83e6e45a9..c9deac457 100644 --- a/source/RobotAPI/applications/PlatformUnitObserver/CMakeLists.txt +++ b/source/RobotAPI/applications/PlatformUnitObserver/CMakeLists.txt @@ -3,6 +3,6 @@ armarx_component_set_name(PlatformUnitObserver) set(COMPONENT_LIBS RobotAPIUnits) -set(SOURCES main.cpp PlatformUnitObserverApp.h) +set(SOURCES main.cpp) armarx_add_component_executable("${SOURCES}") diff --git a/source/RobotAPI/applications/PlatformUnitObserver/PlatformUnitObserverApp.h b/source/RobotAPI/applications/PlatformUnitObserver/PlatformUnitObserverApp.h deleted file mode 100644 index 79d661035..000000000 --- a/source/RobotAPI/applications/PlatformUnitObserver/PlatformUnitObserverApp.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of ArmarX. - * - * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved. - * - * 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 ArmarXCore::applications - * @author Manfred Kroehnert (manfred dot kroehnert at kit dot edu) - * @date 2013 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - - -#include <ArmarXCore/core/application/Application.h> -#include <RobotAPI/components/units/PlatformUnitObserver.h> - -namespace armarx -{ - /** - * Application for executing armarx::PlatformUnitObserver - */ - class PlatformUnitObserverApp : - public armarx::Application - { - /** - * @see armarx::Application::setup() - */ - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties) - { - registry->addObject(Component::create<PlatformUnitObserver>(properties)); - } - }; -} diff --git a/source/RobotAPI/applications/PlatformUnitObserver/main.cpp b/source/RobotAPI/applications/PlatformUnitObserver/main.cpp index fde58a4a7..71e4411dd 100644 --- a/source/RobotAPI/applications/PlatformUnitObserver/main.cpp +++ b/source/RobotAPI/applications/PlatformUnitObserver/main.cpp @@ -22,13 +22,13 @@ * GNU General Public License */ -#include "PlatformUnitObserverApp.h" +#include <RobotAPI/components/units/PlatformUnitObserver.h> + +#include <ArmarXCore/core/application/Application.h> +#include <ArmarXCore/core/Component.h> #include <ArmarXCore/core/logging/Logging.h> int main(int argc, char* argv[]) { - armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::PlatformUnitObserverApp>(); - app->setName("PlatformUnitObserver"); - - return app->main(argc, argv); + return armarx::runSimpleComponentApp<armarx::PlatformUnitObserver>(argc, argv, "PlatformUnitObserver"); } diff --git a/source/RobotAPI/applications/PlatformUnitSimulation/CMakeLists.txt b/source/RobotAPI/applications/PlatformUnitSimulation/CMakeLists.txt index 40e5ea07c..a6eae5afe 100644 --- a/source/RobotAPI/applications/PlatformUnitSimulation/CMakeLists.txt +++ b/source/RobotAPI/applications/PlatformUnitSimulation/CMakeLists.txt @@ -3,6 +3,6 @@ armarx_component_set_name(PlatformUnitSimulation) set(COMPONENT_LIBS RobotAPIUnits) -set(SOURCES main.cpp PlatformUnitSimulationApp.h) +set(SOURCES main.cpp) armarx_add_component_executable("${SOURCES}") diff --git a/source/RobotAPI/applications/PlatformUnitSimulation/PlatformUnitSimulationApp.h b/source/RobotAPI/applications/PlatformUnitSimulation/PlatformUnitSimulationApp.h deleted file mode 100644 index c29fb3870..000000000 --- a/source/RobotAPI/applications/PlatformUnitSimulation/PlatformUnitSimulationApp.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of ArmarX. - * - * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved. - * - * 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 ArmarXCore::applications - * @author tobias haass - * @date 2013 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - - -#include <ArmarXCore/core/application/Application.h> -#include <RobotAPI/components/units/PlatformUnitSimulation.h> - -namespace armarx -{ - /** - * Application for testing the armarx::PlatformUnitSimulation - */ - class PlatformUnitSimulationApp : - virtual public armarx::Application - { - /** - * @see armarx::Application::setup() - */ - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties) - { - registry->addObject(Component::create<PlatformUnitSimulation>(properties)); - } - }; -} diff --git a/source/RobotAPI/applications/PlatformUnitSimulation/main.cpp b/source/RobotAPI/applications/PlatformUnitSimulation/main.cpp index 98b8790a5..bca561916 100644 --- a/source/RobotAPI/applications/PlatformUnitSimulation/main.cpp +++ b/source/RobotAPI/applications/PlatformUnitSimulation/main.cpp @@ -22,13 +22,13 @@ * GNU General Public License */ -#include "PlatformUnitSimulationApp.h" +#include <RobotAPI/components/units/PlatformUnitSimulation.h> + +#include <ArmarXCore/core/application/Application.h> +#include <ArmarXCore/core/Component.h> #include <ArmarXCore/core/logging/Logging.h> int main(int argc, char* argv[]) { - armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::PlatformUnitSimulationApp>(); - app->setName("PlatformUnitSimulation"); - - return app->main(argc, argv); + return armarx::runSimpleComponentApp<armarx::PlatformUnitSimulation>(argc, argv, "PlatformUnitSimulation"); } diff --git a/source/RobotAPI/applications/RobotControl/CMakeLists.txt b/source/RobotAPI/applications/RobotControl/CMakeLists.txt index 2159a85ac..798af63ac 100644 --- a/source/RobotAPI/applications/RobotControl/CMakeLists.txt +++ b/source/RobotAPI/applications/RobotControl/CMakeLists.txt @@ -3,6 +3,6 @@ armarx_component_set_name(RobotControl) set(COMPONENT_LIBS RobotAPIOperations) -set(SOURCES main.cpp RobotControlApp.h) +set(SOURCES main.cpp) armarx_add_component_executable("${SOURCES}") diff --git a/source/RobotAPI/applications/RobotControl/RobotControlApp.h b/source/RobotAPI/applications/RobotControl/RobotControlApp.h deleted file mode 100644 index a78f5af33..000000000 --- a/source/RobotAPI/applications/RobotControl/RobotControlApp.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of ArmarX. - * - * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved. - * - * 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 ArmarXCore::applications - * @author Kai Welke (weöle dot at kit dot edu) - * @date 2012 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - - -#include <ArmarXCore/core/application/Application.h> -#include <RobotAPI/statecharts/operations/RobotControl.h> - -namespace armarx -{ - /** - * Application for testing armarx::RobotControl - */ - class RobotControlApp : - virtual public armarx::Application - { - /** - * @see armarx::Application::setup() - */ - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties) - { - registry->addObject(Component::create<RobotControl>(properties)); - } - }; -} diff --git a/source/RobotAPI/applications/RobotControl/main.cpp b/source/RobotAPI/applications/RobotControl/main.cpp index 96a9c733b..720e6420b 100644 --- a/source/RobotAPI/applications/RobotControl/main.cpp +++ b/source/RobotAPI/applications/RobotControl/main.cpp @@ -22,13 +22,13 @@ * GNU General Public License */ -#include "RobotControlApp.h" +#include <RobotAPI/statecharts/operations/RobotControl.h> + +#include <ArmarXCore/core/application/Application.h> +#include <ArmarXCore/core/Component.h> #include <ArmarXCore/core/logging/Logging.h> int main(int argc, char* argv[]) { - armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::RobotControlApp>(); - app->setName("RobotControl"); - - return app->main(argc, argv); + return armarx::runSimpleComponentApp<armarx::RobotControl>(argc, argv, "RobotControl"); } diff --git a/source/RobotAPI/applications/RobotControlUI/CMakeLists.txt b/source/RobotAPI/applications/RobotControlUI/CMakeLists.txt index 2a8fbed83..8fe3ebb2c 100644 --- a/source/RobotAPI/applications/RobotControlUI/CMakeLists.txt +++ b/source/RobotAPI/applications/RobotControlUI/CMakeLists.txt @@ -6,7 +6,6 @@ set(COMPONENT_LIBS RobotAPIOperations) set(SOURCES main.cpp RobotControlUI.cpp RobotControlUI.h - RobotControlUIApp.h ) armarx_add_component_executable("${SOURCES}") diff --git a/source/RobotAPI/applications/RobotControlUI/RobotControlUIApp.h b/source/RobotAPI/applications/RobotControlUI/RobotControlUIApp.h deleted file mode 100644 index 092fb8f29..000000000 --- a/source/RobotAPI/applications/RobotControlUI/RobotControlUIApp.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of ArmarX. - * - * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved. - * - * 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 ArmarXCore::applications - * @author Kai Welke (weöle dot at kit dot edu) - * @date 2012 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - - -#include <ArmarXCore/core/application/Application.h> -#include "RobotControlUI.h" - -namespace armarx -{ - /** - * Application for testing armarx::RobotControlUI - */ - class RobotControlUIApp : - virtual public armarx::Application - { - /** - * @see armarx::Application::setup() - */ - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties) - { - registry->addObject(Component::create<RobotControlUI>(properties)); - } - }; -} diff --git a/source/RobotAPI/applications/RobotControlUI/main.cpp b/source/RobotAPI/applications/RobotControlUI/main.cpp index 4723b0d03..df21ab13f 100644 --- a/source/RobotAPI/applications/RobotControlUI/main.cpp +++ b/source/RobotAPI/applications/RobotControlUI/main.cpp @@ -22,13 +22,13 @@ * GNU General Public License */ -#include "RobotControlUIApp.h" +#include "RobotControlUI.h" + +#include <ArmarXCore/core/application/Application.h> +#include <ArmarXCore/core/Component.h> #include <ArmarXCore/core/logging/Logging.h> int main(int argc, char* argv[]) { - armarx::ApplicationPtr app = armarx::Application::createInstance<armarx::RobotControlUIApp>(); - app->setName("RobotControlUI"); - - return app->main(argc, argv); + return armarx::runSimpleComponentApp<armarx::RobotControlUI>(argc, argv, "RobotControlUI"); } diff --git a/source/RobotAPI/applications/XsensIMU/CMakeLists.txt b/source/RobotAPI/applications/XsensIMU/CMakeLists.txt index 68a3af2b1..20bf9c0df 100644 --- a/source/RobotAPI/applications/XsensIMU/CMakeLists.txt +++ b/source/RobotAPI/applications/XsensIMU/CMakeLists.txt @@ -11,6 +11,6 @@ armarx_component_set_name("XsensIMUApp") set(COMPONENT_LIBS ArmarXCoreInterfaces ArmarXCore XsensIMU) -set(EXE_SOURCE XsensIMUApp.h main.cpp) +set(EXE_SOURCE main.cpp) armarx_add_component_executable("${EXE_SOURCE}") diff --git a/source/RobotAPI/applications/XsensIMU/XsensIMUApp.h b/source/RobotAPI/applications/XsensIMU/XsensIMUApp.h deleted file mode 100644 index 0b698786f..000000000 --- a/source/RobotAPI/applications/XsensIMU/XsensIMUApp.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This file is part of ArmarX. - * - * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved. - * - * 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::application::XsensIMU - * @author Markus Grotz ( markus-grotz at web dot de ) - * @date 2015 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - -#ifndef _ARMARX_APPLICATION_RobotAPI_XsensIMU_H -#define _ARMARX_APPLICATION_RobotAPI_XsensIMU_H - - -#include <RobotAPI/drivers/XsensIMU/XsensIMU.h> - -#include <ArmarXCore/core/application/Application.h> -#include <ArmarXCore/core/Component.h> - - -namespace armarx -{ - /** - * @class XsensIMUApp - * @brief A brief description - * - * Detailed Description - */ - class XsensIMUApp : - virtual public armarx::Application - { - /** - * @see armarx::Application::setup() - */ - void setup(const ManagedIceObjectRegistryInterfacePtr& registry, - Ice::PropertiesPtr properties) - { - registry->addObject(Component::create<XsensIMU>(properties)); - } - }; -} - -#endif diff --git a/source/RobotAPI/applications/XsensIMU/main.cpp b/source/RobotAPI/applications/XsensIMU/main.cpp index 4ecdb27a5..2b5d6083b 100644 --- a/source/RobotAPI/applications/XsensIMU/main.cpp +++ b/source/RobotAPI/applications/XsensIMU/main.cpp @@ -22,13 +22,13 @@ * GNU General Public License */ -#include "XsensIMUApp.h" +#include <RobotAPI/drivers/XsensIMU/XsensIMU.h> + +#include <ArmarXCore/core/application/Application.h> +#include <ArmarXCore/core/Component.h> #include <ArmarXCore/core/logging/Logging.h> int main(int argc, char* argv[]) { - armarx::ApplicationPtr app = armarx::Application::createInstance < armarx::XsensIMUApp > (); - app->setName("XsensIMU"); - - return app->main(argc, argv); + return armarx::runSimpleComponentApp<armarx::XsensIMU>(argc, argv, "XsensIMU"); } -- GitLab