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

Function ReadSpeedCamsFromMwm

libs/routing/index_graph_loader.cpp:189–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187} // namespace
188
189bool ReadSpeedCamsFromMwm(MwmValue const & mwmValue, SpeedCamerasMapT & camerasMap)
190{
191 try
192 {
193 auto reader = mwmValue.m_cont.GetReader(CAMERAS_INFO_FILE_TAG);
194 ReaderSource src(reader);
195 DeserializeSpeedCamsFromMwm(src, camerasMap);
196 return true;
197 }
198 catch (Reader::OpenException const &)
199 {
200 LOG(LWARNING, (CAMERAS_INFO_FILE_TAG "section not found in", mwmValue.GetCountryFileName()));
201 }
202 catch (Reader::Exception const & e)
203 {
204 LOG(LERROR,
205 ("Error while reading", CAMERAS_INFO_FILE_TAG, "section in", mwmValue.GetCountryFileName(), ":", e.Msg()));
206 }
207 return false;
208}
209
210bool ReadRoadAccessFromMwm(MwmValue const & mwmValue, VehicleType vehicleType, RoadAccess & roadAccess)
211{

Callers 2

UNIT_CLASS_TESTFunction · 0.85

Calls 3

GetCountryFileNameMethod · 0.80
GetReaderMethod · 0.45

Tested by 1

UNIT_CLASS_TESTFunction · 0.68