Filters types with |checker|, returns vector of raw type second components. For example for types {"cuisine-sushi", "cuisine-pizza", "cuisine-seafood"} vector of second components is {"sushi", "pizza", "seafood"}.
| 29 | // For example for types {"cuisine-sushi", "cuisine-pizza", "cuisine-seafood"} vector |
| 30 | // of second components is {"sushi", "pizza", "seafood"}. |
| 31 | vector<string> GetRawTypeSecond(ftypes::BaseChecker const & checker, TypesHolder const & types) |
| 32 | { |
| 33 | auto const & c = classif(); |
| 34 | vector<string> res; |
| 35 | for (auto const t : types) |
| 36 | { |
| 37 | if (!checker(t)) |
| 38 | continue; |
| 39 | auto path = c.GetFullObjectNamePath(t); |
| 40 | CHECK_EQUAL(path.size(), 2, (path)); |
| 41 | res.push_back(std::move(path[1])); |
| 42 | } |
| 43 | return res; |
| 44 | } |
| 45 | |
| 46 | vector<string> GetLocalizedTypes(ftypes::BaseChecker const & checker, TypesHolder const & types) |
| 47 | { |
no test coverage detected