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

Method SetEdgeAccessConditional

libs/routing/routing_tests/index_graph_tools.cpp:188–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188void TestIndexGraphTopology::SetEdgeAccessConditional(Vertex from, Vertex to, RoadAccess::Type type,
189 string const & condition)
190{
191 for (auto & r : m_edgeRequests)
192 {
193 if (r.m_from == from && r.m_to == to)
194 {
195 osmoh::OpeningHours openingHours(condition);
196 CHECK(openingHours.IsValid(), (condition));
197 r.m_accessConditionalType.Insert(type, std::move(openingHours));
198 return;
199 }
200 }
201 CHECK(false, ("Cannot set access for edge that is not in the graph", from, to));
202}
203
204void TestIndexGraphTopology::SetVertexAccess(Vertex v, RoadAccess::Type type)
205{

Callers 1

UNIT_TESTFunction · 0.80

Calls 2

IsValidMethod · 0.45
InsertMethod · 0.45

Tested by 1

UNIT_TESTFunction · 0.64