MSNoLogicJunction.cpp
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifdef _MSC_VER
00025 #include <windows_config.h>
00026 #else
00027 #include <config.h>
00028 #endif
00029
00030 #include "MSNoLogicJunction.h"
00031 #include "MSLane.h"
00032 #include "MSInternalLane.h"
00033 #include <algorithm>
00034 #include <cassert>
00035 #include <cmath>
00036
00037 #ifdef CHECK_MEMORY_LEAKS
00038 #include <foreign/nvwa/debug_new.h>
00039 #endif // CHECK_MEMORY_LEAKS
00040
00041
00042
00043
00044
00045 std::bitset<64> MSNoLogicJunction::myDump((unsigned long) 0xffffffff);
00046
00047
00048
00049
00050
00051
00052 MSNoLogicJunction::MSNoLogicJunction(const std::string &id,
00053 const Position2D &position,
00054 const Position2DVector &shape,
00055 std::vector<MSLane*> incoming
00056 #ifdef HAVE_INTERNAL_LANES
00057 , std::vector<MSLane*> internal
00058 #endif
00059 ) throw()
00060 : MSJunction(id, position, shape),
00061 myIncomingLanes(incoming)
00062 #ifdef HAVE_INTERNAL_LANES
00063 , myInternalLanes(internal)
00064 #endif
00065 {
00066 }
00067
00068
00069 bool
00070 MSNoLogicJunction::clearRequests() {
00071 return true;
00072 }
00073
00074
00075
00076 MSNoLogicJunction::~MSNoLogicJunction() {}
00077
00078
00079
00080 void
00081 MSNoLogicJunction::postloadInit() throw(ProcessError) {
00082 std::vector<MSLane*>::iterator i;
00083
00084 for (i=myIncomingLanes.begin(); i!=myIncomingLanes.end(); ++i) {
00085 const MSLinkCont &links = (*i)->getLinkCont();
00086 for (MSLinkCont::const_iterator j=links.begin(); j!=links.end(); j++) {
00087 (*j)->setRequestInformation(&myDump, 0, &myDump, 0, MSLogicJunction::LinkFoes(), false, false,
00088 std::vector<MSLink*>(), std::vector<MSLane*>());
00089 }
00090 }
00091 #ifdef HAVE_INTERNAL_LANES
00092
00093 for (i=myInternalLanes.begin(); i!=myInternalLanes.end(); ++i) {
00094
00095 static_cast<MSInternalLane*>(*i)->setParentJunctionInformation(&myDump, 0);
00096 }
00097 #endif
00098 }
00099
00100
00101
00102
00103