| 224 | } |
| 225 | |
| 226 | void TestIndexGraphTopology::SetVertexAccessConditional(Vertex v, RoadAccess::Type type, string const & condition) |
| 227 | { |
| 228 | osmoh::OpeningHours openingHours(condition); |
| 229 | CHECK(openingHours.IsValid(), (condition)); |
| 230 | |
| 231 | bool found = false; |
| 232 | for (auto & r : m_edgeRequests) |
| 233 | { |
| 234 | if (r.m_from == v) |
| 235 | { |
| 236 | r.m_fromAccessConditionalType.Insert(type, std::move(openingHours)); |
| 237 | found = true; |
| 238 | } |
| 239 | else if (r.m_to == v) |
| 240 | { |
| 241 | r.m_toAccessConditionalType.Insert(type, std::move(openingHours)); |
| 242 | found = true; |
| 243 | } |
| 244 | |
| 245 | if (found) |
| 246 | break; |
| 247 | } |
| 248 | CHECK(found, ("Cannot set access for vertex that is not in the graph", v)); |
| 249 | } |
| 250 | |
| 251 | bool TestIndexGraphTopology::FindPath(Vertex start, Vertex finish, double & pathWeight, vector<Edge> & pathEdges) const |
| 252 | { |