Co-Simulation/Sumo/sumo-1.7.0/src/microsim/MSLane.cpp
/// returns the link to the given lane or 0, if it is not connected
returns the link to the given lane or 0, if it is not connected
returns the link to the given lane or 0 if it is not connected
MSLink*
MSLane::getLinkTo(const MSLane* target) const {
    MSLinkCont::const_iterator l = myLinks.begin();
    if (target->isInternal()) {
        while (l != myLinks.end()) {
            if ((*l)->getViaLane()->getID() == target->getID()) {
                return *l;
            }
            ++l;
        }
    } else {
        while (l != myLinks.end()) {
            if ((*l)->getLane()->getID() == target->getID()) {
                return *l;
            }
            ++l;
        }
    }
    return nullptr;
}
MSLink * MSLane :: getLinkTo ( const MSLane * target ) const { MSLinkCont :: const_iterator l = myLinks . begin ( ) ; if ( target -> isInternal ( ) ) { while ( l != myLinks . end ( ) ) { if ( ( * l ) -> getViaLane ( ) -> getID ( ) == target -> getID ( ) ) { return * l ; } ++ l ; } } else { while ( l != myLinks . end ( ) ) { if ( ( * l ) -> getLane ( ) -> getID ( ) == target -> getID ( ) ) { return * l ; } ++ l ; } } return nullptr ; }
returns the link to the given lane or 0, if it is not connected
returns the link to the given lane or 0 if it is not connected