| 208 | } |
| 209 | |
| 210 | bool 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 | |
| 231 | bool ReadRoadPenaltyFromMwm(MwmValue const & mwmValue, VehicleType vehicleType, RoadPenalty & roadPenalty) |
| 232 | { |