diff --git a/source/RobotAPI/components/ArViz/Introspection/exceptions.cpp b/source/RobotAPI/components/ArViz/Introspection/exceptions.cpp index 997a91d96884d3eae5ec949ec12b0fbd84474e42..9930695fa68f42ea28bb88385b29485f7d09906d 100644 --- a/source/RobotAPI/components/ArViz/Introspection/exceptions.cpp +++ b/source/RobotAPI/components/ArViz/Introspection/exceptions.cpp @@ -2,7 +2,7 @@ #include <sstream> -#include <boost/algorithm/string/join.hpp> +#include <SimoxUtility/algorithm/string.h> namespace armarx::viz::error @@ -12,7 +12,7 @@ namespace armarx::viz::error {} NoTypeNameEntryInJsonObject::NoTypeNameEntryInJsonObject( - const std::string& missingKey, const nlohmann::json& j) : + const std::string& missingKey, const nlohmann::json& j) : ArvizReflectionError(makeMsg(missingKey, j)) { } @@ -44,13 +44,13 @@ namespace armarx::viz::error TypeNameEntryAlreadyInJsonObject::TypeNameEntryAlreadyInJsonObject( - const std::string& key, const std::string& typeName, const nlohmann::json& j) : - ArvizReflectionError (makeMsg(key, typeName, j)) + const std::string& key, const std::string& typeName, const nlohmann::json& j) : + ArvizReflectionError(makeMsg(key, typeName, j)) { } std::string TypeNameEntryAlreadyInJsonObject::makeMsg( - const std::string& key, const std::string& typeName, const nlohmann::json& j) + const std::string& key, const std::string& typeName, const nlohmann::json& j) { std::stringstream ss; ss << "Key '" << key << "' already used in JSON object " @@ -79,18 +79,18 @@ namespace armarx::viz::error {} SerializerAlreadyRegisteredForType::SerializerAlreadyRegisteredForType( - const std::string& typeName, const std::vector<std::string>& acceptedTypes) : + const std::string& typeName, const std::vector<std::string>& acceptedTypes) : ArvizReflectionError(makeMsg(typeName, acceptedTypes)) {} std::string SerializerAlreadyRegisteredForType::makeMsg( - const std::string& typeName, const std::vector<std::string>& acceptedTypes) + const std::string& typeName, const std::vector<std::string>& acceptedTypes) { std::stringstream ss; ss << "There is already a registered serializer for type '" + typeName + "'."; if (!acceptedTypes.empty()) { - ss << "\nAccepted types:\n" + boost::join(acceptedTypes, "\n- "); + ss << "\nAccepted types:\n" + simox::alg::join(acceptedTypes, "\n- "); } return ss.str(); } diff --git a/source/RobotAPI/components/ArViz/Introspection/json_elements.cpp b/source/RobotAPI/components/ArViz/Introspection/json_elements.cpp index 14feae3fd2b3eaa0e1f62d02c26dea5dc67659c7..837e3903004375e41ba0268ea1712682604a151f 100644 --- a/source/RobotAPI/components/ArViz/Introspection/json_elements.cpp +++ b/source/RobotAPI/components/ArViz/Introspection/json_elements.cpp @@ -1,6 +1,6 @@ #include "json_elements.h" -#include <boost/algorithm/string.hpp> +#include <SimoxUtility/algorithm/string.h> #include <ArmarXCore/core/exceptions/local/ExpressionException.h> @@ -246,17 +246,16 @@ namespace armarx::viz flag_names.push_back(names.to_name(flag)); } } - return boost::join(flag_names, " | "); + return simox::alg::join(flag_names, " | "); } int from_flag_names(const std::string& flagString) { - std::vector<std::string> split; - boost::split(split, flagString, boost::is_any_of("|")); + bool trim_elements = true; + std::vector<std::string> split = simox::alg::split(flagString, "|", trim_elements); int flag = 0; for (auto& s : split) { - boost::algorithm::trim(s); flag |= names.from_name(s); } return flag; diff --git a/source/RobotAPI/gui-plugins/ArViz/LayerInfoTree.cpp b/source/RobotAPI/gui-plugins/ArViz/LayerInfoTree.cpp index 594a6e6e3b5e05aa46af0791b32c74b3e26337a5..aeecddbef7737399b08182c9e067f1ee8e01ebc8 100644 --- a/source/RobotAPI/gui-plugins/ArViz/LayerInfoTree.cpp +++ b/source/RobotAPI/gui-plugins/ArViz/LayerInfoTree.cpp @@ -3,7 +3,7 @@ #include <ArmarXCore/core/logging/Logging.h> #include <ArmarXCore/core/exceptions/local/ExpressionException.h> -#include <boost/algorithm/string/join.hpp> +#include <SimoxUtility/algorithm/string.h> #include <QCheckBox> #include <QDoubleSpinBox> @@ -385,7 +385,7 @@ namespace armarx keys.push_back(it.key()); } } - ss << "object [" << boost::join(keys, ", ") << "]"; + ss << "object [" << simox::alg::join(keys, ", ") << "]"; return QVariant(ss.str().c_str()); }