| 171 | } |
| 172 | |
| 173 | bool IsUsefulNondrawableType(uint32_t type, GeomType geomType = GeomType::Undefined) |
| 174 | { |
| 175 | auto const & cl = classif(); |
| 176 | if (!cl.IsTypeValid(type)) |
| 177 | return false; |
| 178 | |
| 179 | if (TypeAlwaysExists(type, geomType)) |
| 180 | return true; |
| 181 | |
| 182 | // Exclude generic 1-arity types like [wheelchair]. |
| 183 | if (ftype::GetLevel(type) < 2) |
| 184 | return false; |
| 185 | |
| 186 | static uint32_t const hwtag = cl.GetTypeByPath({"hwtag"}); |
| 187 | static uint32_t const psurface = cl.GetTypeByPath({"psurface"}); |
| 188 | |
| 189 | /// @todo "roundabout" type itself has caption drawing rules (for point junctions?). |
| 190 | if ((geomType == GeomType::Line || geomType == GeomType::Undefined) && ftypes::IsRoundAboutChecker::Instance()(type)) |
| 191 | return true; |
| 192 | |
| 193 | ftype::TruncValue(type, 1); |
| 194 | if (geomType == GeomType::Line || geomType == GeomType::Undefined) |
| 195 | { |
| 196 | if (type == hwtag || type == psurface) |
| 197 | return true; |
| 198 | } |
| 199 | |
| 200 | static uint32_t const arrTypes[] = { |
| 201 | cl.GetTypeByPath({"fee"}), |
| 202 | }; |
| 203 | return base::IsExist(arrTypes, type); |
| 204 | } |
| 205 | /// @} |
| 206 | } // namespace |
| 207 |
no test coverage detected