From 60003c67ff1264a2de9d0a5128687106eecb463b Mon Sep 17 00:00:00 2001 From: Raphael Grimm <ufdrv@student.kit.edu> Date: Sun, 5 Jun 2016 18:51:05 +0200 Subject: [PATCH] replaced user defined sequences of basic types with sequence types provided by ice (if the user defined sequences did not offer any more syntax e.g. armarx::StringList was replaced with Ice::StringSeq a type like 'sequence<string> ObjectNames' offers more syntax and was not replaced --- .../DebugDrawer/DebugDrawerComponent.cpp | 4 ++-- .../components/DebugDrawer/DebugDrawerComponent.h | 2 +- source/RobotAPI/components/units/KinematicUnit.cpp | 8 ++++---- source/RobotAPI/components/units/KinematicUnit.h | 4 ++-- .../components/units/KinematicUnitObserver.cpp | 4 ++-- .../components/units/KinematicUnitSimulation.cpp | 4 ++-- .../components/units/KinematicUnitSimulation.h | 4 ++-- .../KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp | 12 ++++++------ .../RobotViewerPlugin/RobotViewerGuiPlugin.cpp | 14 +++++++------- .../components/ViewSelectionInterface.ice | 2 +- source/RobotAPI/interface/core/RobotState.ice | 2 +- .../interface/units/InertialMeasurementUnit.ice | 8 ++++---- .../interface/units/KinematicUnitInterface.ice | 8 ++++---- .../visualization/DebugDrawerInterface.ice | 2 +- .../libraries/core/remoterobot/RemoteRobot.cpp | 10 +++++----- 15 files changed, 44 insertions(+), 44 deletions(-) diff --git a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp index 270193c79..1acd95e33 100644 --- a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp +++ b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp @@ -2257,10 +2257,10 @@ namespace armarx enableLayerVisu(DEBUG_LAYER_NAME, visible); } - StringSequence DebugDrawerComponent::layerNames(const ::Ice::Current&) + Ice::StringSeq DebugDrawerComponent::layerNames(const ::Ice::Current&) { ScopedRecursiveLockPtr l = getScopedVisuLock(); - StringSequence seq {}; + Ice::StringSeq seq {}; for (const auto & layer : layers) { diff --git a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.h b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.h index bef471367..52706905d 100644 --- a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.h +++ b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.h @@ -245,7 +245,7 @@ namespace armarx virtual void enableLayerVisu(const std::string& layerName, bool visible, const ::Ice::Current& = ::Ice::Current()); virtual void enableDebugLayerVisu(bool visible, const ::Ice::Current& = ::Ice::Current()); - virtual ::armarx::StringSequence layerNames(const ::Ice::Current& = ::Ice::Current()); + virtual ::Ice::StringSeq layerNames(const ::Ice::Current& = ::Ice::Current()); virtual ::armarx::LayerInformationSequence layerInformation(const ::Ice::Current& = ::Ice::Current()); virtual void disableAllLayers(const ::Ice::Current& = ::Ice::Current()); diff --git a/source/RobotAPI/components/units/KinematicUnit.cpp b/source/RobotAPI/components/units/KinematicUnit.cpp index 0421e5448..842a4ea8d 100644 --- a/source/RobotAPI/components/units/KinematicUnit.cpp +++ b/source/RobotAPI/components/units/KinematicUnit.cpp @@ -47,12 +47,12 @@ void KinematicUnit::onInitComponent() robotNodeSetName = getProperty<std::string>("RobotNodeSetName").getValue(); std::string project = getProperty<std::string>("RobotFileNameProject").getValue(); - StringList includePaths; + Ice::StringSeq includePaths; if (!project.empty()) { CMakePackageFinder finder(project); - StringList projectIncludePaths; + Ice::StringSeq projectIncludePaths; auto pathsString = finder.getDataDir(); boost::split(projectIncludePaths, pathsString, @@ -119,12 +119,12 @@ void KinematicUnit::setJointVelocities(const NameValueMap& targetJointVelocities { } -void KinematicUnit::requestKinematicUnit(const StringSequence& nodes, const Ice::Current& c) +void KinematicUnit::requestKinematicUnit(const Ice::StringSeq& nodes, const Ice::Current& c) { SensorActorUnit::request(c); } -void KinematicUnit::releaseKinematicUnit(const StringSequence& nodes, const Ice::Current& c) +void KinematicUnit::releaseKinematicUnit(const Ice::StringSeq& nodes, const Ice::Current& c) { SensorActorUnit::release(c); } diff --git a/source/RobotAPI/components/units/KinematicUnit.h b/source/RobotAPI/components/units/KinematicUnit.h index b3ea7aa86..4c5cf7ddd 100644 --- a/source/RobotAPI/components/units/KinematicUnit.h +++ b/source/RobotAPI/components/units/KinematicUnit.h @@ -120,8 +120,8 @@ namespace armarx virtual void onExitKinematicUnit() = 0; // proxy implementation - virtual void requestKinematicUnit(const StringSequence& nodes, const Ice::Current& c = ::Ice::Current()); - virtual void releaseKinematicUnit(const StringSequence& nodes, const Ice::Current& c = ::Ice::Current()); + virtual void requestKinematicUnit(const Ice::StringSeq& nodes, const Ice::Current& c = ::Ice::Current()); + virtual void releaseKinematicUnit(const Ice::StringSeq& nodes, const Ice::Current& c = ::Ice::Current()); virtual void switchControlMode(const NameControlModeMap& targetJointModes, const Ice::Current& c = ::Ice::Current()); virtual void setJointAngles(const NameValueMap& targetJointAngles, const Ice::Current& c = ::Ice::Current()); virtual void setJointVelocities(const NameValueMap& targetJointVelocities, const Ice::Current& c = ::Ice::Current()); diff --git a/source/RobotAPI/components/units/KinematicUnitObserver.cpp b/source/RobotAPI/components/units/KinematicUnitObserver.cpp index 345e3efc6..f387672b1 100644 --- a/source/RobotAPI/components/units/KinematicUnitObserver.cpp +++ b/source/RobotAPI/components/units/KinematicUnitObserver.cpp @@ -65,12 +65,12 @@ void KinematicUnitObserver::onConnectObserver() // the kinematic chain elements belonging to this unit are defined in a RobotNodeSet std::string robotFile = getProperty<std::string>("RobotFileName").getValue(); std::string project = getProperty<std::string>("RobotFileNameProject").getValue(); - StringList includePaths; + Ice::StringSeq includePaths; if (!project.empty()) { CMakePackageFinder finder(project); - StringList projectIncludePaths; + Ice::StringSeq projectIncludePaths; auto pathsString = finder.getDataDir(); boost::split(projectIncludePaths, pathsString, diff --git a/source/RobotAPI/components/units/KinematicUnitSimulation.cpp b/source/RobotAPI/components/units/KinematicUnitSimulation.cpp index 978fedcf5..207b95728 100644 --- a/source/RobotAPI/components/units/KinematicUnitSimulation.cpp +++ b/source/RobotAPI/components/units/KinematicUnitSimulation.cpp @@ -422,7 +422,7 @@ bool mapEntryEqualsString(std::pair<std::string, KinematicUnitSimulationJointSta return (iter.first == compareString); } -void KinematicUnitSimulation::requestJoints(const StringSequence& joints, const Ice::Current& c) +void KinematicUnitSimulation::requestJoints(const Ice::StringSeq& joints, const Ice::Current& c) { // if one of the joints belongs to this unit, lock access to this unit for other components except for the requesting one KinematicUnitSimulationJointStates::const_iterator it = std::find_first_of(jointStates.begin(), jointStates.end(), joints.begin(), joints.end(), mapEntryEqualsString); @@ -433,7 +433,7 @@ void KinematicUnitSimulation::requestJoints(const StringSequence& joints, const } } -void KinematicUnitSimulation::releaseJoints(const StringSequence& joints, const Ice::Current& c) +void KinematicUnitSimulation::releaseJoints(const Ice::StringSeq& joints, const Ice::Current& c) { // if one of the joints belongs to this unit, unlock access KinematicUnitSimulationJointStates::const_iterator it = std::find_first_of(jointStates.begin(), jointStates.end(), joints.begin(), joints.end(), mapEntryEqualsString); diff --git a/source/RobotAPI/components/units/KinematicUnitSimulation.h b/source/RobotAPI/components/units/KinematicUnitSimulation.h index 87cea5bde..e720ada33 100644 --- a/source/RobotAPI/components/units/KinematicUnitSimulation.h +++ b/source/RobotAPI/components/units/KinematicUnitSimulation.h @@ -147,8 +147,8 @@ namespace armarx void simulationFunction(); // proxy implementation - virtual void requestJoints(const StringSequence& joints, const Ice::Current& c = ::Ice::Current()); - virtual void releaseJoints(const StringSequence& joints, const Ice::Current& c = ::Ice::Current()); + virtual void requestJoints(const Ice::StringSeq& joints, const Ice::Current& c = ::Ice::Current()); + virtual void releaseJoints(const Ice::StringSeq& joints, const Ice::Current& c = ::Ice::Current()); virtual void switchControlMode(const NameControlModeMap& targetJointModes, const Ice::Current& c = ::Ice::Current()); virtual void setJointAngles(const NameValueMap& targetJointAngles, const Ice::Current& c = ::Ice::Current()); virtual void setJointVelocities(const NameValueMap& targetJointVelocities, const Ice::Current& c = ::Ice::Current()); diff --git a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp index e191ec355..9dade3b58 100644 --- a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp +++ b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp @@ -15,9 +15,9 @@ * 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 - * @author - * @date + * @package + * @author + * @date * @copyright http://www.gnu.org/licenses/gpl-2.0.txt * GNU General Public License */ @@ -145,13 +145,13 @@ void KinematicUnitWidgetController::onConnectComponent() robot.reset(); std::string rfile; - StringList includePaths; + Ice::StringSeq includePaths; // get robot filename try { - StringList packages = kinematicUnitInterfacePrx->getArmarXPackages(); + Ice::StringSeq packages = kinematicUnitInterfacePrx->getArmarXPackages(); packages.push_back(Application::GetProjectName()); ARMARX_VERBOSE << "ArmarX packages " << packages; @@ -163,7 +163,7 @@ void KinematicUnitWidgetController::onConnectComponent() } CMakePackageFinder project(projectName); - StringList projectIncludePaths; + Ice::StringSeq projectIncludePaths; auto pathsString = project.getDataDir(); ARMARX_VERBOSE << "Data paths of ArmarX package " << projectName << ": " << pathsString; boost::split(projectIncludePaths, diff --git a/source/RobotAPI/gui-plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp b/source/RobotAPI/gui-plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp index 3bffe4d3b..3f8897170 100644 --- a/source/RobotAPI/gui-plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp +++ b/source/RobotAPI/gui-plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp @@ -15,9 +15,9 @@ * 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 - * @author - * @date + * @package + * @author + * @date * @copyright http://www.gnu.org/licenses/gpl-2.0.txt * GNU General Public License */ @@ -143,17 +143,17 @@ void RobotViewerWidgetController::onConnectComponent() robot.reset(); std::string rfile; - StringList includePaths; + Ice::StringSeq includePaths; // get robot filename try { - StringList packages = robotStateComponentPrx->getArmarXPackages(); + Ice::StringSeq packages = robotStateComponentPrx->getArmarXPackages(); packages.push_back(Application::GetProjectName()); ARMARX_VERBOSE << "ArmarX packages " << packages; - for (const std::string& projectName : packages) + for (const std::string & projectName : packages) { if (projectName.empty()) { @@ -161,7 +161,7 @@ void RobotViewerWidgetController::onConnectComponent() } CMakePackageFinder project(projectName); - StringList projectIncludePaths; + Ice::StringSeq projectIncludePaths; auto pathsString = project.getDataDir(); ARMARX_VERBOSE << "Data paths of ArmarX package " << projectName << ": " << pathsString; boost::split(projectIncludePaths, diff --git a/source/RobotAPI/interface/components/ViewSelectionInterface.ice b/source/RobotAPI/interface/components/ViewSelectionInterface.ice index 52c991bd7..4d1c04ed4 100755 --- a/source/RobotAPI/interface/components/ViewSelectionInterface.ice +++ b/source/RobotAPI/interface/components/ViewSelectionInterface.ice @@ -59,7 +59,7 @@ module armarx { string name; - FloatSequence map; + Ice::FloatSeq map; TimestampBase validUntil; diff --git a/source/RobotAPI/interface/core/RobotState.ice b/source/RobotAPI/interface/core/RobotState.ice index 936fd47c8..50e5560ab 100644 --- a/source/RobotAPI/interface/core/RobotState.ice +++ b/source/RobotAPI/interface/core/RobotState.ice @@ -202,7 +202,7 @@ module armarx */ ["cpp:const"] idempotent - StringList getArmarXPackages(); + Ice::StringSeq getArmarXPackages(); /** * @return The name of the robot represented by this component. Same as diff --git a/source/RobotAPI/interface/units/InertialMeasurementUnit.ice b/source/RobotAPI/interface/units/InertialMeasurementUnit.ice index 7d0d16e85..08afce9d6 100644 --- a/source/RobotAPI/interface/units/InertialMeasurementUnit.ice +++ b/source/RobotAPI/interface/units/InertialMeasurementUnit.ice @@ -48,10 +48,10 @@ module armarx * @param acceleration Acceleration of IMU sensor device. **/ struct IMUData { - FloatSequence orientationQuaternion; - FloatSequence magneticRotation; - FloatSequence gyroscopeRotation; - FloatSequence acceleration; + Ice::FloatSeq orientationQuaternion; + Ice::FloatSeq magneticRotation; + Ice::FloatSeq gyroscopeRotation; + Ice::FloatSeq acceleration; }; /** * Implements an interface to an InertialMeasurementUnit. diff --git a/source/RobotAPI/interface/units/KinematicUnitInterface.ice b/source/RobotAPI/interface/units/KinematicUnitInterface.ice index 00951473e..eb6acb2d5 100644 --- a/source/RobotAPI/interface/units/KinematicUnitInterface.ice +++ b/source/RobotAPI/interface/units/KinematicUnitInterface.ice @@ -121,7 +121,7 @@ module armarx **/ exception KinematicUnitNotOwnedException extends ResourceNotOwnedException { - StringSequence nodes; + Ice::StringSeq nodes; }; /** * [NameValueMap] defined. This data container is mostly used to assign values to e.g. joints which are identified by name. @@ -147,11 +147,11 @@ module armarx * The request only affects the active access, sensor values can always be read. * */ - void requestJoints(StringSequence joints) throws KinematicUnitUnavailable; + void requestJoints(Ice::StringSeq joints) throws KinematicUnitUnavailable; /** * After usage joints should be released so that another component can get access to these joints. */ - void releaseJoints(StringSequence joints) throws KinematicUnitNotOwnedException; + void releaseJoints(Ice::StringSeq joints) throws KinematicUnitNotOwnedException; /** * @@ -190,7 +190,7 @@ module armarx */ ["cpp:const"] idempotent - StringList getArmarXPackages(); + Ice::StringSeq getArmarXPackages(); /** * @return The name of the robot used by this component. diff --git a/source/RobotAPI/interface/visualization/DebugDrawerInterface.ice b/source/RobotAPI/interface/visualization/DebugDrawerInterface.ice index 7322f721a..249663304 100644 --- a/source/RobotAPI/interface/visualization/DebugDrawerInterface.ice +++ b/source/RobotAPI/interface/visualization/DebugDrawerInterface.ice @@ -324,7 +324,7 @@ module armarx * \brief Returns the names of all layers. * \return The names of all layers. */ - StringSequence layerNames(); + Ice::StringSeq layerNames(); /*! * \brief Returns information about each layer. diff --git a/source/RobotAPI/libraries/core/remoterobot/RemoteRobot.cpp b/source/RobotAPI/libraries/core/remoterobot/RemoteRobot.cpp index b210594bb..26b6a7e48 100644 --- a/source/RobotAPI/libraries/core/remoterobot/RemoteRobot.cpp +++ b/source/RobotAPI/libraries/core/remoterobot/RemoteRobot.cpp @@ -15,9 +15,9 @@ * 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 - * @author - * @date + * @package + * @author + * @date * @copyright http://www.gnu.org/licenses/gpl-2.0.txt * GNU General Public License */ @@ -382,7 +382,7 @@ namespace armarx } else { - StringList includePaths; + Ice::StringSeq includePaths; for (const std::string & projectName : packages) { if (projectName.empty()) @@ -391,7 +391,7 @@ namespace armarx } CMakePackageFinder project(projectName); - StringList projectIncludePaths; + Ice::StringSeq projectIncludePaths; auto pathsString = project.getDataDir(); ARMARX_DEBUG_S << "Data paths of ArmarX package " << projectName << ": " << pathsString; boost::split(projectIncludePaths, -- GitLab