86 {
87
88
89 std::vector<std::string> thresholdlist;
90 std::string logic, conditions;
91 item->buildLogic(logic, thresholdlist);
92
93 std::map<unsigned int, std::string> thrNames;
95 for(const std::string & thrmult : thresholdlist) {
96 std::vector<std::string>
res;
97 boost::split(
res, thrmult, boost::is_any_of(
","));
98
99 std::string name_mult("");
100 if(
res.size() == 1) {
102 } else {
103 name_mult =
res[2]+
"[x"+
res[0]+
"]";
104 }
105 thrNames[
idx++] = std::move(name_mult);
106 }
107
108
109 std::string def =
item->definition();
110 std::vector<std::string>
tokens;
111
112 for (
auto & tok : boost::tokenizer<boost::char_separator<char> > (
item->definition(), boost::char_separator<char>(
" ",
"()&|!")) ) {
114 auto [
ptr, ec] = std::from_chars(tok.data(), tok.data() + tok.size(), n);
115 if (ec == std::errc()) {
116 tokens.emplace_back(thrNames[n]);
117 } else {
119 }
120 }
121
122
123 std::string definition("");
124 for( auto & tok : tokens ) {
125 definition += tok;
126 }
127
128 return definition;
129}
std::pair< std::vector< unsigned int >, bool > res