| 92 | } |
| 93 | |
| 94 | void ProcessCategory(std::string_view line, std::vector<std::string> & groups, std::vector<uint32_t> & types) |
| 95 | { |
| 96 | // Check if category is a group reference. |
| 97 | if (line[0] == '@') |
| 98 | { |
| 99 | CHECK((groups.empty() || !types.empty()), ("Two groups in a group definition, line:", line)); |
| 100 | groups.push_back(std::string(line)); |
| 101 | return; |
| 102 | } |
| 103 | |
| 104 | // Get classificator type. |
| 105 | uint32_t const type = classif().GetTypeByPathSafe(strings::Tokenize(line, "-")); |
| 106 | if (type == Classificator::INVALID_TYPE) |
| 107 | { |
| 108 | LOG(LWARNING, ("Invalid type when parsing the line:", line)); |
| 109 | return; |
| 110 | } |
| 111 | |
| 112 | types.push_back(type); |
| 113 | } |
| 114 | } // namespace |
| 115 | |
| 116 | // static |
no test coverage detected