Skip to content
Snippets Groups Projects
Commit 1d6a8b2c authored by Manfred Kröhnert's avatar Manfred Kröhnert
Browse files

Merge branch 'UsingBasicIceSeq' into 'master'

replaced user defined sequences of basic types with ice sequence types

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

See merge request !12
parents d49c8f8e 60003c67
No related branches found
No related tags found
No related merge requests found
Showing
with 44 additions and 44 deletions
......@@ -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)
{
......
......@@ -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());
......
......@@ -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);
}
......
......@@ -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());
......
......@@ -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,
......
......@@ -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);
......
......@@ -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());
......
......@@ -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,
......
......@@ -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,
......
......@@ -59,7 +59,7 @@ module armarx
{
string name;
FloatSequence map;
Ice::FloatSeq map;
TimestampBase validUntil;
......
......@@ -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
......
......@@ -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.
......
......@@ -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.
......
......@@ -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.
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment