59 #ifdef CHECK_MEMORY_LEAKS
61 #endif // CHECK_MEMORY_LEAKS
153 std::vector<MSTrafficLightLogic*> logics = vars.
getAllLogics();
154 if (logics.size() > 1) {
155 std::vector<MSTrafficLightLogic*>::const_iterator i;
157 for (i = logics.begin(); i != logics.end(); ++i, ++index) {
159 new FXMenuCommand(ret, (
"Switch to '" + (*i)->getProgramID() +
"'").c_str(),
163 new FXMenuSeparator(ret);
168 new FXMenuSeparator(ret);
192 static_cast<MSSimpleTrafficLightLogic&>(
myTLLogic).getPhases());
210 for (MSTrafficLightLogic::LaneVectorVector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
212 for (MSTrafficLightLogic::LaneVector::const_iterator j = lanes2.begin(); j != lanes2.end(); ++j) {
213 ret.
add((*j)->getShape()[-1]);
229 std::vector<MSTrafficLightLogic*> logics = vars.
getAllLogics();
248 if (curState.find_first_of(
"gG") == std::string::npos) {
252 unsigned int phaseIdx = (curPhaseIdx + 1) % phases.size();
253 std::vector<unsigned int> nextGreen;
254 while (phaseIdx != curPhaseIdx) {
255 const std::string& state = phases[phaseIdx]->getState();
256 for (
unsigned int linkIdx = 0; linkIdx < state.size(); linkIdx++) {
259 nextGreen.push_back(linkIdx);
262 if (nextGreen.size() > 0) {
265 phaseIdx = (phaseIdx + 1) % phases.size();
268 for (std::vector<unsigned int>::iterator it_idx = nextGreen.begin(); it_idx != nextGreen.end(); it_idx++) {
270 for (MSTrafficLightLogic::LaneVector::const_iterator it_lane = lanes.begin(); it_lane != lanes.end(); it_lane++) {
273 Position pos = (*it_lane)->getShape().getEnd();