| 141 | } |
| 142 | |
| 143 | IndexGraphLoaderImpl::GraphPtrT IndexGraphLoaderImpl::CreateIndexGraph(NumMwmId numMwmId, GeometryPtrT & geometry) |
| 144 | { |
| 145 | MwmSet::MwmHandle const & handle = m_dataSource.GetHandle(numMwmId); |
| 146 | MwmValue const * value = handle.GetValue(); |
| 147 | |
| 148 | try |
| 149 | { |
| 150 | base::Timer timer; |
| 151 | |
| 152 | if (!geometry) |
| 153 | { |
| 154 | auto vehicleModel = m_vehicleModelFactory->GetVehicleModelForCountry(value->GetCountryFileName()); |
| 155 | geometry = make_shared<Geometry>(GeometryLoader::Create(handle, std::move(vehicleModel), m_loadAltitudes)); |
| 156 | } |
| 157 | |
| 158 | auto graph = make_unique<IndexGraph>(geometry, m_estimator, m_avoidRoutingOptions, &value->GetRegionData()); |
| 159 | graph->SetCurrentTimeGetter(m_currentTimeGetter); |
| 160 | DeserializeIndexGraph(*value, m_vehicleType, *graph); |
| 161 | |
| 162 | LOG(LINFO, |
| 163 | (ROUTING_FILE_TAG, "section for", value->GetCountryFileName(), "loaded in", timer.ElapsedSeconds(), "seconds")); |
| 164 | return graph; |
| 165 | } |
| 166 | catch (RootException const & ex) |
| 167 | { |
| 168 | LOG(LERROR, ("Error reading graph for", value->m_file)); |
| 169 | throw; |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | IndexGraphLoaderImpl::GeometryPtrT IndexGraphLoaderImpl::CreateGeometry(NumMwmId numMwmId) |
| 174 | { |
nothing calls this directly
no test coverage detected