33 std::size_t pos = defaultStartUp.find(
":");
34 std::string message =
"";
36 if (pos != std::string::npos)
38 message = defaultStartUp.substr(0, pos);
39 i = std::stoi(defaultStartUp.substr(pos + 1));
41 this->currentSeverity =
static_cast<severity::SeverityEnum
>(i);
42 this->currentState = message;
44 std::vector<std::pair<std::string, int>> result;
45 std::vector<std::string> pairs;
47 boost::split(pairs, this->defaultStateValues, boost::is_any_of(
";"));
49 for (
auto& pair : pairs)
51 std::vector<std::string> keyValue;
52 boost::split(keyValue, pair, boost::is_any_of(
":"));
54 if (keyValue.size() == 2)
56 boost::trim(keyValue[0]);
57 boost::trim(keyValue[1]);
60 StateAndSeverity newState{
62 .severity =
static_cast<severity::SeverityEnum
>(std::stoi(keyValue[1]))};
63 this->allStates.push_back(newState);
65 catch (
const std::exception& e)
124 armarx::severity::SeverityEnum severity,
127 StateAndSeverity delState{.state = state, .severity = severity};
130 std::find_if(allStates.begin(),
132 [&](
const StateAndSeverity& s)
133 { return s.state == delState.state && s.severity == delState.severity; });
135 if (it != allStates.end())