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

Method CollectStopsSubway

libs/drape_frontend/transit_scheme_builder.cpp:492–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

490}
491
492void TransitSchemeBuilder::CollectStopsSubway(TransitDisplayInfo const & transitDisplayInfo,
493 MwmSet::MwmId const & mwmId, MwmSchemeData & scheme)
494{
495 CHECK_EQUAL(transitDisplayInfo.m_transitVersion, ::transit::TransitVersion::OnlySubway, ());
496
497 for (auto const & stopInfo : transitDisplayInfo.m_stopsSubway)
498 {
499 routing::transit::Stop const & stop = stopInfo.second;
500 if (stop.GetTransferId() != routing::transit::kInvalidTransferId)
501 continue;
502 auto & stopNode = scheme.m_stopsSubway[stop.GetId()];
503 FillStopParamsSubway(transitDisplayInfo, mwmId, stop, stopNode);
504 }
505
506 for (auto const & stopInfo : transitDisplayInfo.m_transfersSubway)
507 {
508 routing::transit::Transfer const & transfer = stopInfo.second;
509 auto & stopNode = scheme.m_transfersSubway[transfer.GetId()];
510
511 for (auto stopId : transfer.GetStopIds())
512 {
513 if (transitDisplayInfo.m_stopsSubway.find(stopId) == transitDisplayInfo.m_stopsSubway.end())
514 {
515 LOG(LWARNING, ("Invalid stop", stopId, "in transfer", transfer.GetId()));
516 continue;
517 }
518 routing::transit::Stop const & stop = transitDisplayInfo.m_stopsSubway.at(stopId);
519 FillStopParamsSubway(transitDisplayInfo, mwmId, stop, stopNode);
520 }
521 stopNode.m_isTransfer = true;
522 stopNode.m_pivot = transfer.GetPoint();
523 }
524}
525
526void TransitSchemeBuilder::CollectStopsPT(TransitDisplayInfo const & transitDisplayInfo, LinesDataPT const & linesData,
527 MwmSet::MwmId const & mwmId, MwmSchemeData & scheme)

Callers

nothing calls this directly

Calls 6

FillStopParamsSubwayFunction · 0.85
atMethod · 0.80
GetIdMethod · 0.45
findMethod · 0.45
endMethod · 0.45
GetPointMethod · 0.45

Tested by

no test coverage detected