MCPcopy Create free account
hub / github.com/comaps/comaps / GetRoadShields

Function GetRoadShields

libs/indexer/road_shields_parser.cpp:925–944  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

923} // namespace
924
925RoadShieldsSetT GetRoadShields(FeatureType & f)
926{
927 auto const & ref = f.GetRef();
928 if (ref.empty())
929 return {};
930
931 auto const & highwayClass = ftypes::GetHighwayClass(feature::TypesHolder(f));
932 if (highwayClass == HighwayClass::Undefined)
933 return {};
934
935 // Find out country name.
936 std::string mwmName = f.GetID().GetMwmName();
937 ASSERT(!mwmName.empty(), (f.GetID()));
938
939 auto const underlinePos = mwmName.find('_');
940 if (underlinePos != std::string::npos)
941 mwmName = mwmName.substr(0, underlinePos);
942
943 return GetRoadShields(mwmName, ref, highwayClass);
944}
945
946RoadShieldsSetT GetRoadShields(std::string const & mwmName, std::string const & roadNumber,
947 HighwayClass const & highwayClass)

Callers 5

GetRoadShieldsNamesFunction · 0.85
SetRoadTypeMethod · 0.85
StylistMethod · 0.85
GetFullRoadNameFunction · 0.85
FormatFullRoadNameFunction · 0.85

Calls 15

GetHighwayClassFunction · 0.85
ASSERTFunction · 0.85
USRoadShieldParserClass · 0.85
UKRoadShieldParserClass · 0.85

Tested by

no test coverage detected