41 #ifdef CHECK_MEMORY_LEAKS
43 #endif // CHECK_MEMORY_LEAKS
91 std::vector<MSTrafficLightLogic*> logics = vars.
getAllLogics();
96 tempContent.
writeInt((
int) logics.size());
98 for (
unsigned int i = 0; i < logics.size(); ++i) {
118 tempContent.
writeInt((
int) phaseNo);
120 for (
unsigned int j = 0; j < phaseNo; ++j) {
131 const std::string& state = phase.
getState();
145 std::vector<std::string> laneIDs;
146 for (MSTrafficLightLogic::LaneVectorVector::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
148 for (MSTrafficLightLogic::LaneVector::const_iterator j = llanes.begin(); j != llanes.end(); ++j) {
149 laneIDs.push_back((*j)->getID());
161 unsigned int cnt = 0;
163 unsigned int no = (
unsigned int) lanes.size();
165 for (
unsigned int i = 0; i < no; ++i) {
170 unsigned int no2 = (
unsigned int) llanes.size();
173 for (
unsigned int j = 0; j < no2; ++j) {
175 std::vector<std::string> def;
177 def.push_back(llanes[j]->getID());
181 #ifdef HAVE_INTERNAL_LANES
182 def.push_back(link->getViaLane() != 0 ? link->getViaLane()->getID() :
"");
227 std::string warning =
"";
287 int type = 0, index = 0, phaseNo = 0;
308 if (index >= phaseNo) {
312 std::vector<MSPhaseDefinition*> phases;
313 for (
int j = 0; j < phaseNo; ++j) {
314 int duration = 0, minDuration = 0, maxDuration = 0;
329 phases.push_back(phase);
333 vars.
addLogic(subid, logic,
true,
true);