| 177 | |
| 178 | template <typename DFA> |
| 179 | pair<bool, bool> MatchesByType(feature::TypesHolder const & types, vector<DFA> const & dfas) |
| 180 | { |
| 181 | if (dfas.empty()) |
| 182 | return {false, false}; |
| 183 | |
| 184 | auto const & c = classif(); |
| 185 | |
| 186 | for (auto const & type : types) |
| 187 | { |
| 188 | UniString const s = FeatureTypeToString(c.GetIndexForType(type)); |
| 189 | |
| 190 | for (auto const & dfa : dfas) |
| 191 | { |
| 192 | auto it = dfa.Begin(); |
| 193 | DFAMove(it, s); |
| 194 | if (it.Accepts()) |
| 195 | return {true, it.ErrorsMade() == 0}; |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | return {false, false}; |
| 200 | } |
| 201 | |
| 202 | template <typename DFA> |
| 203 | pair<bool, bool> MatchFeatureByNameAndType(EditableMapObject const & emo, SearchTrieRequest<DFA> const & request) |
no test coverage detected