54 #ifdef CHECK_MEMORY_LEAKS
56 #endif // CHECK_MEMORY_LEAKS
148 std::vector<MSTrafficLightLogic*> logics = vars.
getAllLogics();
149 if (logics.size() > 1) {
150 std::vector<MSTrafficLightLogic*>::const_iterator i;
152 for (i = logics.begin(); i != logics.end(); ++i, ++index) {
154 new FXMenuCommand(ret, (
"Switch to '" + (*i)->getProgramID() +
"'").c_str(),
158 new FXMenuSeparator(ret);
163 new FXMenuSeparator(ret);
187 static_cast<MSSimpleTrafficLightLogic&>(
myTLLogic).getPhases());
205 for (MSTrafficLightLogic::LaneVectorVector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
207 for (MSTrafficLightLogic::LaneVector::const_iterator j = lanes2.begin(); j != lanes2.end(); ++j) {
208 ret.
add((*j)->getShape()[-1]);
224 std::vector<MSTrafficLightLogic*> logics = vars.
getAllLogics();
243 if (curState.find_first_of(
"gG") == std::string::npos) {
247 unsigned int phaseIdx = (curPhaseIdx + 1) % phases.size();
248 std::vector<unsigned int> nextGreen;
249 while (phaseIdx != curPhaseIdx) {
250 const std::string& state = phases[phaseIdx]->getState();
251 for (
unsigned int linkIdx = 0; linkIdx < state.size(); linkIdx++) {
254 nextGreen.push_back(linkIdx);
257 if (nextGreen.size() > 0) {
260 phaseIdx = (phaseIdx + 1) % phases.size();
263 for (std::vector<unsigned int>::iterator it_idx = nextGreen.begin(); it_idx != nextGreen.end(); it_idx++) {
265 for (MSTrafficLightLogic::LaneVector::const_iterator it_lane = lanes.begin(); it_lane != lanes.end(); it_lane++) {
268 Position pos = (*it_lane)->getShape().back();