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

Function FeatureIdFromXML

tools/openlr/decoded_path.cpp:48–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48void FeatureIdFromXML(pugi::xml_node const & node, DataSource const & dataSource, FeatureID & fid)
49{
50 THROW_IF_NODE_IS_EMPTY(node, openlr::DecodedPathLoadError, ("Can't parse CountryName"));
51 auto const countryName = node.child("CountryName").text().as_string();
52 fid.m_mwmId = dataSource.GetMwmIdByCountryFile(platform::CountryFile(countryName));
53 CHECK(fid.m_mwmId.IsAlive(), ("Can't get mwm id for country", countryName));
54 fid.m_index = node.child("Index").text().as_uint();
55}
56
57void FeatureIdToXML(FeatureID const & fid, pugi::xml_node & node)
58{

Callers 1

PathFromXMLFunction · 0.85

Calls 3

GetMwmIdByCountryFileMethod · 0.80
CountryFileClass · 0.50
IsAliveMethod · 0.45

Tested by

no test coverage detected