| 18 | using EdgeGetter = void (IRoadGraph::*)(geometry::PointWithAltitude const &, RoadGraphBase::EdgeListT &) const; |
| 19 | |
| 20 | void GetRegularEdges(geometry::PointWithAltitude const & junction, IRoadGraph const & graph, |
| 21 | EdgeGetter const edgeGetter, Graph::EdgeCacheT & cache, Graph::EdgeListT & edges) |
| 22 | { |
| 23 | auto const it = cache.find(junction); |
| 24 | if (it == end(cache)) |
| 25 | { |
| 26 | auto & es = cache[junction]; |
| 27 | (graph.*edgeGetter)(junction, es); |
| 28 | edges.append(begin(es), end(es)); |
| 29 | } |
| 30 | else |
| 31 | { |
| 32 | auto const & es = it->second; |
| 33 | edges.append(begin(es), end(es)); |
| 34 | } |
| 35 | } |
| 36 | } // namespace |
| 37 | |
| 38 | Graph::Graph(DataSource & dataSource, shared_ptr<CarModelFactory> carModelFactory) |
no test coverage detected