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

Function ReadRoadAccessFromMwm

libs/routing/index_graph_loader.cpp:210–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210bool ReadRoadAccessFromMwm(MwmValue const & mwmValue, VehicleType vehicleType, RoadAccess & roadAccess)
211{
212 try
213 {
214 auto const reader = mwmValue.m_cont.GetReader(ROAD_ACCESS_FILE_TAG);
215 ReaderSource src(reader);
216 RoadAccessSerializer::Deserialize(src, vehicleType, roadAccess);
217 return true;
218 }
219 catch (Reader::OpenException const &)
220 {
221 LOG(LWARNING, (ROAD_ACCESS_FILE_TAG, "section not found in", mwmValue.GetCountryFileName()));
222 }
223 catch (Reader::Exception const & e)
224 {
225 LOG(LERROR,
226 ("Error while reading", ROAD_ACCESS_FILE_TAG, "section in", mwmValue.GetCountryFileName(), ":", e.Msg()));
227 }
228 return false;
229}
230
231bool ReadRoadPenaltyFromMwm(MwmValue const & mwmValue, VehicleType vehicleType, RoadPenalty & roadPenalty)
232{

Callers 2

UNIT_CLASS_TESTFunction · 0.85
DeserializeIndexGraphFunction · 0.85

Calls 2

GetCountryFileNameMethod · 0.80
GetReaderMethod · 0.45

Tested by 1

UNIT_CLASS_TESTFunction · 0.68