static
| 60 | |
| 61 | // static |
| 62 | CameraCollector::CameraInfo CameraCollector::CameraInfo::Read(ReaderSource<FileReader> & src) |
| 63 | { |
| 64 | /// @todo Take out intermediate camera info serialization code. |
| 65 | /// Should be equal with CamerasInfoCollector::ParseIntermediateInfo. |
| 66 | |
| 67 | CameraInfo camera; |
| 68 | auto const latInt = ReadPrimitiveFromSource<uint32_t>(src); |
| 69 | auto const lonInt = ReadPrimitiveFromSource<uint32_t>(src); |
| 70 | camera.m_lat = Uint32ToDouble(latInt, ms::LatLon::kMinLat, ms::LatLon::kMaxLat, kPointCoordBits); |
| 71 | camera.m_lon = Uint32ToDouble(lonInt, ms::LatLon::kMinLon, ms::LatLon::kMaxLon, kPointCoordBits); |
| 72 | ReadPrimitiveFromSource(src, camera.m_speedKmPH); |
| 73 | auto relatedWaysNumber = ReadPrimitiveFromSource<uint32_t>(src); |
| 74 | camera.m_ways.reserve(relatedWaysNumber); |
| 75 | while (relatedWaysNumber--) |
| 76 | camera.m_ways.push_back(ReadPrimitiveFromSource<uint64_t>(src)); |
| 77 | |
| 78 | return camera; |
| 79 | } |
| 80 | |
| 81 | // static |
| 82 | void CameraCollector::CameraInfo::Write(FileWriter & writer, CameraInfo const & camera) |
nothing calls this directly
no test coverage detected