41 #ifdef CHECK_MEMORY_LEAKS
43 #endif // CHECK_MEMORY_LEAKS
49 #ifdef HAVE_INTERNAL_LANES
50 MSInternalJunction::MSInternalJunction(
const std::string&
id,
53 std::vector<MSLane*> incoming,
54 std::vector<MSLane*>
internal)
59 MSInternalJunction::~MSInternalJunction() {}
63 MSInternalJunction::postloadInit() {
65 unsigned int requestPos = 0;
66 for (std::vector<MSLane*>::iterator i = myInternalLanes.begin(); i != myInternalLanes.end(); ++i) {
68 for (MSLinkCont::const_iterator q = lc.begin(); q != lc.end(); ++q) {
69 if ((*q)->getViaLane() != 0) {
70 myInternalLaneFoes.push_back((*q)->getViaLane());
72 myInternalLaneFoes.push_back(*i);
77 for (std::vector<MSLane*>::const_iterator i = myIncomingLanes.begin() + 1; i != myIncomingLanes.end(); ++i) {
80 for (MSLinkCont::const_iterator j = lc.begin(); j != lc.end(); ++j) {
81 MSLane* via = (*j)->getViaLane();
82 if (std::find(myInternalLanes.begin(), myInternalLanes.end(), via) == myInternalLanes.end()) {
85 myInternalLinkFoes.push_back(*j);
88 if (myIncomingLanes.size() != 0) {
90 const MSLinkCont& links = myIncomingLanes[0]->getLinkCont();
92 for (MSLinkCont::const_iterator j = links.begin(); j != links.end(); j++) {
93 (*j)->setRequestInformation(requestPos, requestPos,
true,
false, myInternalLinkFoes, myInternalLaneFoes);
95 for (std::vector<MSLink*>::const_iterator k = myInternalLinkFoes.begin(); k != myInternalLinkFoes.end(); ++k) {
96 (*j)->addBlockedLink(*k);
97 (*k)->addBlockedLink(*j);