Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
InternalTestStep.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// Single operation used in InternalTests
19/****************************************************************************/
20#include <config.h>
21
22#include <fxkeys.h>
23
26
27#include "InternalTestStep.h"
28
29// ===========================================================================
30// static member definitions
31// ===========================================================================
32
33// this offsets corresponds to the offset of the test magenta square
34constexpr int MOUSE_OFFSET_X = 24;
35constexpr int MOUSE_OFFSET_Y = 25;
36constexpr int MOUSE_REFERENCE_X = 304;
37constexpr int MOUSE_REFERENCE_Y = 168;
38
39// ===========================================================================
40// member method definitions
41// ===========================================================================
42
43// ---------------------------------------------------------------------------
44// InternalTestStep::DialogArgument - public methods
45// ---------------------------------------------------------------------------
46
48 myType(type),
49 myAction(action) {
50}
51
52
53InternalTestStep::DialogArgument::DialogArgument(DialogType type, const std::string& customAction) :
54 myType(type),
56 myCustomAction(customAction) {
57}
58
59
60InternalTestStep::DialogArgument::DialogArgument(DialogType type, const std::string& customAction, const int index) :
61 myType(type),
63 myCustomAction(customAction),
64 myIndex(index) {
65}
66
67
68InternalTestStep::DialogArgument::DialogArgument(DialogType type, const std::string& prefixToRemove, const std::string& customAction) :
69 myType(type),
71 myCustomAction(customAction) {
72 // remove prefix from custom action
73 if (prefixToRemove.size() > 0) {
74 const auto pos = customAction.find(prefixToRemove);
75 if (pos != std::string::npos) {
76 myCustomAction.erase(pos, prefixToRemove.length());
77 }
78 }
79}
80
81
84 return myType;
85}
86
87
90 return myAction;
91}
92
93
94const std::string&
96 return myCustomAction;
97}
98
99
100int
102 return myIndex;
103}
104
105// ---------------------------------------------------------------------------
106// InternalTestStep::TLSTableTest - public methods
107// ---------------------------------------------------------------------------
108
109InternalTestStep::TLSTableTest::TLSTableTest(FXSelector sel_, const int row_) :
110 sel(sel_),
111 row(row_) {
112}
113
114
115InternalTestStep::TLSTableTest::TLSTableTest(FXSelector sel_, const int row_, const int column_, const std::string& text_) :
116 sel(sel_),
117 row(row_),
118 column(column_),
119 text(text_) {
120}
121
122// ---------------------------------------------------------------------------
123// InternalTestStep - public methods
124// ---------------------------------------------------------------------------
125
126InternalTestStep::InternalTestStep(InternalTest* testSystem, const std::string& step) :
127 myTestSystem(testSystem) {
128 // add this testStep to test system
129 testSystem->addTestSteps(this);
130 // get overlapped tabs
131 const int overlappedTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.editElements.overlapped");
132 // parse step
133 const auto function = parseStep(step);
134 // set description based in function
135 myDescription = "Process function: " + function;
136 // continue depending of function
137 if (function == "setupAndStart") {
139 } else if (function == "finish") {
140 finish();
141 } else if ((function == "leftClick") || (function == "leftClickData")) {
142 mouseClick("left", "");
143 } else if (function == "leftClickControl") {
144 mouseClick("left", "control");
145 } else if (function == "leftClickShift") {
146 mouseClick("left", "shift");
147 } else if (function == "rightClick") {
148 mouseClick("right", "");
149 } else if (function == "rightClickControl") {
150 mouseClick("right", "control");
151 } else if (function == "rightClickShift") {
152 mouseClick("right", "shift");
153 } else if (function == "leftClickOffset") {
154 leftClickOffset("left");
155 } else if (function == "typeKey") {
156 typeKey();
157 } else if (function == "moveElementHorizontal") {
159 } else if (function == "moveElementVertical") {
161 } else if (function == "moveElement") {
162 moveElement();
163 } else if (function == "focusOnFrame") {
164 focusOnFrame();
165 } else if (function == "contextualMenuOperation") {
167 } else if (function == "protectElements") {
169 } else if (function == "waitDeleteWarning") {
171 } else if (function == "modifyAttribute") {
173 } else if (function == "modifyAttributeOverlapped") {
174 modifyAttribute(overlappedTabs);
175 } else if (function == "modifyBoolAttribute") {
177 } else if (function == "modifyBoolAttributeOverlapped") {
178 modifyBoolAttribute(overlappedTabs);
179 } else if (function == "modifyColorAttribute") {
181 } else if (function == "modifyColorAttributeOverlapped") {
182 modifyColorAttribute(overlappedTabs);
183 } else if (function == "modifyVClassDialog_NoDisallowAll") {
185 } else if (function == "modifyVClassDialogOverlapped_NoDisallowAll") {
186 modifyVClassDialog_NoDisallowAll(overlappedTabs);
187 } else if (function == "modifyVClassDialog_DisallowAll") {
189 } else if (function == "modifyVClassDialogOverlapped_DisallowAll") {
190 modifyVClassDialog_DisallowAll(overlappedTabs);
191 } else if (function == "modifyVClassDialog_Cancel") {
193 } else if (function == "modifyVClassDialogOverlapped_Cancel") {
194 modifyVClassDialog_Cancel(overlappedTabs);
195 } else if (function == "modifyVClassDialog_Reset") {
197 } else if (function == "modifyVClassDialogOverlapped_Reset") {
198 modifyVClassDialog_Reset(overlappedTabs);
199 } else if (function == "modifyVTypeDialogAttribute") {
201 } else if (function == "createConnection") {
203 } else if (function == "createCrossing") {
205 } else if (function == "modifyCrossingDefaultValue") {
207 } else if (function == "modifyCrossingDefaultBoolValue") {
209 } else if (function == "crossingClearEdges") {
211 } else if (function == "crossingInvertEdges") {
213 } else if (function == "createConnectionConflict") {
214 createConnection("control");
215 } else if (function == "createConnectionYield") {
216 createConnection("shift");
217 } else if (function == "saveConnectionEdit") {
219 } else if (function == "fixCrossings") {
220 fixCrossings();
221 } else if (function == "fixStoppingPlace") {
223 } else if (function == "fixRoute") {
224 fixRoute();
225 } else if (function == "createTLS") {
226 createTLS(0);
227 } else if (function == "createTLSOverlapped") {
228 createTLS(overlappedTabs);
229 } else if (function == "copyTLS") {
230 copyTLS();
231 } else if (function == "joinTSL") {
232 joinTSL();
233 } else if (function == "disJoinTLS") {
234 disJoinTLS();
235 } else if (function == "deleteTLS") {
236 deleteTLS();
237 } else if (function == "modifyTLSTable") {
239 } else if (function == "resetSingleTLSPhases") {
241 } else if (function == "resetAllTLSPhases") {
243 } else if (function == "pressTLSPhaseButton") {
245 } else if (function == "addDefaultPhase") {
246 addPhase("default");
247 } else if (function == "addDuplicatePhase") {
248 addPhase("duplicate");
249 } else if (function == "addRedPhase") {
250 addPhase("red");
251 } else if (function == "addYellowPhase") {
252 addPhase("yellow");
253 } else if (function == "addGreenPhase") {
254 addPhase("green");
255 } else if (function == "addGreenPriorityPhase") {
256 addPhase("priorityGreen");
257 } else if (function == "tlsDeletePhase") {
258 addPhase("deletePhase");
259 } else if (function == "tlsMoveUp") {
260 addPhase("moveUp");
261 } else if (function == "tlsMoveDown") {
262 addPhase("moveDown");
263 } else if (function == "tlsCleanStates") {
264 pressTLSButton("cleanStates");
265 } else if (function == "tlsAddStates") {
266 pressTLSButton("addStates");
267 } else if (function == "tlsGroupSignal") {
268 pressTLSButton("groupSignal");
269 } else if (function == "tlsUngroupSignal") {
270 pressTLSButton("ungroupSignal");
271 } else if (function == "checkParameters") {
273 } else if (function == "checkParametersOverlapped") {
274 checkParameters(overlappedTabs);
275 } else if (function == "checkDoubleParameters") {
277 } else if (function == "checkDoubleParametersOverlapped") {
278 checkDoubleParameters(overlappedTabs);
279 } else if (function == "changeEditMode") {
281 } else if (function == "changeSupermode") {
283 } else if (function == "changeMode") {
284 changeMode();
285 } else if (function == "changeElement") {
287 } else if (function == "changePlan") {
288 changePlan();
289 } else if (function == "computeJunctions") {
291 } else if (function == "computeJunctionsVolatileOptions") {
293 } else if (function == "selectAdditionalChild") {
295 } else if (function == "createRectangledShape") {
297 } else if (function == "createSquaredShape") {
299 } else if (function == "createLineShape") {
301 } else if (function == "createMeanData") {
303 } else if (function == "deleteMeanData") {
305 } else if (function == "copyMeanData") {
306 copyMeanData();
307 } else if (function == "saveExistentFile") {
309 } else if (function == "checkUndoRedo") {
311 } else if (function == "delete") {
313 } else if (function == "selection") {
314 selection();
315 } else if (function == "selectNetworkItems") {
317 } else if (function == "lockSelection") {
319 } else if (function == "selectionRectangle") {
321 } else if (function == "createDataSet") {
323 } else if (function == "createDataInterval") {
325 } else if (function == "openAboutDialog") {
327 } else if (function == "loadFile") {
328 loadFile();
329 } else if (function == "saveNewFile") {
330 saveNewFile();
331 } else if (function == "saveFileAs") {
332 saveFileAs();
333 } else if (function == "reloadFile") {
334 reloadFile();
335 } else if (function == "selectEdgeType") {
337 } else if (function == "createNewEdgeType") {
339 } else if (function == "overwritingAccept") {
341 } else if (function == "overwritingCancel") {
343 } else if (function == "overwritingAbort") {
345 } else if (function == "overwritingApplyToAll") {
347 } else if (function == "undo") {
348 undo();
349 } else if (function == "redo") {
350 redo();
351 } else if (function == "quit") {
352 quit();
353 } else if (function.size() > 0) {
354 std::cout << "Function " + function + " not implemented in InternalTestStep" << std::endl;
355 throw ProcessError();
356 }
357}
358
359
360InternalTestStep::InternalTestStep(InternalTest* testSystem, FXSelector messageType,
361 FXSelector messageID, Category category,
362 const std::string& description) :
363 myTestSystem(testSystem),
364 myMessageType(messageType),
365 myMessageID(messageID),
366 myCategory(category),
367 myDescription(description) {
368 // add this testStep to test system
369 testSystem->addTestSteps(this);
370}
371
372
373InternalTestStep::InternalTestStep(InternalTest* testSystem, FXSelector messageType,
374 Category category, FXEvent* event, const bool updateView,
375 const std::string& description) :
376 myTestSystem(testSystem),
377 myMessageType(messageType),
378 myCategory(category),
379 myUpdateView(updateView),
380 myDescription(description),
381 myEvent(event) {
382 // add this testStep to test system
383 testSystem->addTestSteps(this);
384}
385
386
388 const std::string& description) :
389 myTestSystem(testSystem),
390 myCategory(InternalTestStep::Category::DIALOG),
391 myUpdateView(false),
392 myDescription(description),
393 myDialogArgument(dialogArgument) {
394 // add this testStep to test system
395 testSystem->addTestSteps(this);
396}
397
398
400 if (myEvent) {
401 delete myEvent;
402 }
403 if (myDialogArgument) {
404 delete myDialogArgument;
405 }
406 if (myTLSTableTest) {
407 delete myTLSTableTest;
408 }
409}
410
411
414 return myNextStep;
415}
416
417
418void
422
423
424FXSelector
428
429
430FXSelector
434
435
440
441
446
447
448FXSelector
450 return FXSEL(myMessageType, myMessageID);
451}
452
453
454bool
458
459
462 return myCategory;
463}
464
465
466void*
468 return myEvent;
469}
470
471
472const std::string&
476
477
478std::string
479InternalTestStep::parseStep(const std::string& rowText) {
480 // first check if this is the netedit.setupAndStart function
481 if (rowText.find("netedit.setupAndStart") != std::string::npos) {
482 return "setupAndStart";
483 } else if (rowText.find("netedit.finish") != std::string::npos) {
484 return "finish";
485 } else if (rowText.compare(0, 8, "netedit.") != 0) {
486 // proces only lines that start with "netedit."
487 return "";
488 } else {
489 std::string functionName;
490 // make a copy to help editing row
491 std::string rowStr = rowText;
492 // every function has the format <function>(<argument1>, <argument2>,....,)
493 if (rowText.empty() || (rowText.front() == '(') || (rowText.back() != ')')) {
494 writeError("parseStep", 0, "function(arguments)");
495 return "";
496 }
497 // first extract function
498 while (rowStr.size() > 0) {
499 if (rowStr.front() == '(') {
500 break;
501 } else {
502 functionName.push_back(rowStr.front());
503 rowStr.erase(rowStr.begin());
504 }
505 }
506 // remove prefix "netedit." (size 8) from function
507 functionName = functionName.substr(8);
508 // check if there are at least two characters (to avoid cases like 'function)')
509 if (rowStr.size() < 2) {
510 writeError("parseStep", 0, "function(arguments)");
511 return functionName;
512 }
513 // remove both pharentesis
514 rowStr.erase(rowStr.begin());
515 rowStr.pop_back();
516 // now parse arguments
517 parseArguments(rowStr);
518 // remove "netedit." from frunction
519 return functionName;
520 }
521}
522
523
524void
525InternalTestStep::parseArguments(const std::string& arguments) {
526 std::string current;
527 bool inQuotes = false;
528 for (size_t i = 0; i < arguments.length(); ++i) {
529 char c = arguments[i];
530 if (c == '\"' || c == '\'') {
531 // Toggle quote state
532 inQuotes = !inQuotes;
533 current.push_back(c);
534 } else if (c == ',' && !inQuotes) {
535 // End of argument
536 if (!current.empty()) {
537 // Trim leading/trailing whitespace
538 size_t start = current.find_first_not_of(" \t");
539 size_t end = current.find_last_not_of(" \t");
540 myArguments.push_back(current.substr(start, end - start + 1));
541 current.clear();
542 }
543 } else {
544 current += c;
545 }
546 }
547 // Add the last argument
548 if (!current.empty()) {
549 size_t start = current.find_first_not_of(" \t");
550 size_t end = current.find_last_not_of(" \t");
551 myArguments.push_back(current.substr(start, end - start + 1));
552 }
553 // inQuotes MUST be false, in other case we have a case like < "argument1", argument2, "argument3 >
554 if (inQuotes) {
555 writeError("parseArguments", 0, "<\"argument\", \"argument\">");
556 myArguments.clear();
557 }
558}
559
560
561void
564 // print in console the following lines
565 std::cout << "TestFunctions: Netedit opened successfully" << std::endl;
566 std::cout << "Finding reference" << std::endl;
567 std::cout << "TestFunctions: 'reference.png' found. Position: " <<
568 toString(MOUSE_REFERENCE_X) << " - " <<
569 toString(MOUSE_REFERENCE_Y) << std::endl;
570 // set first mouse position
572}
573
574
575void
578 myUpdateView = false;
579 std::cout << "TestFunctions: Netedit closed successfully" << std::endl;
580}
581
582
583void
584InternalTestStep::mouseClick(const std::string& button, const std::string& modifier) const {
585 if ((myArguments.size() != 2) || (myTestSystem->getViewPositions().count(myArguments[1]) == 0)) {
586 writeError("leftClick", 0, "<reference, position>");
587 } else {
588 // parse view position
589 const auto& viewPosition = myTestSystem->getViewPositions().at(myArguments[1]);
590 // build mouse click
591 buildMouseClick(viewPosition, 0, 0, button, modifier);
592 // print info
593 writeClickInfo(viewPosition, 0, 0, modifier);
594 }
595}
596
597
598void
599InternalTestStep::leftClickOffset(const std::string& button) const {
600 if ((myArguments.size() != 4) || (myTestSystem->getViewPositions().count(myArguments[1]) == 0) ||
602 writeError("leftClickOffset", 0, "<reference, position, int, int>");
603 } else {
604 // parse view position
605 const auto& viewPosition = myTestSystem->getViewPositions().at(myArguments[1]);
606 const int x = getIntArgument(myArguments[2]);
607 const int y = getIntArgument(myArguments[3]);
608 // build mouse click
609 buildMouseClick(viewPosition, x, y, button, "");
610 // print info
611 writeClickInfo(viewPosition, x, y, button);
612 }
613}
614
615
616void
618 if ((myArguments.size() != 3) || (myTestSystem->getViewPositions().count(myArguments[1]) == 0) ||
619 (myTestSystem->getMovements().count(myArguments[2]) == 0)) {
620 writeError("moveElementHorizontal", 0, "<reference, position, radius>");
621 } else {
622 // get parameters
623 const auto& referencePosition = myTestSystem->getViewPositions().at("netedit.positions.reference");
624 const auto& position = myTestSystem->getViewPositions().at(myArguments[1]);
625 const auto& radius = myTestSystem->getMovements().at(myArguments[2]);
626 // click over reference
627 buildMouseClick(referencePosition, 0, 0, "left", "");
628 // drag and drop
629 buildMouseDragDrop(position, 0, 0, position, radius.getRight(), 0, "");
630 buildMouseDragDrop(position, radius.getRight(), 0, position, radius.getLeft(), 0, "");
631 // write info
632 writeClickInfo(position, 0, 0, "");
633 }
634}
635
636
637void
639 if ((myArguments.size() != 3) || (myTestSystem->getViewPositions().count(myArguments[1]) == 0) ||
640 (myTestSystem->getMovements().count(myArguments[2]) == 0)) {
641 writeError("moveElementVertical", 0, "<reference, position, radius>");
642 } else {
643 // get parameters
644 const auto& referencePosition = myTestSystem->getViewPositions().at("netedit.positions.reference");
645 const auto& position = myTestSystem->getViewPositions().at(myArguments[1]);
646 const auto& radius = myTestSystem->getMovements().at(myArguments[2]);
647 // click over reference
648 buildMouseClick(referencePosition, 0, 0, "left", "");
649 // drag and drop
650 buildMouseDragDrop(position, 0, 0, position, 0, radius.getUp(), "");
651 buildMouseDragDrop(position, radius.getRight(), 0, position, 0, radius.getDown(), "");
652 // write info
653 writeClickInfo(position, 0, 0, "");
654 }
655}
656
657
658void
660 if ((myArguments.size() != 3) || (myTestSystem->getViewPositions().count(myArguments[1]) == 0) ||
661 (myTestSystem->getMovements().count(myArguments[2]) == 0)) {
662 writeError("moveElement", 0, "<reference, position, radius>");
663 } else {
664 // get parameters
665 const auto& referencePosition = myTestSystem->getViewPositions().at("netedit.positions.reference");
666 const auto& position = myTestSystem->getViewPositions().at(myArguments[1]);
667 const auto& radius = myTestSystem->getMovements().at(myArguments[2]);
668 // click over reference
669 buildMouseClick(referencePosition, 0, 0, "left", "");
670 // drag and drop
671 buildMouseDragDrop(position, 0, 0, position, radius.getRight(), 0, "");
672 buildMouseDragDrop(position, radius.getRight(), 0, position, radius.getRight(), radius.getDown(), "");
673 // drag and drop
674 buildMouseDragDrop(position, radius.getRight(), radius.getDown(), position, radius.getLeft(), radius.getDown(), "");
675 buildMouseDragDrop(position, radius.getLeft(), radius.getDown(), position, radius.getLeft(), radius.getUp(), "");
676 }
677}
678
679
680void
682 if (myArguments.size() != 0) {
683 writeError("focusOnFrame", 0, "<>");
684 } else {
685 // focus frame
687 }
688}
689
690
691void
693 if (myArguments.size() != 1) {
694 writeError("typeKey", 0, "<key>");
695 } else {
697 }
698}
699
700
701void
703 if ((myArguments.size() != 3) || (myTestSystem->getViewPositions().count(myArguments[1]) == 0) ||
705 writeError("contextualMenuOperation", 0, "<reference, position, contextualMenuOperations>");
706 } else {
707 // parse arguments
708 const auto& viewPosition = myTestSystem->getViewPositions().at(myArguments[1]);
709 const auto& contextualMenu = myTestSystem->getContextualMenuOperations().at(myArguments[2]);
710 // build mouse click
711 buildMouseClick(viewPosition, 0, 0, "right", "");
712 // jump to the element
713 for (int i = 0; i < contextualMenu.getMainMenuPosition(); i++) {
714 buildPressKeyEvent(Category::APP, "down", false);
715 }
716 // type space for select
717 buildPressKeyEvent(Category::APP, "space", false);
718 // jump to the subMenuA
719 if (contextualMenu.getSubMenuAPosition() > 0) {
720 for (int i = 0; i < contextualMenu.getSubMenuAPosition(); i++) {
721 buildPressKeyEvent(Category::APP, "down", false);
722 }
723 // type space for select
724 buildPressKeyEvent(Category::APP, "space", false);
725 }
726 // jump to the subMenuB
727 if (contextualMenu.getSubMenuBPosition() > 0) {
728 for (int i = 0; i < contextualMenu.getSubMenuBPosition(); i++) {
729 buildPressKeyEvent(Category::APP, "down", false);
730 }
731 // type space for select
732 buildPressKeyEvent(Category::APP, "space", false);
733 }
734 }
735}
736
737
738void
740 if (myArguments.size() != 0) {
741 writeError("protectElements", 0, "<>");
742 } else {
743 // go to delete mode
745 // focus frame
747 // jump to the element
748 for (int i = 0; i < myTestSystem->getAttributesEnum().at("netedit.attrs.frames.delete.protectElements"); i++) {
749 buildPressKeyEvent(Category::APP, "tab", false);
750 }
751 // press enter to confirm changes (updating view)
752 buildPressKeyEvent(Category::APP, "space", true);
753 }
754}
755
756
757void
759 if (myArguments.size() != 0) {
760 writeError("waitDeleteWarning", 0, "<>");
761 } else {
762 // nothing to do (wait for delete warning doesnt' appear in internal test)
763 }
764}
765
766
767void
768InternalTestStep::modifyAttribute(const int overlappedTabs) const {
769 if ((myArguments.size() != 2) || !checkIntArgument(myArguments[0]) ||
771 writeError("modifyAttribute", overlappedTabs, "<int/attributeEnum, \"string\">");
772 } else {
773 // modify attribute
775 }
776}
777
778
779void
780InternalTestStep::modifyBoolAttribute(const int overlappedTabs) const {
781 if ((myArguments.size() != 1) || !checkIntArgument(myArguments[0])) {
782 writeError("modifyBoolAttribute", overlappedTabs, "<int/attributeEnum>");
783 } else {
784 // modify bool attribute
786 }
787}
788
789
790void
791InternalTestStep::modifyColorAttribute(const int overlappedTabs) const {
792 if ((myArguments.size() != 1) || !checkIntArgument(myArguments[0])) {
793 writeError("modifyColorAttribute", overlappedTabs, "<int/attributeEnum>");
794 } else {
795 // open dialog
797 // select vClass
798 new InternalTestStep(myTestSystem, new DialogArgument(DialogType::COLOR, "139,131,120"), "set color");
799 // press accept
801 }
802}
803
804
805void
807 if ((myArguments.size() != 2) || !checkIntArgument(myArguments[0]) ||
809 writeError("modifyVClassDialog_NoDisallowAll", overlappedTabs, "<int/attributeEnum, int/attributeEnum>");
810 } else {
811 // open dialog
813 // select vClass
814 new InternalTestStep(myTestSystem, new DialogArgument(DialogType::VCLASS, "netedit.attrs.dialog.allowVClass.", myArguments[1]), "select vClass");
815 // press accept
817 }
818}
819
820
821void
823 if ((myArguments.size() != 2) || !checkIntArgument(myArguments[0]) ||
825 writeError("modifyVClassDialog_DisallowAll", overlappedTabs, "<int/attributeEnum, int/attributeEnum>");
826 } else {
827 // open dialog
829 // select vClass
830 new InternalTestStep(myTestSystem, new DialogArgument(DialogType::VCLASS, "disallowAll"), "disallow all");
831 // select vClass
832 new InternalTestStep(myTestSystem, new DialogArgument(DialogType::VCLASS, "netedit.attrs.dialog.allowVClass.", myArguments[1]), "select vClass");
833 // press accept
835 }
836}
837
838
839void
840InternalTestStep::modifyVClassDialog_Cancel(const int overlappedTabs) const {
841 if ((myArguments.size() != 2) ||
844 writeError("modifyVClassDialog_Cancel", overlappedTabs, "<int/attributeEnum, int/attributeEnum>");
845 } else {
846 // open dialog
848 // select vClass
849 new InternalTestStep(myTestSystem, new DialogArgument(DialogType::VCLASS, "disallowAll"), "disallow all");
850 // select vClass
851 new InternalTestStep(myTestSystem, new DialogArgument(DialogType::VCLASS, "netedit.attrs.dialog.allowVClass.", myArguments[1]), "select vClass");
852 // press accept
854 }
855}
856
857
858void
859InternalTestStep::modifyVClassDialog_Reset(const int overlappedTabs) const {
860 if ((myArguments.size() != 2) || !checkIntArgument(myArguments[0]) ||
862 writeError("modifyVClassDialog_Reset", overlappedTabs, "<int/attributeEnum, int/attributeEnum>");
863 } else {
864 // open dialog
866 // select vClass
867 new InternalTestStep(myTestSystem, new DialogArgument(DialogType::VCLASS, "disallowAll"), "disallow all");
868 // select vClass
869 new InternalTestStep(myTestSystem, new DialogArgument(DialogType::VCLASS, "netedit.attrs.dialog.allowVClass.", myArguments[1]), "select vClass");
870 // press reset
872 // press accept
874 }
875}
876
877
878void
880 if ((myArguments.size() != 3) || !checkStringArgument(myArguments[0]) ||
882 writeError("modifyVTypeDialogAttribute", 0, "<str, int/attributeEnum, str>");
883 } else {
884 // get arguments
885 const auto operation = getStringArgument(myArguments[0]);
886 const auto tabs = getIntArgument(myArguments[1]);
887 const auto value = getStringArgument(myArguments[2]);
888 // first check if open dialog
889 if (operation == "open") {
890 modifyBoolAttribute(Category::APP, myTestSystem->getAttributesEnum().at("netedit.attrs.type.buttons.dialog"), 0);
891 }
892 // print info
893 std::cout << value << std::endl;
894 // focus dialog
895 buildTwoPressKeyEvent(Category::DIALOG, "alt", "f", false);
896 // jump to the element
897 for (int i = 0; i < tabs; i++) {
899 }
900 // write attribute character by character
901 if (value.empty()) {
902 buildPressKeyEvent(Category::DIALOG, "delete", false);
903 } else {
904 for (const char c : value) {
906 }
907 }
908 // press enter to confirm changes (updating view)
909 buildPressKeyEvent(Category::DIALOG, "enter", false);
910 // finally check if close dialog
911 if (operation == "close") {
912 buildTwoPressKeyEvent(Category::DIALOG, "alt", "a", false);
913 buildPressKeyEvent(Category::DIALOG, "enter", false);
914 }
915 }
916}
917
918
919void
920InternalTestStep::createConnection(const std::string& keyModifier) const {
921 if ((myArguments.size() != 3) ||
922 (myTestSystem->getViewPositions().count(myArguments[1]) == 0) ||
923 (myTestSystem->getViewPositions().count(myArguments[2]) == 0)) {
924 writeError("createConnection", 0, "<reference, position, position>");
925 } else {
926 // parse view position
927 const auto& fromLane = myTestSystem->getViewPositions().at(myArguments[1]);
928 const auto& toLane = myTestSystem->getViewPositions().at(myArguments[2]);
929 // build mouse click from
930 buildMouseClick(fromLane, 0, 0, "left", keyModifier);
931 writeClickInfo(fromLane, 0, 0, "");
932 // build mouse click from
933 buildMouseClick(toLane, 0, 0, "left", keyModifier);
934 writeClickInfo(toLane, 0, 0, "");
935 }
936}
937
938
939void
941 if ((myArguments.size() != 1) || !checkBoolArgument(myArguments[0])) {
942 writeError("createCrossing", 0, "<bool>");
943 } else {
945 modifyBoolAttribute(Category::APP, myTestSystem->getAttributesEnum().at("netedit.attrs.crossing.createTLS.button"), 0);
946 } else {
947 modifyBoolAttribute(Category::APP, myTestSystem->getAttributesEnum().at("netedit.attrs.crossing.create.button"), 0);
948 }
949 }
950}
951
952
953void
955 if ((myArguments.size() != 2) || !checkIntArgument(myArguments[0]) || !checkStringArgument(myArguments[1])) {
956 writeError("modifyCrossingDefaultValue", 0, "<int, value>");
957 } else {
958 const int tabs = getIntArgument(myArguments[0]);
959 const auto value = getStringArgument(myArguments[1]);
960 modifyStringAttribute(Category::APP, tabs, myTestSystem->getAttributesEnum().at("netedit.attrs.crossing.firstField"), value);
961 }
962}
963
964
965void
967 if ((myArguments.size() != 1) || !checkIntArgument(myArguments[0])) {
968 writeError("modifyCrossingDefaultBoolValue", 0, "<int>");
969 } else {
970 const int tabs = getIntArgument(myArguments[0]);
971 modifyBoolAttribute(Category::APP, tabs, myTestSystem->getAttributesEnum().at("netedit.attrs.crossing.firstField"));
972 }
973}
974
975
976void
978 if (myArguments.size() != 0) {
979 writeError("crossingClearEdges", 0, "<>");
980 } else {
981 modifyBoolAttribute(Category::APP, myTestSystem->getAttributesEnum().at("netedit.attrs.crossing.clearEdges"), 0);
982 }
983}
984
985
986void
988 if (myArguments.size() != 0) {
989 writeError("crossingInvertEdges", 0, "<>");
990 } else {
991 modifyBoolAttribute(Category::APP, myTestSystem->getAttributesEnum().at("netedit.attrs.crossing.invertEdges"), 0);
992 }
993}
994
995
996void
998 if (myArguments.size() != 0) {
999 writeError("saveConnectionEdit", 0, "<>");
1000 } else {
1001 modifyBoolAttribute(Category::APP, myTestSystem->getAttributesEnum().at("netedit.attrs.connection.saveConnections"), 0);
1002 }
1003}
1004
1005
1006void
1008 if ((myArguments.size() != 1) || !checkStringArgument(myArguments[0])) {
1009 writeError("fixCrossings", 0, "<str>");
1010 } else {
1011 // save config
1013 Category::APP, "save netedit config");
1014 // fix crossings
1016 // accept changes
1018 }
1019}
1020
1021
1022void
1024 if ((myArguments.size() != 1) || !checkStringArgument(myArguments[0])) {
1025 writeError("fixStoppingPlace", 0, "<str>");
1026 } else {
1027 // save config
1029 Category::APP, "save netedit config");
1030 // fix stoppingPlace
1032 // accept changes
1034 }
1035}
1036
1037
1038void
1040 if ((myArguments.size() != 1) || !checkStringArgument(myArguments[0])) {
1041 writeError("fixRoute", 0, "<str>");
1042 } else {
1043 // save config
1045 Category::APP, "save netedit config");
1046 // fix route
1048 // accept changes
1050 }
1051}
1052
1053
1054void
1055InternalTestStep::createTLS(const int overlappedTabs) const {
1056 if (myArguments.size() != 0) {
1057 writeError("createTLS", overlappedTabs, "<>");
1058 } else {
1059 modifyBoolAttribute(Category::APP, myTestSystem->getAttributesEnum().at("netedit.attrs.TLS.create"), overlappedTabs);
1060 }
1061}
1062
1063
1064void
1066 if ((myArguments.size() != 1) || !checkBoolArgument(myArguments[0])) {
1067 writeError("copyTLS", 0, "<bool>");
1068 } else {
1069 if (getBoolArgument(myArguments[0])) {
1070 modifyBoolAttribute(Category::APP, myTestSystem->getAttributesEnum().at("netedit.attrs.TLS.copyJoined"), 0);
1071 } else {
1072 modifyBoolAttribute(Category::APP, myTestSystem->getAttributesEnum().at("netedit.attrs.TLS.copySingle"), 0);
1073 }
1074 }
1075}
1076
1077
1078void
1080 if (myArguments.size() != 0) {
1081 writeError("joinTSL", 0, "<>");
1082 } else {
1083 modifyBoolAttribute(Category::APP, myTestSystem->getAttributesEnum().at("netedit.attrs.TLS.joinTLS"), 0);
1084 }
1085}
1086
1087
1088void
1090 if (myArguments.size() != 0) {
1091 writeError("disJoinTLS", 0, "<>");
1092 } else {
1093 modifyBoolAttribute(Category::APP, myTestSystem->getAttributesEnum().at("netedit.attrs.TLS.disjoinTLS"), 0);
1094 }
1095}
1096
1097
1098void
1100 if ((myArguments.size() != 1) || !checkBoolArgument(myArguments[0])) {
1101 writeError("deleteTLS", 0, "<bool>");
1102 } else {
1103 if (getBoolArgument(myArguments[0])) {
1104 modifyBoolAttribute(Category::APP, myTestSystem->getAttributesEnum().at("netedit.attrs.TLS.deleteJoined"), 0);
1105 } else {
1106 modifyBoolAttribute(Category::APP, myTestSystem->getAttributesEnum().at("netedit.attrs.TLS.deleteSingle"), 0);
1107 }
1108 }
1109}
1110
1111
1112void
1114 if ((myArguments.size() != 3) || !checkIntArgument(myArguments[0]) ||
1116 writeError("modifyTLSTable", 0, "<row, int/attributeEnum, \"string\">");
1117 } else {
1119 // get row
1120 const int row = getIntArgument(myArguments[0]);
1121 const int column = getIntArgument(myArguments[1]);
1122 const std::string text = getStringArgument(myArguments[2]);
1123 // modify attribute
1124 myTLSTableTest = new TLSTableTest(MID_GNE_TLSTABLE_TEXTFIELD, row, column, text);
1125 // show text
1126 std::cout << text << std::endl;
1127 }
1128}
1129
1130
1131void
1133 if ((myArguments.size() != 1) || !checkBoolArgument(myArguments[0])) {
1134 writeError("resetSingleTLSPhases", 0, "<bool>");
1135 } else {
1136 if (getBoolArgument(myArguments[0])) {
1137 modifyBoolAttribute(myTestSystem->getAttributesEnum().at("netedit.attrs.TLS.resetPhaseSingle"));
1138 } else {
1139 modifyBoolAttribute(myTestSystem->getAttributesEnum().at("netedit.attrs.TLS.resetPhaseJoined"));
1140 }
1141 }
1142}
1143
1144
1145void
1147 if ((myArguments.size() != 1) || !checkBoolArgument(myArguments[0])) {
1148 writeError("resetAllTLSPhases", 0, "<bool>");
1149 } else {
1150 if (getBoolArgument(myArguments[0])) {
1151 modifyBoolAttribute(myTestSystem->getAttributesEnum().at("netedit.attrs.TLS.resetAllJoined"));
1152 } else {
1153 modifyBoolAttribute(myTestSystem->getAttributesEnum().at("netedit.attrs.TLS.resetAllSingle"));
1154 }
1155 }
1156}
1157
1158
1159void
1161 if ((myArguments.size() != 1) || !checkIntArgument(myArguments[0])) {
1162 writeError("pressTLSPhaseButton", 0, "<int/attributeEnum>");
1163 } else {
1165 }
1166}
1167
1168
1169void
1170InternalTestStep::addPhase(const std::string& type) {
1171 if ((myArguments.size() != 1) || !checkIntArgument(myArguments[0])) {
1172 writeError("addPhase" + type, 0, "<int/attributeEnum>");
1173 } else {
1175 // get row
1176 const int row = getIntArgument(myArguments[0]);
1177 // continue depending of the type of phase
1178 if (type == "default") {
1180 } else if (type == "duplicate") {
1182 } else if (type == "red") {
1184 } else if (type == "yellow") {
1186 } else if (type == "green") {
1188 } else if (type == "priorityGreen") {
1190 } else if (type == "deletePhase") {
1192 } else if (type == "moveUp") {
1194 } else if (type == "moveDown") {
1196 }
1197 }
1198}
1199
1200
1201void
1202InternalTestStep::pressTLSButton(const std::string& type) {
1203 if (myArguments.size() != 0) {
1204 writeError("pressTLSButton" + type, 0, "<>");
1205 } else {
1207 // continue depending of the type of phase
1208 if (type == "cleanStates") {
1210 } else if (type == "addStates") {
1212 } else if (type == "groupSignal") {
1214 } else if (type == "ungroupSignal") {
1216 }
1217 }
1218}
1219
1220
1221void
1222InternalTestStep::checkParameters(const int overlappedTabs) const {
1223 if ((myArguments.size() != 2) || !checkIntArgument(myArguments[1])) {
1224 writeError("checkParameters", overlappedTabs, "<int/attributeEnum>");
1225 } else {
1226 const int tabs = getIntArgument(myArguments[1]);
1227 // check different values
1228 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "dummyGenericParameters");
1229 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "key1|key2|key3");
1230 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "key1=value1|key2=value2|key3=value3");
1231 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "key1=|key2=|key3=");
1232 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "");
1233 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "key1duplicated=value1|key1duplicated=value2|key3=value3");
1234 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "key1=valueDuplicated|key2=valueDuplicated|key3=valueDuplicated");
1235 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "keyInvalid.;%>%$$=value1|key2=value2|key3=value3");
1236 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "key1=valueInvalid%;%$<>$$%|key2=value2|key3=value3");
1237 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "keyFinal1=value1|keyFinal2=value2|keyFinal3=value3");
1238 // check undo-redo
1239 buildUndo(9);
1240 buildRedo(9);
1241 }
1242}
1243
1244
1245void
1246InternalTestStep::checkDoubleParameters(const int overlappedTabs) const {
1247 if ((myArguments.size() != 2) || !checkIntArgument(myArguments[1])) {
1248 writeError("checkDoubleParameters", overlappedTabs, "<int/attributeEnum>");
1249 } else {
1250 const int tabs = getIntArgument(myArguments[1]);
1251 // check different values
1252 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "dummyGenericParameters");
1253 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "key1|key2|key3");
1254 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "key1=1|key2=2|key3=3");
1255 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "key1=|key2=|key3=");
1256 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "");
1257 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "key1duplicated=1|key1duplicated=2|key3=3");
1258 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "key1=Duplicated|key2=Duplicated|key3=Duplicated");
1259 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "keyInvalid.;%>%$$=1|key2=2|key3=3");
1260 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "key1=Invalid%;%$<>$$%|key2=2|key3=3");
1261 modifyStringAttribute(Category::APP, tabs, overlappedTabs, "keyFinal1=1|keyFinal2=2|keyFinal3=3");
1262 // check undo-redo
1263 buildUndo(9);
1264 buildRedo(9);
1265 }
1266}
1267
1268
1269void
1271 if ((myArguments.size() != 1) || (myTestSystem->getAttributesEnum().count(myArguments[0]) == 0)) {
1272 writeError("changeEditMode", 0, "<int/attributeEnum>");
1273 } else {
1275 // network
1276 if (myArguments[0] == "netedit.attrs.modes.network.grid") {
1278 } else if (myArguments[0] == "netedit.attrs.modes.network.junctionShape") {
1280 } else if (myArguments[0] == "netedit.attrs.modes.network.spreadVehicle") {
1282 } else if (myArguments[0] == "netedit.attrs.modes.network.showDemandElements") {
1284 } else if (myArguments[0] == "netedit.attrs.modes.network.selectLane") {
1286 } else if (myArguments[0] == "netedit.attrs.modes.network.showConnections") {
1288 } else if (myArguments[0] == "netedit.attrs.modes.network.hideConnetions") {
1290 } else if (myArguments[0] == "netedit.attrs.modes.network.showSubAdditionals") {
1292 } else if (myArguments[0] == "netedit.attrs.modes.network.showTAZElements") {
1294 } else if (myArguments[0] == "netedit.attrs.modes.network.automaticSelectJunctions") {
1296 } else if (myArguments[0] == "netedit.attrs.modes.network.applyAllPhases") {
1298 } else if (myArguments[0] == "netedit.attrs.modes.network.mergingJunction") {
1300 } else if (myArguments[0] == "netedit.attrs.modes.network.showBubbles") {
1302 } else if (myArguments[0] == "netedit.attrs.modes.network.moveElevation") {
1304 } else if (myArguments[0] == "netedit.attrs.modes.network.chainMode") {
1306 } else if (myArguments[0] == "netedit.attrs.modes.network.twoWayMode") {
1308 // demand
1309 } else if (myArguments[0] == "netedit.attrs.modes.demand.grid") {
1311 } else if (myArguments[0] == "netedit.attrs.modes.demand.junctionShape") {
1313 } else if (myArguments[0] == "netedit.attrs.modes.demand.spreadVehicle") {
1315 } else if (myArguments[0] == "netedit.attrs.modes.demand.showNonInspected") {
1317 } else if (myArguments[0] == "netedit.attrs.modes.demand.showShapes") {
1319 } else if (myArguments[0] == "netedit.attrs.modes.demand.showAllTrips") {
1321 } else if (myArguments[0] == "netedit.attrs.modes.demand.showPersonPlans") {
1323 } else if (myArguments[0] == "netedit.attrs.modes.demand.lockPerson") {
1325 } else if (myArguments[0] == "netedit.attrs.modes.demand.showContainerPlans") {
1327 } else if (myArguments[0] == "netedit.attrs.modes.demand.lockContainer") {
1329 } else if (myArguments[0] == "netedit.attrs.modes.demand.showOverlappedRoutes") {
1331 // data
1332 } else if (myArguments[0] == "netedit.attrs.modes.data.junctionShape") {
1334 } else if (myArguments[0] == "netedit.attrs.modes.data.showAdditionals") {
1336 } else if (myArguments[0] == "netedit.attrs.modes.data.showShapes") {
1338 } else if (myArguments[0] == "netedit.attrs.modes.data.showDemandElements") {
1340 } else if (myArguments[0] == "netedit.attrs.modes.data.TAZRelDrawingMode") {
1342 } else if (myArguments[0] == "netedit.attrs.modes.data.TAZFill") {
1344 } else if (myArguments[0] == "netedit.attrs.modes.data.TAZRelOnlyFrom") {
1346 } else if (myArguments[0] == "netedit.attrs.modes.data.TAZRelOnlyTo") {
1348 } else {
1349 writeError("changeEditMode", 0, "<enum>");
1350 }
1351 }
1352}
1353
1354
1355void
1357 if ((myArguments.size() != 1) ||
1359 writeError("save", 0, "<\"string\">");
1360 } else {
1362 const auto savingType = getStringArgument(myArguments[0]);
1363 if (savingType == "network") {
1365 } else if (savingType == "additionals") {
1367 } else if (savingType == "demands") {
1369 } else if (savingType == "datas") {
1371 } else if (savingType == "meanDatas") {
1373 } else if (savingType == "sumoConfig") {
1375 } else if (savingType == "neteditConfig") {
1377 } else {
1378 writeError("save", 0, "<neteditConfig>");
1379 }
1380 }
1381}
1382
1383
1384void
1386 if (myArguments.size() != 1) {
1387 writeError("checkUndoRedo", 0, "<referencePosition>");
1388 } else {
1389 const int numUndoRedos = 9;
1390 buildUndo(numUndoRedos);
1391 buildRedo(numUndoRedos);
1392 }
1393}
1394
1395
1396void
1398 if (myArguments.size() != 0) {
1399 writeError("delete", 0, "<>");
1400 } else {
1401 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_HOTKEY_DEL, Category::APP, "delete element");
1402 }
1403}
1404
1405
1406void
1408 if (myArguments.size() != 1 || !checkStringArgument(myArguments[0])) {
1409 writeError("selection", 0, "<selection operation>");
1410 } else {
1411 const std::string selectionType = getStringArgument(myArguments[0]);
1412 // get number of tabls
1413 int numTabs = 0;
1414 if (selectionType == "default") {
1415 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.selection.basic.default");
1416 } else if (selectionType == "save") {
1417 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.selection.basic.save");
1418 } else if (selectionType == "load") {
1419 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.selection.basic.load");
1420 } else if (selectionType == "add") {
1421 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.selection.basic.add");
1422 } else if (selectionType == "remove") {
1423 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.selection.basic.remove");
1424 } else if (selectionType == "keep") {
1425 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.selection.basic.keep");
1426 } else if (selectionType == "replace") {
1427 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.selection.basic.replace");
1428 } else if (selectionType == "clear") {
1429 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.selection.basic.clear");
1430 } else if (selectionType == "invert") {
1431 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.selection.basic.invert");
1432 } else if (selectionType == "invertData") {
1433 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.selection.basic.invertData");
1434 } else if (selectionType == "delete") {
1435 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.selection.basic.delete");
1436 }
1437 // focus frame
1438 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_HOTKEY_SHIFT_F12_FOCUSUPPERELEMENT, Category::APP, "focus selection frame");
1439 // jump to the element
1440 for (int i = 0; i < numTabs; i++) {
1441 buildPressKeyEvent(Category::APP, "tab", false);
1442 }
1443 if (selectionType == "save") {
1444 buildPressKeyEvent(Category::APP, "enter", false);
1445 // complete
1446 } else if (selectionType == "load") {
1447 buildPressKeyEvent(Category::APP, "enter", false);
1448 // complete
1449 } else {
1450 buildPressKeyEvent(Category::APP, "space", true);
1451 }
1452 }
1453}
1454
1455
1456void
1458 if (myArguments.size() != 3 || !checkStringArgument(myArguments[0]) ||
1460 writeError("selectNetworkItems", 0, "<element/int, \"attribute\", \"value\">");
1461 } else {
1462 const std::string element = getStringArgument(myArguments[0]);
1463 const std::string attribute = getStringArgument(myArguments[1]);
1464 const std::string value = getStringArgument(myArguments[2]);
1465 // focus frame
1466 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_HOTKEY_SHIFT_F12_FOCUSUPPERELEMENT, Category::APP, "focus selelection frame");
1467 // got to type
1468 for (int i = 0; i < myTestSystem->getAttributesEnum().at("netedit.attrs.frames.selection.networkItem.type"); i++) {
1469 buildPressKeyEvent(Category::APP, "tab", false);
1470 }
1471 // set network element
1472 for (const char c : "Network elements") {
1473 buildPressKeyEvent(Category::APP, {c}, false);
1474 }
1475 // show info
1476 std::cout << "Network elements" << std::endl;
1477 // got to type
1478 for (int i = 0; i < myTestSystem->getAttributesEnum().at("netedit.attrs.frames.selection.networkItem.subType"); i++) {
1479 buildPressKeyEvent(Category::APP, "tab", false);
1480 }
1481 // set network element
1482 for (const char c : element) {
1483 buildPressKeyEvent(Category::APP, {c}, false);
1484 }
1485 // show info
1486 std::cout << element << std::endl;
1487 // got to attribute
1488 for (int i = 0; i < myTestSystem->getAttributesEnum().at("netedit.attrs.frames.selection.networkItem.attribute"); i++) {
1489 buildPressKeyEvent(Category::APP, "tab", false);
1490 }
1491 // set attribute
1492 for (const char c : attribute) {
1493 buildPressKeyEvent(Category::APP, {c}, false);
1494 }
1495 // show info
1496 std::cout << attribute << std::endl;
1497 // got to value
1498 for (int i = 0; i < myTestSystem->getAttributesEnum().at("netedit.attrs.frames.selection.networkItem.value"); i++) {
1499 buildPressKeyEvent(Category::APP, "tab", false);
1500 }
1501 // set value
1502 for (const char c : value) {
1503 buildPressKeyEvent(Category::APP, {c}, false);
1504 }
1505 // show info
1506 std::cout << value << std::endl;
1507 // press enter to confirm changes (updating view)
1508 buildPressKeyEvent(Category::APP, "enter", true);
1509 }
1510}
1511
1512
1513void
1515 if (myArguments.size() != 1 || !checkIntArgument(myArguments[0])) {
1516 writeError("lockSelection", 0, "<element/int, \"attribute\", \"value\">");
1517 } else {
1518 // get argument
1519 const auto lockType = getIntArgument(myArguments[0]);
1520 // continue depending of lock type
1521 if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.junctions")) {
1522 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_LOCK_JUNCTION, Category::APP, "lock junctions");
1523 } else if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.edges")) {
1524 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_LOCK_EDGE, Category::APP, "lock edges");
1525 } else if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.lanes")) {
1526 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_LOCK_LANE, Category::APP, "lock lanes");
1527 } else if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.connections")) {
1528 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_LOCK_CONNECTION, Category::APP, "lock connections");
1529 } else if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.crossings")) {
1530 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_LOCK_CROSSING, Category::APP, "lock crossings");
1531 } else if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.walkingAreas")) {
1532 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_LOCK_WALKINGAREA, Category::APP, "lock walking areas");
1533 } else if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.additionals")) {
1534 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_LOCK_ADDITIONALELEMENT, Category::APP, "lock additionals");
1535 } else if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.tazs")) {
1536 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_LOCK_TAZ, Category::APP, "lock TAZs");
1537 } else if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.wires")) {
1538 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_LOCK_WIRE, Category::APP, "lock wires");
1539 } else if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.polygons")) {
1540 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_LOCK_POLYGON, Category::APP, "lock polygons");
1541 } else if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.pois")) {
1542 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_LOCK_POI, Category::APP, "lock POIs");
1543 } else if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.walkableAreas")) {
1544 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_LOCK_JPS_WALKABLEAREA, Category::APP, "lock walkableAreas");
1545 } else if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.obstacles")) {
1546 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_LOCK_JPS_OBSTACLE, Category::APP, "lock obstacles");
1547 } else if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.selected")) {
1548 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_LOCK_SELECTEDELEMENTS, Category::APP, "lock selected elements");
1549 } else if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.lockAll")) {
1550 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_LOCK_ALLELEMENTS, Category::APP, "lock all elements");
1551 } else if (lockType == myTestSystem->getAttributesEnum().at("netedit.attrs.selection.lockSelectionNetwork.unlockAll")) {
1552 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_GNE_UNLOCK_ALLELEMENTS, Category::APP, "unlock all elements");
1553 }
1554 }
1555}
1556
1557
1558void
1560 if (myArguments.size() != 3 || (myTestSystem->getViewPositions().count(myArguments[1]) == 0) ||
1561 (myTestSystem->getViewPositions().count(myArguments[2]) == 0)) {
1562 writeError("selectionRectangle", 0, "<viewPosition, viewPosition>");
1563 } else {
1564 // get position
1565 const auto& from = myTestSystem->getViewPositions().at(myArguments[1]);
1566 const auto& to = myTestSystem->getViewPositions().at(myArguments[2]);
1567 // go to selection mode
1569 // drag and drop
1570 buildMouseDragDrop(from, 0, 0, to, 0, 0, "shift");
1571 }
1572}
1573
1574
1575void
1577 if ((myArguments.size() != 1) || !checkStringArgument(myArguments[0])) {
1578 writeError("createDataSet", 0, "<dataSetId>");
1579 } else {
1580 // get dataSetId
1581 const auto& dataSetId = getStringArgument(myArguments[0]);
1582 // show info
1583 std::cout << dataSetId << std::endl;
1584 // focus frame
1586 // jump to select additional argument
1587 for (int i = 0; i < 2; i++) {
1588 buildPressKeyEvent(Category::APP, "tab", false);
1589 }
1590 // create new dataSet
1591 buildPressKeyEvent(Category::APP, "space", true);
1592 // write additional character by character
1593 for (const char c : dataSetId) {
1594 buildPressKeyEvent(Category::APP, {c}, false);
1595 }
1596 // go to create new dataSet
1597 buildPressKeyEvent(Category::APP, "tab", false);
1598 // press enter to confirm changes (updating view)
1599 buildPressKeyEvent(Category::APP, "space", true);
1600 }
1601}
1602
1603
1604void
1607 writeError("createDataInterval", 0, "<begin, end>");
1608 } else {
1609 // get begin and end
1610 const auto& begin = getStringArgument(myArguments[0]);
1611 const auto& end = getStringArgument(myArguments[1]);
1612 // show info
1613 std::cout << begin << std::endl;
1614 std::cout << end << std::endl;
1615 // focus frame
1617 // jump to create interval
1618 for (int i = 0; i < 6; i++) {
1619 buildPressKeyEvent(Category::APP, "tab", false);
1620 }
1621 // create new interval
1622 buildPressKeyEvent(Category::APP, "space", true);
1623 // go to begin
1624 buildPressKeyEvent(Category::APP, "tab", false);
1625 // write begin character by character
1626 for (const char c : begin) {
1627 buildPressKeyEvent(Category::APP, {c}, false);
1628 }
1629 // go to begin
1630 buildPressKeyEvent(Category::APP, "tab", false);
1631 // write end character by character
1632 for (const char c : end) {
1633 buildPressKeyEvent(Category::APP, {c}, false);
1634 }
1635 // go to create button
1636 buildPressKeyEvent(Category::APP, "tab", false);
1637 // press button
1638 buildPressKeyEvent(Category::APP, "space", true);
1639 }
1640}
1641
1642
1643void
1645 if (myArguments.size() != 0) {
1646 writeError("openAboutDialog", 0, "<>");
1647 } else {
1650 // close dialog
1652 }
1653}
1654
1655
1656void
1658 if ((myArguments.size() != 5) || !checkIntArgument(myArguments[4])) {
1659 writeError("loadFile", 0, "<referencePosition, type, file, extension, extensionIndex>");
1660 } else {
1662 // get type and file
1663 const auto type = getStringArgument(myArguments[1]);
1664 const auto file = getStringArgument(myArguments[2]);
1665 const auto extension = getStringArgument(myArguments[3]);
1666 const auto extensionIndex = getIntArgument(myArguments[4]);
1667 // get working directory
1668 std::string workingDirectory = FXSystem::getCurrentDirectory().text();
1669 const auto sandboxDirectory = std::getenv("TEXTTEST_SANDBOX");
1670 if (sandboxDirectory) {
1671 workingDirectory = sandboxDirectory;
1672 }
1673 // continue depending of type
1674 if (type == "neteditConfig") {
1676 } else if (type == "sumoConfig") {
1678 } else if (type == "netconvertConfig") {
1680 } else if (type == "network") {
1682 } else if (type == "trafficLights") {
1684 } else if (type == "edgeTypes") {
1686 } else if (type == "additional") {
1688 } else if (type == "demand") {
1690 } else if (type == "data") {
1692 } else if (type == "meanData") {
1694 } else {
1695 WRITE_ERRORF("Invalid type '%' used in function loadFile", type);
1696 }
1697 // write info
1698 std::cout << file << "." << extension << std::endl;
1699 // set filename dialog
1700 new InternalTestStep(myTestSystem, new DialogArgument(DialogType::FILE, workingDirectory + "/" + file + "." + extension, extensionIndex), "filepath");
1702 }
1703}
1704
1705
1706void
1708 if ((myArguments.size() != 4) || !checkIntArgument(myArguments[3])) {
1709 writeError("saveNewFile", 0, "<referencePosition, type, extension, extensionIndex>");
1710 } else {
1712 // get type and file
1713 const auto type = getStringArgument(myArguments[1]);
1714 const auto extension = getStringArgument(myArguments[2]);
1715 const auto extensionIndex = getIntArgument(myArguments[3]);
1716 std::string file;
1717 // get working directory
1718 std::string workingDirectory = FXSystem::getCurrentDirectory().text();
1719 const auto sandboxDirectory = std::getenv("TEXTTEST_SANDBOX");
1720 if (sandboxDirectory) {
1721 workingDirectory = sandboxDirectory;
1722 }
1723 // continue depending of type
1724 if (type == "neteditConfig") {
1726 file = "netedit2." + extension;
1727 } else if (type == "sumoConfig") {
1729 file = "sumo2." + extension;
1730 } else if (type == "xml") {
1732 file = "net2." + extension;
1733 } else if (type == "joinedJunctions") {
1735 file = "joinedjunctions2." + extension;
1736 } else if (type == "network") {
1738 file = "net2." + extension;
1739 } else if (type == "trafficLights") {
1741 file = "trafficlights2." + extension;
1742 } else if (type == "edgeTypes") {
1744 file = "edgetypes2." + extension;
1745 } else if (type == "additional") {
1747 file = "additionals2." + extension;
1748 } else if (type == "demand") {
1750 file = "routes2." + extension;
1751 } else if (type == "data") {
1753 file = "datas2." + extension;
1754 } else if (type == "meanData") {
1756 file = "meandatas2.dat." + extension;
1757 } else {
1758 WRITE_ERRORF("Invalid type '%' used in function loadFile", type);
1759 }
1760 // write info
1761 std::cout << file << std::endl;
1762 // set filename dialog
1763 new InternalTestStep(myTestSystem, new DialogArgument(DialogType::FILE, workingDirectory + "/" + file, extensionIndex), "filepath");
1765 }
1766}
1767
1768
1769void
1771 if (myArguments.size() != 3) {
1772 writeError("saveFileAs", 0, "<referencePosition, type, bool>");
1773 } else {
1775 // get type and file
1776 const auto type = getStringArgument(myArguments[1]);
1777 std::string file;
1778 // get working directory
1779 std::string workingDirectory = FXSystem::getCurrentDirectory().text();
1780 const auto sandboxDirectory = std::getenv("TEXTTEST_SANDBOX");
1781 if (sandboxDirectory) {
1782 workingDirectory = sandboxDirectory;
1783 }
1784 // continue depending of type
1785 if (type == "neteditConfig") {
1787 file = "netedit3.netecfg";
1788 } else if (type == "sumoConfig") {
1790 file = "sumo3.sumocfg";
1791 } else if (type == "network") {
1793 file = "net3.net.xml";
1794 } else if (type == "trafficLights") {
1796 file = "trafficlights3.tll.xml";
1797 } else if (type == "edgeTypes") {
1799 file = "edgetypes3.typ.xml";
1800 } else if (type == "additional") {
1802 file = "additionals3.add.xml";
1803 } else if (type == "jupedsim") {
1805 file = "additionals3.add.xml";
1806 } else if (type == "demand") {
1808 file = "routes3.rou.xml";
1809 } else if (type == "data") {
1811 file = "datas3.dat.xml";
1812 } else if (type == "meanData") {
1814 file = "meandatas3.dat.add.xml";
1815 } else {
1816 WRITE_ERRORF("Invalid type '%' used in function loadFile", type);
1817 }
1818 // write info
1819 std::cout << file << std::endl;
1820 // set filename dialog
1821 new InternalTestStep(myTestSystem, new DialogArgument(DialogType::FILE, workingDirectory + "/" + file), "filepath");
1823 }
1824}
1825
1826
1827void
1829 if (myArguments.size() != 3) {
1830 writeError("reloadFile", 0, "<referencePosition, type, bool>");
1831 } else {
1833 // get type and file
1834 const auto type = getStringArgument(myArguments[1]);
1835 // continue depending of type
1836 if (type == "neteditConfig") {
1838 } else if (type == "sumoConfig") {
1840 } else if (type == "network") {
1842 } else if (type == "edgeTypes") {
1844 } else if (type == "trafficLights") {
1846 } else if (type == "additional") {
1848 } else if (type == "demand") {
1850 } else if (type == "data") {
1852 } else if (type == "meanData") {
1854 } else {
1855 WRITE_ERRORF("Invalid type '%' used in function reloadFile", type);
1856 }
1857 }
1858}
1859
1860
1861void
1863 if (myArguments.size() != 0) {
1864 writeError("selectEdgeType", 0, "<>");
1865 } else {
1867 // got to type
1868 for (int i = 0; i < myTestSystem->getAttributesEnum().at("netedit.attrs.edge.edgeType.select"); i++) {
1869 buildPressKeyEvent(Category::APP, "tab", false);
1870 }
1871 // select edge type
1872 buildPressKeyEvent(Category::APP, "space", true);
1873 }
1874}
1875
1876
1877void
1879 if (myArguments.size() != 1 && checkBoolArgument(myArguments[0])) {
1880 writeError("createNewEdgeType", 0, "<bool>");
1881 } else {
1882 const auto existent = getBoolArgument(myArguments[0]);
1884 if (existent) {
1885 for (int i = 0; i < myTestSystem->getAttributesEnum().at("netedit.attrs.edge.edgeType.createExistent"); i++) {
1886 buildPressKeyEvent(Category::APP, "tab", false);
1887 }
1888 } else {
1889 for (int i = 0; i < myTestSystem->getAttributesEnum().at("netedit.attrs.edge.edgeType.createNew"); i++) {
1890 buildPressKeyEvent(Category::APP, "tab", false);
1891 }
1892 }
1893 // select edge type
1894 buildPressKeyEvent(Category::APP, "space", true);
1895 }
1896}
1897
1898
1899void
1905
1906
1907void
1913
1914
1915void
1921
1922
1923void
1929
1930
1931void
1933 if ((myArguments.size() != 2) || !checkIntArgument(myArguments[1])) {
1934 writeError("undo", 0, "<referencePosition, int>");
1935 } else {
1936 // do undo
1938 }
1939}
1940
1941
1942void
1944 if ((myArguments.size() != 2) || !checkIntArgument(myArguments[1])) {
1945 writeError("redo", 0, "<referencePosition, int>");
1946 } else {
1947 // do redo
1949 }
1950}
1951
1952
1953void
1955 if ((myArguments.size() != 1) ||
1957 writeError("supermode", 0, "<\"string\">");
1958 } else {
1960 const std::string supermode = getStringArgument(myArguments[0]);
1961 if (supermode == "network") {
1963 } else if (supermode == "demand") {
1965 } else if (supermode == "data") {
1967 } else {
1968 writeError("supermode", 0, "<network/demand/data>");
1969 }
1970 }
1971}
1972
1973
1974void
1976 if ((myArguments.size() != 1) ||
1978 writeError("changeMode", 0, "<\"string\">");
1979 } else {
1980 // set category and enable upate view
1982 myUpdateView = true;
1983 // get mode
1984 const std::string mode = getStringArgument(myArguments[0]);
1985 // set description
1986 myDescription = "Change mode to '" + mode + "'";
1987 // continue depending of mode
1988 if (mode == "inspect") {
1990 } else if (mode == "delete") {
1992 } else if (mode == "select") {
1994 } else if (mode == "move") {
1996 } else if ((mode == "createEdge") || (mode == "edgeData")) {
1998 } else if ((mode == "trafficLight") || (mode == "type") || (mode == "TLS")) {
2000 } else if ((mode == "connection") || (mode == "container")) {
2002 } else if ((mode == "prohibition") || (mode == "containerPlan")) {
2004 } else if ((mode == "crossing") || (mode == "route") || (mode == "edgeRelData")) {
2006 } else if ((mode == "additional") || (mode == "stop")) {
2008 } else if ((mode == "wire") || (mode == "routeDistribution")) {
2010 } else if ((mode == "taz") || (mode == "TAZ") || (mode == "TAZRelData")) {
2012 } else if ((mode == "shape") || (mode == "person")) {
2014 } else if ((mode == "decal") || (mode == "typeDistribution")) {
2016 } else if (mode == "personPlan") {
2018 } else if (mode == "vehicle") {
2020 } else if (mode == "meanData") {
2022 } else {
2023 writeError("changeMode", 0, "<inspect/delete/select/move...>");
2024 }
2025 }
2026}
2027
2028
2029void
2031 if ((myArguments.size() != 2) ||
2033 writeError("changeElement", 0, "<\"frame\", \"string\">");
2034 } else {
2035 const std::string frame = getStringArgument(myArguments[0]);
2036 const std::string element = getStringArgument(myArguments[1]);
2037 int numTabs = -1;
2038 // continue depending of frame
2039 if (frame == "additionalFrame") {
2040 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.changeElement.additional");
2041 } else if (frame == "shapeFrame") {
2042 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.changeElement.shape");
2043 } else if (frame == "vehicleFrame") {
2044 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.changeElement.vehicle");
2045 } else if (frame == "routeFrame") {
2046 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.changeElement.route");
2047 } else if (frame == "personFrame") {
2048 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.changeElement.person");
2049 } else if (frame == "containerFrame") {
2050 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.changeElement.container");
2051 } else if (frame == "personPlanFrame") {
2052 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.changeElement.personPlan");
2053 } else if (frame == "containerPlanFrame") {
2054 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.changeElement.containerPlan");
2055 } else if (frame == "stopFrame") {
2056 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.changeElement.stop");
2057 } else if (frame == "meanDataFrame") {
2058 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.changeElement.meanData");
2059 } else {
2060 WRITE_ERRORF("Invalid frame '%' used in function changeElement", frame);
2061 }
2062 if (numTabs >= 0) {
2063 // show info
2064 std::cout << element << std::endl;
2065 // focus frame
2067 // jump to select additional argument
2068 for (int i = 0; i < numTabs; i++) {
2069 buildPressKeyEvent(Category::APP, "tab", false);
2070 }
2071 // write additional character by character
2072 for (const char c : element) {
2073 buildPressKeyEvent(Category::APP, {c}, false);
2074 }
2075 // press enter to confirm changes (updating view)
2076 buildPressKeyEvent(Category::APP, "enter", true);
2077 }
2078 }
2079}
2080
2081
2082void
2084 if ((myArguments.size() != 3) ||
2088 writeError("changePlan", 0, "<\"type\", \"plan\", true/false>");
2089 } else {
2090 // get arguments
2091 const std::string type = getStringArgument(myArguments[0]);
2092 const std::string plan = getStringArgument(myArguments[1]);
2093 const bool flow = getBoolArgument(myArguments[2]);
2094 // check plan
2095 if ((type != "person") && (type != "container")) {
2096 WRITE_ERRORF("invalid plan type '%' used in changePlan()", type);
2097 } else {
2098 // calculate num tabs
2099 int numTabs = 0;
2100 if (flow) {
2101 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.changePlan." + type + "Flow");
2102 } else {
2103 numTabs = myTestSystem->getAttributesEnum().at("netedit.attrs.frames.changePlan." + type);
2104 }
2105 // focus frame
2107 // jump to select additional argument
2108 for (int i = 0; i < numTabs; i++) {
2109 buildPressKeyEvent(Category::APP, "tab", false);
2110 }
2111 // write additional character by character
2112 for (const char c : plan) {
2113 buildPressKeyEvent(Category::APP, {c}, false);
2114 }
2115 // print info
2116 std::cout << plan << std::endl;
2117 // press enter to confirm changes (updating view)
2118 buildPressKeyEvent(Category::APP, "enter", true);
2119 }
2120 }
2121}
2122
2123
2124void
2126 if (myArguments.size() > 0) {
2127 writeError("computeJunctions", 0, "<>");
2128 } else {
2131 }
2132}
2133
2134
2135void
2137 if (myArguments.size() != 1) {
2138 writeError("computeJunctionsVolatileOptions", 0, "<yes/no/esc>");
2139 } else {
2142 // get argument
2143 const auto dialogArgument = getStringArgument(myArguments[0]);
2144 // press space to confirm changes (updating view)
2145 if (dialogArgument == "yes") {
2147 } else if (dialogArgument == "no") {
2149 } else {
2151 }
2152 }
2153}
2154
2155
2156void
2158 if ((myArguments.size() != 2) ||
2161 writeError("selectAdditionalChild", 0, "<int, int>");
2162 } else {
2163 const auto tabs = getIntArgument(myArguments[0]);
2164 const auto downs = getIntArgument(myArguments[1]);
2165 // focus frame
2166 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_HOTKEY_SHIFT_F12_FOCUSUPPERELEMENT, Category::APP, "select additional child");
2167 // jump to the element
2168 for (int i = 0; i < tabs; i++) {
2169 buildPressKeyEvent(Category::APP, "tab", false);
2170 }
2171 // jump to the element
2172 for (int i = 0; i < downs; i++) {
2173 buildPressKeyEvent(Category::APP, "down", false);
2174 }
2175 // select additional child
2176 buildPressKeyEvent(Category::APP, "space", true);
2177 // leave
2178 buildPressKeyEvent(Category::APP, "tab", true);
2179 }
2180}
2181
2182
2183void
2185 if ((myArguments.size() != 5) ||
2186 (myTestSystem->getViewPositions().count(myArguments[1]) == 0) ||
2190 writeError("createRectangledShape", 0, "<viewPosition, sizeX, sizeY, true/false>");
2191 } else {
2192 // create shape
2197 false);
2198 }
2199}
2200
2201
2202void
2204 if ((myArguments.size() != 4) ||
2205 (myTestSystem->getViewPositions().count(myArguments[1]) == 0) ||
2208 writeError("createSquaredShape", 0, "<viewPosition, size, true/false>");
2209 } else {
2210 // create shape
2215 false);
2216 }
2217}
2218
2219
2220void
2222 if ((myArguments.size() != 5) ||
2223 (myTestSystem->getViewPositions().count(myArguments[1]) == 0) ||
2227 writeError("createLineShape", 0, "<viewPosition, sizeX, sizeY, true/false>");
2228 } else {
2229 // create shape
2234 true);
2235 }
2236}
2237
2238
2239void
2241 if (myArguments.size() != 0) {
2242 writeError("createMeanData", 0, "<>");
2243 } else {
2245 }
2246}
2247
2248
2249void
2251 if (myArguments.size() != 0) {
2252 writeError("deleteMeanData", 0, "<>");
2253 } else {
2255 }
2256}
2257
2258
2259void
2261 if (myArguments.size() != 0) {
2262 writeError("copyMeanData", 0, "<>");
2263 } else {
2265 }
2266}
2267
2268
2269void
2271 if (myArguments.size() == 0) {
2272 writeError("quit", 0, "<neteditProcess>");
2273 } else {
2276 //don't update view if we're closing to avoid problems with drawGL
2277 myUpdateView = false;
2278 }
2279}
2280
2281
2282bool
2283InternalTestStep::checkIntArgument(const std::string& argument) const {
2284 if (StringUtils::isInt(argument)) {
2285 return true;
2286 } else if (myTestSystem->getAttributesEnum().count(argument) > 0) {
2287 return true;
2288 } else {
2289 return false;
2290 }
2291}
2292
2293
2294int
2295InternalTestStep::getIntArgument(const std::string& argument) const {
2296 if (StringUtils::isInt(argument)) {
2297 return StringUtils::toInt(argument);
2298 } else {
2299 return myTestSystem->getAttributesEnum().at(argument);
2300 }
2301}
2302
2303
2304bool
2305InternalTestStep::checkBoolArgument(const std::string& argument) const {
2306 if (argument == "True") {
2307 return true;
2308 } else if (argument == "False") {
2309 return true;
2310 } else {
2311 return false;
2312 }
2313}
2314
2315
2316bool
2317InternalTestStep::getBoolArgument(const std::string& argument) const {
2318 if (argument == "True") {
2319 return true;
2320 } else {
2321 return false;
2322 }
2323}
2324
2325
2326bool
2327InternalTestStep::checkStringArgument(const std::string& argument) const {
2328 if (argument.size() < 2) {
2329 return false;
2330 } else if ((argument.front() != argument.back()) || ((argument.front() != '\'') && ((argument.front() != '\"')))) {
2331 return false;
2332 } else {
2333 return true;
2334 }
2335}
2336
2337
2338std::string
2339InternalTestStep::getStringArgument(const std::string& argument) const {
2340 std::string argumentParsed;
2341 for (int i = 1; i < ((int)argument.size() - 1); i++) {
2342 argumentParsed.push_back(argument[i]);
2343 }
2344 return argumentParsed;
2345}
2346
2347
2348std::string
2349InternalTestStep::stripSpaces(const std::string& str) const {
2350 auto start = std::find_if_not(str.begin(), str.end(), isspace);
2351 auto end = std::find_if_not(str.rbegin(), str.rend(), isspace).base();
2352 if (start < end) {
2353 return std::string(start, end);
2354 } else {
2355 return "";
2356 }
2357}
2358
2359
2360void
2361InternalTestStep::writeError(const std::string& function, const int overlapping, const std::string& expected) const {
2362 if (overlapping > 0) {
2363 WRITE_ERRORF("Invalid internal testStep function '%Ovelapped', requires '%' arguments ", function, expected);
2364 } else {
2365 WRITE_ERRORF("Invalid internal testStep function '%', requires '%' arguments ", function, expected);
2366 }
2367 // also print arguments
2368 if (myArguments.size() > 0) {
2369 WRITE_ERROR("Arguments: ");
2370 for (const auto& arg : myArguments) {
2372 }
2373 }
2374}
2375
2376
2377void
2379 const int sizeX, const int sizeY, const bool close,
2380 const bool line) const {
2381 // calculate half-sizes
2382 const int halfSizeX = int(sizeX * -0.5);
2383 const int halfSizeY = int(sizeY * -0.5);
2384 // focus frame
2386 // press enter to start drawing
2387 buildPressKeyEvent(Category::APP, "enter", true);
2388 // first edge
2389 buildMouseClick(viewPosition, 0, 0, "left", "");
2390 writeClickInfo(viewPosition, 0, 0, "");
2391 // second edge
2392 if (!line) {
2393 buildMouseClick(viewPosition, 0, halfSizeY, "left", "");
2394 writeClickInfo(viewPosition, 0, halfSizeY, "");
2395 }
2396 // third edge
2397 buildMouseClick(viewPosition, halfSizeX, halfSizeY, "left", "");
2398 writeClickInfo(viewPosition, halfSizeX, halfSizeY, "");
2399 // four edge
2400 if (!line) {
2401 buildMouseClick(viewPosition, halfSizeX, 0, "left", "");
2402 writeClickInfo(viewPosition, halfSizeX, 0, "");
2403 }
2404 // check if close polygon
2405 if (close) {
2406 buildMouseClick(viewPosition, 0, 0, "left", "");
2407 writeClickInfo(viewPosition, 0, 0, "");
2408 }
2409 // press enter to end drawing
2410 buildPressKeyEvent(Category::APP, "enter", true);
2411}
2412
2413
2414void
2415InternalTestStep::modifyStringAttribute(Category category, const int tabs, const int overlappedTabs, const std::string& value) const {
2416 // print info
2417 std::cout << value << std::endl;
2418 // focus frame
2419 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_HOTKEY_SHIFT_F12_FOCUSUPPERELEMENT, category, "focus frame");
2420 // jump to the element
2421 for (int i = 0; i < (tabs + overlappedTabs); i++) {
2422 buildPressKeyEvent(category, "tab", false);
2423 }
2424 // write attribute character by character
2425 if (value.empty()) {
2426 buildPressKeyEvent(category, "delete", false);
2427 } else {
2428 for (const char c : value) {
2429 buildPressKeyEvent(category, {c}, false);
2430 }
2431 }
2432 // press enter to confirm changes (updating view)
2433 buildPressKeyEvent(category, "enter", true);
2434}
2435
2436
2437void
2438InternalTestStep::modifyBoolAttribute(Category category, const int tabs, const int overlappedTabs) const {
2439 // focus frame
2440 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_HOTKEY_SHIFT_F12_FOCUSUPPERELEMENT, category, "focus frame");
2441 // jump to the element
2442 for (int i = 0; i < (tabs + overlappedTabs); i++) {
2443 buildPressKeyEvent(category, "tab", false);
2444 }
2445 // toogle attribute
2446 buildPressKeyEvent(category, "space", true);
2447}
2448
2449
2450void
2451InternalTestStep::buildUndo(const int number) const {
2452 // get reference position
2453 const auto& referencePosition = myTestSystem->getViewPositions().at("netedit.positions.reference");
2454 // focus frame
2456 // go to inspect mode
2457 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_HOTKEY_I_MODE_INSPECT, Category::APP, "inspect mode");
2458 // click over reference
2459 std::cout << "TestFunctions: Clicked over position " <<
2460 toString(MOUSE_REFERENCE_X) << " - " <<
2461 toString(MOUSE_REFERENCE_Y) << std::endl;
2462 // build mouse click
2463 buildMouseClick(referencePosition, 0, 0, "left", "");
2464 // undo
2465 for (int i = 0; i < number; i++) {
2467 }
2468}
2469
2470
2471void
2472InternalTestStep::buildRedo(const int number) const {
2473 // get reference position
2474 const auto& referencePosition = myTestSystem->getViewPositions().at("netedit.positions.reference");
2475 // focus frame
2477 // go to inspect mode
2478 new InternalTestStep(myTestSystem, SEL_COMMAND, MID_HOTKEY_I_MODE_INSPECT, Category::APP, "inspect mode");
2479 // click over reference
2480 std::cout << "TestFunctions: Clicked over position " <<
2481 toString(MOUSE_REFERENCE_X) << " - " <<
2482 toString(MOUSE_REFERENCE_Y) << std::endl;
2483 // build mouse click
2484 buildMouseClick(referencePosition, 0, 0, "left", "");
2485 // undo
2486 for (int i = 0; i < number; i++) {
2488 }
2489}
2490
2491
2492std::pair<FXint, FXString>
2493InternalTestStep::translateKey(const std::string& key) const {
2494 std::pair<FXint, FXString> solution;
2495 // check if key is a single character
2496 if (key.size() == 1) {
2497 solution.first = FXint(key.front());
2498 solution.second.append(key.front());
2499 } else {
2500 // continue depending of key
2501 if (key == "backspace") {
2502 solution.first = KEY_BackSpace;
2503 solution.second = "\b";
2504 } else if (key == "space") {
2505 solution.first = KEY_space;
2506 } else if (key == "tab") {
2507 solution.first = KEY_Tab;
2508 solution.second = "\t";
2509 } else if (key == "clear") {
2510 solution.first = KEY_Clear;
2511 } else if (key == "enter" || key == "return") {
2512 solution.first = KEY_Return;
2513 solution.second = "\n";
2514 } else if (key == "pause") {
2515 solution.first = KEY_Pause;
2516 } else if (key == "sys_req") {
2517 solution.first = KEY_Sys_Req;
2518 } else if (key == "esc" || key == "escape") {
2519 solution.first = KEY_Escape;
2520 solution.second = "\x1B";
2521 } else if (key == "delete") {
2522 solution.first = KEY_Delete;
2523 solution.second = "\x7F";
2524 } else if (key == "multi_key") {
2525 solution.first = KEY_Multi_key;
2526 // function
2527 } else if (key == "shift") {
2528 solution.first = KEY_Shift_L;
2529 } else if (key == "control") {
2530 solution.first = KEY_Control_L;
2531 // Cursor
2532 } else if (key == "home") {
2533 solution.first = KEY_Home;
2534 } else if (key == "left") {
2535 solution.first = KEY_Left;
2536 } else if (key == "up") {
2537 solution.first = KEY_Up;
2538 } else if (key == "right") {
2539 solution.first = KEY_Right;
2540 } else if (key == "down") {
2541 solution.first = KEY_Down;
2542 } else if (key == "prior" || key == "page_up") {
2543 solution.first = KEY_Page_Up;
2544 } else if (key == "next" || key == "page_down") {
2545 solution.first = KEY_Page_Down;
2546 } else if (key == "end") {
2547 solution.first = KEY_End;
2548 } else if (key == "begin") {
2549 solution.first = KEY_Begin;
2550 // Function keys
2551 } else if (key == "f1") {
2552 solution.first = KEY_F1;
2553 } else if (key == "f2") {
2554 solution.first = KEY_F2;
2555 } else if (key == "f3") {
2556 solution.first = KEY_F3;
2557 } else if (key == "f4") {
2558 solution.first = KEY_F4;
2559 } else if (key == "f5") {
2560 solution.first = KEY_F5;
2561 } else if (key == "f6") {
2562 solution.first = KEY_F6;
2563 } else if (key == "f7") {
2564 solution.first = KEY_F7;
2565 } else if (key == "f8") {
2566 solution.first = KEY_F8;
2567 } else if (key == "f9") {
2568 solution.first = KEY_F9;
2569 } else if (key == "f10") {
2570 solution.first = KEY_F10;
2571 } else if (key == "f11" || key == "l1") {
2572 solution.first = KEY_F11;
2573 } else if (key == "f12" || key == "l2") {
2574 solution.first = KEY_F12;
2575 } else {
2576 writeError("translateKey", 0, "<key>");
2577 solution.first = KEY_VoidSymbol;
2578 }
2579 }
2580 return solution;
2581}
2582
2583
2584FXEvent*
2585InternalTestStep::buildKeyPressEvent(const std::string& key) const {
2586 const auto keyValues = translateKey(key);
2587 FXEvent* keyPressEvent = new FXEvent();
2588 // set event values
2589 keyPressEvent->time = myTestSystem->getTime();
2590 keyPressEvent->synthetic = true;
2591 keyPressEvent->type = SEL_KEYPRESS;
2592 keyPressEvent->code = keyValues.first;
2593 keyPressEvent->text = keyValues.second;
2594 return keyPressEvent;
2595}
2596
2597
2598FXEvent*
2599InternalTestStep::buildKeyReleaseEvent(const std::string& key) const {
2600 const auto keyValues = translateKey(key);
2601 FXEvent* keyPressEvent = new FXEvent();
2602 // set event values
2603 keyPressEvent->time = myTestSystem->getTime();
2604 keyPressEvent->synthetic = true;
2605 keyPressEvent->type = SEL_KEYPRESS;
2606 keyPressEvent->code = keyValues.first;
2607 keyPressEvent->text = keyValues.second;
2608 // special case for shift and control
2609 return keyPressEvent;
2610}
2611
2612
2613void
2614InternalTestStep::buildPressKeyEvent(Category category, const std::string& key, const bool updateView) const {
2615 new InternalTestStep(myTestSystem, SEL_KEYPRESS, category, buildKeyPressEvent(key), updateView, "key '" + key + "' pressed");
2616 new InternalTestStep(myTestSystem, SEL_KEYRELEASE, category, buildKeyReleaseEvent(key), updateView, "key '" + key + "' released");
2617}
2618
2619
2620void
2621InternalTestStep::buildTwoPressKeyEvent(Category category, const std::string& keyA, const std::string& keyB, const bool updateView) const {
2622 // create both events using keyB
2623 auto pressEvent = buildKeyPressEvent(keyB);
2624 auto releaseEvent = buildKeyPressEvent(keyB);
2625 // check if set state
2626 if (keyA == "shift") {
2627 pressEvent->state = SHIFTMASK;
2628 releaseEvent->state = SHIFTMASK;
2629 } else if (keyA == "control") {
2630 pressEvent->state = CONTROLMASK;
2631 releaseEvent->state = CONTROLMASK;
2632 } else if (keyA == "alt") {
2633 pressEvent->state = ALTMASK;
2634 releaseEvent->state = ALTMASK;
2635 }
2636 new InternalTestStep(myTestSystem, SEL_KEYPRESS, category, pressEvent, updateView, "keys '" + keyA + "' + '" + keyB + "' pressed");
2637 new InternalTestStep(myTestSystem, SEL_KEYRELEASE, category, releaseEvent, updateView, "keys '" + keyA + "' + '" + keyB + " pressed");
2638}
2639
2640
2641void
2643 const int offsetX, const int offsetY,
2644 const std::string& button, const std::string& keyModifier) const {
2645 // move mouse move
2647 buildMouseMoveEvent(viewPosition, offsetX, offsetY, 0, "", 0),
2648 true, "mouse moved to click position");
2649 // continue depending of mouse
2650 if (button == "left") {
2651 new InternalTestStep(myTestSystem, SEL_LEFTBUTTONPRESS, Category::VIEW,
2652 buildMouseClickEvent(SEL_LEFTBUTTONPRESS, viewPosition, offsetX, offsetY, keyModifier, 1),
2653 true, "mouse button " + button + " pressed");
2654 new InternalTestStep(myTestSystem, SEL_LEFTBUTTONRELEASE, Category::VIEW,
2655 buildMouseClickEvent(SEL_LEFTBUTTONRELEASE, viewPosition, offsetX, offsetY, keyModifier, 1),
2656 true, "mouse button " + button + " released");
2657 } else if (button == "center") {
2658 new InternalTestStep(myTestSystem, SEL_MIDDLEBUTTONPRESS, Category::VIEW,
2659 buildMouseClickEvent(SEL_MIDDLEBUTTONPRESS, viewPosition, offsetX, offsetY, keyModifier, 1),
2660 true, "mouse button " + button + " pressed");
2661 new InternalTestStep(myTestSystem, SEL_MIDDLEBUTTONRELEASE, Category::VIEW,
2662 buildMouseClickEvent(SEL_MIDDLEBUTTONRELEASE, viewPosition, offsetX, offsetY, keyModifier, 1),
2663 true, "mouse button " + button + " released");
2664 } else if (button == "right") {
2665 new InternalTestStep(myTestSystem, SEL_RIGHTBUTTONPRESS, Category::VIEW,
2666 buildMouseClickEvent(SEL_RIGHTBUTTONPRESS, viewPosition, offsetX, offsetY, keyModifier, 1),
2667 true, "mouse button " + button + " pressed");
2668 new InternalTestStep(myTestSystem, SEL_RIGHTBUTTONRELEASE, Category::VIEW,
2669 buildMouseClickEvent(SEL_RIGHTBUTTONRELEASE, viewPosition, offsetX, offsetY, keyModifier, 1),
2670 true, "mouse button " + button + " released");
2671 }
2672}
2673
2674
2675void
2677 const int offsetStartX, const int offsetStartY,
2678 const InternalTest::ViewPosition& viewEndPosition,
2679 const int offsetEndX, const int offsetEndY,
2680 const std::string& keyModifier) const {
2681 // move mouse interpolating
2682 const auto interpolationSteps = myTestSystem->interpolateViewPositions(viewStartPosition, offsetStartX, offsetStartY, viewEndPosition, offsetEndX, offsetEndY);
2683 // move mouse move
2685 buildMouseMoveEvent(viewStartPosition, offsetStartX, offsetStartY, 0, "", 0),
2686 true, "mouse moved to click position (dragDrop)");
2687 // press button
2688 new InternalTestStep(myTestSystem, SEL_LEFTBUTTONPRESS, Category::VIEW,
2689 buildMouseClickEvent(SEL_LEFTBUTTONPRESS, viewStartPosition, offsetStartX, offsetStartY, keyModifier, 1),
2690 true, "mouse button left pressed (dragDrop)");
2691 // move mouse button
2692 for (const auto& position : interpolationSteps) {
2694 buildMouseMoveEvent(position, 0, 0, LEFTBUTTON, "leftButton", 1),
2695 true, "mouse moved (dragDrop)");
2696 }
2697 // release button
2698 new InternalTestStep(myTestSystem, SEL_LEFTBUTTONRELEASE, Category::VIEW,
2699 buildMouseClickEvent(SEL_LEFTBUTTONRELEASE, viewEndPosition, offsetEndX, offsetEndY, keyModifier, 1),
2700 true, "mouse button left released (dragDrop)");
2701}
2702
2703
2704FXEvent*
2706 const int offsetX, const int offsetY, const int clickedButton,
2707 const std::string& keyModifier, const int numberOfClicks) const {
2708 FXEvent* moveEvent = new FXEvent();
2709 // set event values
2710 moveEvent->time = myTestSystem->getTime();
2711 moveEvent->type = SEL_MOTION;
2712 moveEvent->synthetic = true;
2713 moveEvent->win_x = viewPosition.getX() + MOUSE_OFFSET_X + offsetX;
2714 moveEvent->win_y = viewPosition.getY() + MOUSE_OFFSET_Y + offsetY;
2715 moveEvent->last_x = myTestSystem->getLastMovedPosition().getX();
2716 moveEvent->last_y = myTestSystem->getLastMovedPosition().getY();
2717 moveEvent->click_x = 0;
2718 moveEvent->click_y = 0;
2719 moveEvent->moved = true;
2720 moveEvent->rect = FXRectangle(0, 0, 0, 0);
2721 moveEvent->click_button = clickedButton;
2722 moveEvent->click_count = numberOfClicks;
2723 moveEvent->code = 0;
2724 // set modifier
2725 if (keyModifier == "control") {
2726 moveEvent->state = CONTROLMASK;
2727 } else if (keyModifier == "shift") {
2728 moveEvent->state = SHIFTMASK;
2729 } else if (keyModifier == "leftButton") {
2730 moveEvent->state = LEFTBUTTONMASK;
2731 } else {
2732 moveEvent->state = 0;
2733 }
2734 // update last moved position
2735 myTestSystem->updateLastMovedPosition(moveEvent->win_x, moveEvent->win_y);
2736 return moveEvent;
2737}
2738
2739
2740FXEvent*
2742 const int offsetX, const int offsetY, const std::string& keyModifier,
2743 const int numberOfClicks) const {
2744 FXEvent* clickEvent = new FXEvent();
2745 // set event values
2746 clickEvent->time = myTestSystem->getTime();
2747 clickEvent->type = type;
2748 clickEvent->synthetic = true;
2749 clickEvent->win_x = viewPosition.getX() + MOUSE_OFFSET_X + offsetX;
2750 clickEvent->win_y = viewPosition.getY() + MOUSE_OFFSET_Y + offsetY;
2751 clickEvent->click_x = viewPosition.getX() + MOUSE_OFFSET_X + offsetX;
2752 clickEvent->click_y = viewPosition.getY() + MOUSE_OFFSET_Y + offsetY;
2753 clickEvent->last_x = myTestSystem->getLastMovedPosition().getX();
2754 clickEvent->last_y = myTestSystem->getLastMovedPosition().getY();
2755 clickEvent->click_count = numberOfClicks;
2756 clickEvent->moved = false;
2757 clickEvent->rect = FXRectangle(0, 0, 0, 0);
2758 // set button
2759 if ((type == SEL_LEFTBUTTONPRESS) || (type == SEL_LEFTBUTTONRELEASE)) {
2760 clickEvent->click_button = LEFTBUTTON;
2761 clickEvent->code = LEFTBUTTON;
2762 } else if ((type == SEL_MIDDLEBUTTONPRESS) || (type == SEL_MIDDLEBUTTONRELEASE)) {
2763 clickEvent->click_button = MIDDLEBUTTON;
2764 clickEvent->code = MIDDLEBUTTON;
2765 } else if ((type == SEL_RIGHTBUTTONPRESS) || (type == SEL_RIGHTBUTTONRELEASE)) {
2766 clickEvent->click_button = RIGHTBUTTON;
2767 clickEvent->code = RIGHTBUTTON;
2768 } else {
2769 clickEvent->click_button = 0;
2770 clickEvent->code = 0;
2771 }
2772 // set modifier
2773 if (keyModifier == "control") {
2774 clickEvent->state = CONTROLMASK;
2775 } else if (keyModifier == "shift") {
2776 clickEvent->state = SHIFTMASK;
2777 } else {
2778 clickEvent->state = 0;
2779 }
2780 return clickEvent;
2781}
2782
2783
2784void
2786 const int offsetX, const int offsetY,
2787 const std::string modifier) const {
2788 if (modifier == "control") {
2789 std::cout << "TestFunctions: Clicked with Control key pressed over position " <<
2790 toString(viewPosition.getX() + MOUSE_REFERENCE_X + offsetX) << " - " <<
2791 toString(viewPosition.getY() + MOUSE_REFERENCE_Y + offsetY) << std::endl;
2792 } else if (modifier == "shift") {
2793 std::cout << "TestFunctions: Clicked with Shift key pressed over position " <<
2794 toString(viewPosition.getX() + MOUSE_REFERENCE_X + offsetX) << " - " <<
2795 toString(viewPosition.getY() + MOUSE_REFERENCE_Y) << std::endl;
2796 } else {
2797 std::cout << "TestFunctions: Clicked over position " <<
2798 toString(viewPosition.getX() + MOUSE_REFERENCE_X + offsetX) << " - " <<
2799 toString(viewPosition.getY() + MOUSE_REFERENCE_Y + offsetY) << std::endl;
2800 }
2801}
2802
2803/****************************************************************************/
DialogType
@ FIX_DEMANDELEMENTS
@ FIX_NETWORKELEMENTS
@ FIX_ADDITIONALELEMENTS
@ MID_GNE_NETWORKVIEWOPTIONS_AUTOOPPOSITEEDGES
automatically create opposite edge
Definition GUIAppEnum.h:849
@ MID_GNE_LOCK_POLYGON
lock polygons
Definition GUIAppEnum.h:875
@ MID_HOTKEY_CTRL_Q_CLOSE
Main window closes.
Definition GUIAppEnum.h:115
@ MID_HOTKEY_SHIFT_F5_COMPUTEJUNCTIONS_VOLATILE
compute junctions with volatile options
Definition GUIAppEnum.h:270
@ MID_HOTKEY_CTRL_SHIFT_B_SAVEDATAELEMENTS
save Data Elements
Definition GUIAppEnum.h:204
@ MID_HOTKEY_F3_SUPERMODE_DEMAND
select demand supermode in netedit
Definition GUIAppEnum.h:236
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWALLPERSONPLANS
show all person plans
Definition GUIAppEnum.h:933
@ MID_GNE_UNLOCK_ALLELEMENTS
unlock all element
Definition GUIAppEnum.h:911
@ MID_GNE_DATAVIEWOPTIONS_TAZRELDRAWING
toggle TAZRel drawing
Definition GUIAppEnum.h:957
@ MID_GNE_TOOLBARFILE_SAVEADDITIONALELEMENTS_UNIFIED
save additionals unified
Definition GUIAppEnum.h:723
@ MID_HOTKEY_U_MODE_DECAL_TYPEDISTRIBUTION
hotkey for mode decal AND type distribution
Definition GUIAppEnum.h:69
@ MID_GNE_NETWORKVIEWOPTIONS_DRAWSPREADVEHICLES
Draw vehicles in begin position or spread in lane.
Definition GUIAppEnum.h:823
@ MID_GNE_TLSFRAME_PHASES_ADDUNUSED
add unused states
@ MID_HOTKEY_CTRL_Y_REDO
Undo.
Definition GUIAppEnum.h:133
@ MID_HOTKEY_CTRL_SHIFT_H_SAVEEDGETYPES
save Edge Types
Definition GUIAppEnum.h:212
@ MID_GNE_NETWORKVIEWOPTIONS_MOVEELEVATION
move elevation instead of x,y
Definition GUIAppEnum.h:845
@ MID_GNE_LOCK_WIRE
lock wires
Definition GUIAppEnum.h:871
@ MID_GNE_TOOLBARFILE_RELOAD_EDGETYPES
reload edge types
Definition GUIAppEnum.h:735
@ MID_GNE_NETWORKVIEWOPTIONS_HIDECONNECTIONS
hide connections
Definition GUIAppEnum.h:831
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWCONNECTIONS
show connections
Definition GUIAppEnum.h:829
@ MID_GNE_TLSTABLE_ADDPHASE
TLSTable button for add phase.
@ MID_GNE_DATAVIEWOPTIONS_TAZRELONLYTO
toggle draw TAZRel only to
Definition GUIAppEnum.h:963
@ MID_GNE_LOCK_ALLELEMENTS
lock all element
Definition GUIAppEnum.h:909
@ MID_HOTKEY_CTRL_D_SINGLESIMULATIONSTEP_OPENDEMANDELEMENTS
Perform a single simulation step in SUMO and open Demand Elements in netedit.
Definition GUIAppEnum.h:89
@ MID_HOTKEY_F5_COMPUTE_NETWORK_DEMAND
compute Network in network mode and Demand elements in demand mode
Definition GUIAppEnum.h:240
@ MID_GNE_DATAVIEWOPTIONS_TOGGLEDRAWJUNCTIONSHAPE
toggle draw junction shape
Definition GUIAppEnum.h:949
@ MID_GNE_TLSTABLE_COPYPHASE
TLSTable button for copy phase.
@ MID_HOTKEY_CTRL_O_OPENSIMULATION_OPENNETWORK
Open simulation in SUMO and open network in netedit.
Definition GUIAppEnum.h:111
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWTAZELEMENTS
show TAZ elements
Definition GUIAppEnum.h:835
@ MID_GNE_DEMANDVIEWOPTIONS_LOCKPERSON
lock person
Definition GUIAppEnum.h:935
@ MID_GNE_LOCK_JPS_WALKABLEAREA
lock walkableAreas
Definition GUIAppEnum.h:879
@ MID_HOTKEY_Z_MODE_TAZ_TAZREL
hotkey for mode editing TAZ and TAZRel
Definition GUIAppEnum.h:75
@ MID_GNE_TLSTABLE_ADDPHASEALLGREENPRIORITY
TLSTable button for add phase green priority.
@ MID_GNE_DEMANDVIEWOPTIONS_TOGGLEDRAWJUNCTIONSHAPE
toggle draw junction shape
Definition GUIAppEnum.h:923
@ MID_GNE_LOCK_SELECTEDELEMENTS
lock selected element
Definition GUIAppEnum.h:913
@ MID_GNE_TLSFRAME_PHASES_CLEANUP
cleanup unused states
@ MID_GNE_TLSFRAME_PHASES_GROUPSTATES
group states
@ MID_GNE_TOOLBARFILE_SAVESUMOCONFIG_AS
save SUMOConfig as
Definition GUIAppEnum.h:719
@ MID_GNE_TOOLBARFILE_RELOAD_TLSPROGRAMS
reload TLS Programs
Definition GUIAppEnum.h:731
@ MID_HOTKEY_DEL
hot key delete selections or elements
Definition GUIAppEnum.h:288
@ MID_HOTKEY_A_MODE_STARTSIMULATION_ADDITIONALS_STOPS
hotkey for start simulation in SUMO and set editing mode additionals AND stops in netedit
Definition GUIAppEnum.h:43
@ MID_GNE_TOOLBARFILE_OPENMEANDATAELEMENTS
open meanData file
Definition GUIAppEnum.h:745
@ MID_GNE_TOOLBARFILE_RELOAD_NETEDITCONFIG
reload neteditConfig
Definition GUIAppEnum.h:713
@ MID_HOTKEY_CTRL_B_EDITBREAKPOINT_OPENDATAELEMENTS
Edit simulation breakpoints in SUMO and open Data Elements in netedit.
Definition GUIAppEnum.h:85
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWGRID
show grid
Definition GUIAppEnum.h:921
@ MID_HOTKEY_CTRL_SHIFT_D_SAVEDEMANDELEMENTS
Save Demand Elements.
Definition GUIAppEnum.h:208
@ MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK
Stop the simulation in SUMO and save network in netedit.
Definition GUIAppEnum.h:117
@ MID_HOTKEY_D_MODE_SINGLESIMULATIONSTEP_DELETE
hotkey for perform a single simulation step in SUMO and set delete mode in netedit
Definition GUIAppEnum.h:49
@ MID_GNE_NETWORKVIEWOPTIONS_CHAINEDGES
create edges in chain mode
Definition GUIAppEnum.h:847
@ MID_GNE_DATAVIEWOPTIONS_SHOWDEMANDELEMENTS
show demand elements
Definition GUIAppEnum.h:955
@ MID_GNE_TOOLBARFILE_RELOAD_MEANDATAELEMENTS
reload meanDatas
Definition GUIAppEnum.h:749
@ MID_GNE_TOOLBARFILE_SAVEMEANDATAELEMENTS_UNIFIED
save meanDatas unified
Definition GUIAppEnum.h:747
@ MID_GNE_LOCK_WALKINGAREA
lock walkingareas
Definition GUIAppEnum.h:867
@ MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALELEMENTS
Start the simulation in SUMO and open Additionals Elements in netedit.
Definition GUIAppEnum.h:83
@ MID_HOTKEY_C_MODE_CONNECT_CONTAINER
hotkey for mode connecting lanes AND container
Definition GUIAppEnum.h:45
@ MID_HOTKEY_H_MODE_PROHIBITION_CONTAINERPLAN
hotkey for mode prohibition AND container plan
Definition GUIAppEnum.h:53
@ MID_HOTKEY_W_MODE_WIRE_ROUTEDISTRIBUTION
hotkey for mode editing overhead wires AND route distributions
Definition GUIAppEnum.h:73
@ MID_HOTKEY_T_MODE_TLS_TYPE
hotkey for mode editing TLS AND Vehicle Types
Definition GUIAppEnum.h:67
@ MID_GNE_DEMANDVIEWOPTIONS_HIDESHAPES
hide shapes
Definition GUIAppEnum.h:929
@ MID_GNE_TLSFRAME_PHASES_UNGROUPSTATES
ungroup states
@ MID_GNE_LOCK_JPS_OBSTACLE
lock obstacles
Definition GUIAppEnum.h:881
@ MID_GNE_TLSTABLE_ADDPHASEALLYELLOW
TLSTable button for add phase yelllow.
@ MID_GNE_TOOLBARFILE_SAVETLSPROGRAMS_AS
save TLS Programs as
Definition GUIAppEnum.h:729
@ MID_GNE_DATAVIEWOPTIONS_SHOWADDITIONALS
show additionals
Definition GUIAppEnum.h:951
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWBUBBLES
show junctions as bubbles
Definition GUIAppEnum.h:843
@ MID_GNE_TOOLBARFILE_RELOAD_DEMANDELEMENTS
reload demand elements
Definition GUIAppEnum.h:739
@ MID_GNE_TLSTABLE_TEXTFIELD
TLSTable textField.
@ MID_GNE_NETWORKVIEWOPTIONS_EXTENDSELECTION
extend selection
Definition GUIAppEnum.h:837
@ MID_GNE_TLSTABLE_ADDPHASEALLRED
TLSTable button for add phase red.
@ MID_HOTKEY_S_MODE_STOPSIMULATION_SELECT
hotkey for stop simulation in SUMO and set select mode in netedit
Definition GUIAppEnum.h:63
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWSUBADDITIONALS
show sub-additionals
Definition GUIAppEnum.h:833
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWALLCONTAINERPLANS
show all container plans
Definition GUIAppEnum.h:937
@ MID_GNE_LOCK_ADDITIONALELEMENT
lock additional elements
Definition GUIAppEnum.h:869
@ MID_GNE_TLSTABLE_MOVEDOWNPHASE
TLSTable button for move down phase.
@ MID_HOTKEY_F4_SUPERMODE_DATA
select data supermode in netedit
Definition GUIAppEnum.h:238
@ MID_GNE_LOCK_EDGE
lock edges
Definition GUIAppEnum.h:859
@ MID_HOTKEY_CTRL_K_OPENTLSPROGRAMS
Load file with TLS Programs.
Definition GUIAppEnum.h:103
@ MID_GNE_TOOLBARFILE_SAVENETEDITCONFIG_AS
save neteditConfig as
Definition GUIAppEnum.h:715
@ MID_HOTKEY_R_MODE_CROSSING_ROUTE_EDGERELDATA
hotkey for mode editing crossing, routes and edge rel datas
Definition GUIAppEnum.h:65
@ MID_GNE_DATAVIEWOPTIONS_TAZDRAWFILL
toggle draw TAZ fill
Definition GUIAppEnum.h:959
@ MID_HOTKEY_L_MODE_PERSONPLAN
hotkey for mode person plan
Definition GUIAppEnum.h:57
@ MID_HOTKEY_V_MODE_VEHICLE
hotkey for mode create vehicles
Definition GUIAppEnum.h:71
@ MID_GNE_TOOLBARFILE_SAVEDATAELEMENTS_UNIFIED
save data elements unified
Definition GUIAppEnum.h:741
@ MID_HOTKEY_I_MODE_INSPECT
hotkey for mode inspecting object attributes
Definition GUIAppEnum.h:55
@ MID_GNE_TLSTABLE_ADDPHASEALLGREEN
TLSTable button for add phase green.
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWDEMANDELEMENTS
show demand elements
Definition GUIAppEnum.h:825
@ MID_GNE_TLSTABLE_REMOVEPHASE
TLSTable button for remove phase.
@ MID_HOTKEY_CTRL_SHIFT_E_SAVENETEDITCONFIG
save netedit Config
Definition GUIAppEnum.h:210
@ MID_GNE_TOOLBARFILE_SAVEEDGETYPES_AS
save edgeTypes as
Definition GUIAppEnum.h:733
@ MID_GNE_DEMANDVIEWOPTIONS_HIDENONINSPECTED
hide non-inspected demand element
Definition GUIAppEnum.h:927
@ MID_GNE_LOCK_CONNECTION
lock connections
Definition GUIAppEnum.h:863
@ MID_GNE_TOOLBARFILE_RELOADNETWORK
reload only network
Definition GUIAppEnum.h:707
@ MID_GNE_NETWORKVIEWOPTIONS_MERGEAUTOMATICALLY
don't ask before merging junctions
Definition GUIAppEnum.h:841
@ MID_HOTKEY_CTRL_SHIFT_M_SAVEMEANDATAELEMENTS
save Mean Datas
Definition GUIAppEnum.h:216
@ MID_GNE_NETWORKVIEWOPTIONS_CHANGEALLPHASES
change all phases
Definition GUIAppEnum.h:839
@ MID_GNE_TLSTABLE_MOVEUPPHASE
TLSTable button for move up phase.
@ MID_GNE_DATAVIEWOPTIONS_SHOWSHAPES
show shapes
Definition GUIAppEnum.h:953
@ MID_HOTKEY_E_MODE_EDGE_EDGEDATA
hotkey for mode adding edges AND edgeDatas
Definition GUIAppEnum.h:51
@ MID_GNE_DATAVIEWOPTIONS_TAZRELONLYFROM
toggle draw TAZRel only from
Definition GUIAppEnum.h:961
@ MID_GNE_TOOLBARFILE_RELOAD_SUMOCONFIG
reload SUMOConfig
Definition GUIAppEnum.h:717
@ MID_GNE_LOCK_LANE
lock lanes
Definition GUIAppEnum.h:861
@ MID_GNE_NETWORKVIEWOPTIONS_TOGGLEDRAWJUNCTIONSHAPE
toggle draw junction shape
Definition GUIAppEnum.h:821
@ MID_HOTKEY_CTRL_SHIFT_O_OPENNETCONVERTFILE
open Netconvert file
Definition GUIAppEnum.h:220
@ MID_HOTKEY_CTRL_M_OPENSUMOCONFIG
open sumo config
Definition GUIAppEnum.h:107
@ MID_GNE_TOOLBARFILE_SAVENETWORK_AS
save network as
Definition GUIAppEnum.h:721
@ MID_GNE_DEMANDVIEWOPTIONS_DRAWSPREADVEHICLES
Draw vehicles in begin position or spread in lane.
Definition GUIAppEnum.h:925
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWOVERLAPPEDROUTES
show overlapped routes
Definition GUIAppEnum.h:941
@ MID_HOTKEY_CTRL_Z_UNDO
Redo.
Definition GUIAppEnum.h:135
@ MID_GNE_TOOLBARFILE_SAVEDEMANDELEMENTS_UNIFIED
save demand elements unified
Definition GUIAppEnum.h:737
@ MID_HOTKEY_CTRL_H_APPSETTINGS_OPENEDGETYPES
open app setting dialog in SUMO and open edge type files in netedit
Definition GUIAppEnum.h:97
@ MID_HOTKEY_CTRL_SHIFT_S_SAVESUMOCONFIG
save SUMOConfig (SUMO AND netedit)
Definition GUIAppEnum.h:222
@ MID_GNE_LOCK_CROSSING
lock crossings
Definition GUIAppEnum.h:865
@ MID_HOTKEY_F12_ABOUT
open about dialog
Definition GUIAppEnum.h:256
@ MID_HOTKEY_CTRL_E_EDITSELECTION_LOADNETEDITCONFIG
Edit selection in SUMO and load neteditConfig in netedit.
Definition GUIAppEnum.h:91
@ MID_GNE_TOOLBARFILE_RELOAD_DATAELEMENTS
reload data elements
Definition GUIAppEnum.h:743
@ MID_HOTKEY_CTRL_SHIFT_K_SAVETLS
save TLS Programs
Definition GUIAppEnum.h:214
@ MID_HOTKEY_M_MODE_MOVE_MEANDATA
hotkey for mode moving element AND mean data
Definition GUIAppEnum.h:59
@ MID_HOTKEY_F2_SUPERMODE_NETWORK
select network supermode in netedit
Definition GUIAppEnum.h:234
@ MID_GNE_DEMANDVIEWOPTIONS_LOCKCONTAINER
lock container
Definition GUIAppEnum.h:939
@ MID_HOTKEY_SHIFT_F12_FOCUSUPPERELEMENT
focus upper element of current frame (only used in netedit)
Definition GUIAppEnum.h:276
@ MID_GNE_TOOLBARFILE_RELOAD_ADDITIONALELEMENTS
reload additionals
Definition GUIAppEnum.h:727
@ MID_GNE_NETWORKVIEWOPTIONS_SELECTEDGES
select edges
Definition GUIAppEnum.h:827
@ MID_GNE_SAVEJOINEDJUNCTIONS
save joined junctions
Definition GUIAppEnum.h:711
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWTRIPS
show all trips
Definition GUIAppEnum.h:931
@ MID_GNE_NETWORKVIEWOPTIONS_TOGGLEGRID
show grid
Definition GUIAppEnum.h:819
@ MID_GNE_TOOLBARFILE_SAVEJUPEDSIMELEMENTS_AS
save JuPedSim as
Definition GUIAppEnum.h:725
@ MID_GNE_LOCK_JUNCTION
lock junctions
Definition GUIAppEnum.h:857
@ MID_GNE_LOCK_POI
lock POIs
Definition GUIAppEnum.h:877
@ MID_HOTKEY_P_MODE_POLYGON_PERSON
hotkey for mode creating polygons
Definition GUIAppEnum.h:61
@ MID_HOTKEY_CTRL_L_SAVEASPLAINXML
save network as plain XML
Definition GUIAppEnum.h:105
@ MID_GNE_LOCK_TAZ
lock TAZs
Definition GUIAppEnum.h:873
@ MID_HOTKEY_CTRL_SHIFT_A_SAVEADDITIONALELEMENTS
Save Additional Elements.
Definition GUIAppEnum.h:202
@ KEY_F4
@ KEY_F9
@ KEY_F6
@ KEY_F7
@ KEY_F10
@ KEY_F5
@ KEY_F12
@ KEY_F2
@ KEY_F3
@ KEY_F8
@ KEY_F11
@ KEY_F1
constexpr int MOUSE_OFFSET_X
constexpr int MOUSE_REFERENCE_Y
constexpr int MOUSE_REFERENCE_X
constexpr int MOUSE_OFFSET_Y
#define WRITE_ERRORF(...)
Definition MsgHandler.h:296
#define WRITE_ERROR(msg)
Definition MsgHandler.h:295
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
int getY() const
get y value
int getX() const
get x value
std::vector< InternalTest::ViewPosition > interpolateViewPositions(const InternalTest::ViewPosition &viewStartPosition, const int offsetStartX, const int offsetStartY, const InternalTest::ViewPosition &viewEndPosition, const int offsetEndX, const int offsetEndY) const
interpolate view positions
void addTestSteps(InternalTestStep *internalTestStep)
add test steps
const std::map< std::string, InternalTest::ContextualMenu > & getContextualMenuOperations() const
get map with contextual menu operation jump steps
const std::map< std::string, int > & getAttributesEnum() const
get map with attributesEnum jump steps
const std::map< std::string, InternalTest::ViewPosition > & getViewPositions() const
get map with view position pairs
FXint getTime() const
get currentTime
void updateLastMovedPosition(const int x, const int y)
update last moved position
const InternalTest::ViewPosition & getLastMovedPosition() const
get last moved position
const std::map< std::string, InternalTest::Movement > & getMovements() const
get map with movement pairs
dialog arguments, used for certain modal dialogs that can not be edited using tab
const std::string & getCustomAction() const
get custom action
Action getAction() const
get basic action
DialogType getType() const
get type
DialogArgument()=delete
invalidated default constructor
std::string myCustomAction
action to be carried out in the dialog
struct used for test TLS Tables
TLSTableTest()=delete
invalidated default constructor
void changeSupermode()
process changeSupermode function
const std::string & getDescription() const
get description
void contextualMenuOperation() const
process contextualMenuOperation function
FXEvent * buildKeyPressEvent(const std::string &key) const
build key press event
std::pair< FXint, FXString > translateKey(const std::string &key) const
translate key
void modifyVTypeDialogAttribute() const
process modifyVTypeDialogAttribute function
void createSquaredShape()
process createSquaredShape function
void * getEvent() const
get event associated with this step
std::string stripSpaces(const std::string &str) const
strip spaces
void fixStoppingPlace()
process fixStoppingPlace function
void modifyVClassDialog_DisallowAll(const int overlappedTabs) const
process modifyVClassDialog_DisallowAll function
Category myCategory
step category
void joinTSL() const
process join TLS function
void modifyCrossingDefaultBoolValue() const
process modifyCrossingDefaultBoolValue function
FXEvent * myEvent
list of events associated with this step
void modifyVClassDialog_Reset(const int overlappedTabs) const
process modifyVClassDialog_Reset function
InternalTestStep()=delete
invalidate default constructor
void buildMouseDragDrop(const InternalTest::ViewPosition &viewStartPosition, const int offsetStartX, const int offsetStartY, const InternalTest::ViewPosition &viewEndPosition, const int offsetEndX, const int offsetEndY, const std::string &keyModifier) const
build mouse dragdrop
void reloadFile()
process reload file function
void disJoinTLS() const
process disJoin TLS function
void lockSelection() const
process lockSelection function
void modifyTLSTable()
process modifyTLSTable function
std::string getStringArgument(const std::string &argument) const
get string argument
InternalTestStep * getNextStep() const
get next step
std::string myDescription
description
void setupAndStart()
process setupAndStart function
void crossingInvertEdges() const
process crossingInvertEdges function
void resetSingleTLSPhases() const
process resetSingleTLSPhases function
void modifyStringAttribute(Category category, const int tabs, const int overlappedTabs, const std::string &value) const
modify attribute
void checkParameters(const int overlappedTabs) const
process checkParameters function
void selection() const
process selection function
void pressTLSButton(const std::string &type)
process pressTLSButton function
void resetAllTLSPhases() const
process resetAllTLSPhases function
void selectAdditionalChild()
process selectChild function
FXSelector getSelector() const
get selector (based in messageType and messageID)
void buildRedo(const int number) const
process check redo function
void undo() const
process undo function
InternalTestStep * myNextStep
next step in the test
void moveElementVertical() const
process moveElementVertical function
void focusOnFrame() const
process focusOnFrame function
void modifyColorAttribute(const int overlappedTabs) const
process modifyColorAttribute function
bool getBoolArgument(const std::string &argument) const
get bool argument
bool updateView() const
check if update view
void overwritingAccept()
process overwriting accept function
void selectEdgeType()
process select edge type function
void protectElements() const
process protect elements function
void createCrossing() const
process createCrossing function
void checkDoubleParameters(const int overlappedTabs) const
process checkDoubleParameters function
void modifyBoolAttribute(const int overlappedTabs) const
process modifyBoolAttribute function
void addPhase(const std::string &type)
process addPhase function
void createNewEdgeType()
process create new edge type function
void mouseClick(const std::string &button, const std::string &modifier) const
process click function
void checkUndoRedo() const
process check undo-redo function
DialogArgument * myDialogArgument
dialog argument
void crossingClearEdges() const
process crossingClearEdges function
void overwritingApplyToAll()
process overwriting apply to all function
void saveExistentFile()
process save existent function
bool checkBoolArgument(const std::string &argument) const
check bool argument
std::string parseStep(const std::string &rowText)
parse function and arguments
void modifyVClassDialog_NoDisallowAll(const int overlappedTabs) const
process modifyVClassDialog_DisallowAll function
void copyMeanData()
process copyMeanData function
void deleteTLS() const
process delete TLS function
void buildMouseClick(const InternalTest::ViewPosition &viewPosition, const int offsetX, const int offsetY, const std::string &button, const std::string &keyModifier) const
build mouse click event
InternalTest * myTestSystem
test system parent
void openAboutDialog()
process openAboutDialog function
void createShape(const InternalTest::ViewPosition &viewPosition, const int sizeX, const int sizeY, const bool close, const bool line) const
create shape
void saveConnectionEdit() const
process createConnectionEdit function
TLSTableTest * myTLSTableTest
TLS Table test.
void createTLS(const int overlappedTabs) const
process createTLS function
void modifyAttribute(const int overlappedTabs) const
process modifyAttribute function
void selectNetworkItems() const
process selectNetworkItems function
bool checkIntArgument(const std::string &argument) const
check int argument
void copyTLS() const
process Copy TLS function
void writeClickInfo(const InternalTest::ViewPosition &viewPosition, const int offsetX, const int offsetY, const std::string modifier) const
write click info
void changeEditMode()
process changeEditMode function
DialogArgument * getDialogArgument() const
get dialog argument
void createDataSet() const
process createDataSet function
void createMeanData()
process createMeanData function
void buildTwoPressKeyEvent(Category category, const std::string &keyA, const std::string &keyB, const bool updateView) const
build a two key press and key release (used for tabs, spaces, enter, etc)
void waitDeleteWarning() const
process waitDeleteWarning function
void createConnection(const std::string &keyModifier) const
process createConnection function
FXSelector myMessageID
message ID
TLSTableTest * getTLSTableTest() const
get TLS Table test
FXSelector getMessageID() const
get message ID
void createDataInterval() const
process createDataInterval function
void buildUndo(const int number) const
process check undo function
void moveElementHorizontal() const
process moveElementHorizontal function
void computeJunctions()
process computeJunctions function
void saveFileAs()
process save file as function
bool myUpdateView
flag to enable or disable view after execute step
void pressTLSPhaseButton() const
process pressTLSPhaseButton function
void parseArguments(const std::string &arguments)
parse arguments
void quit()
process quit function
void changeElement() const
process changeElement function
void deleteMeanData()
process deleteMeanData function
void changeMode()
process changeMode function
bool checkStringArgument(const std::string &argument) const
check string argument
void buildPressKeyEvent(Category category, const std::string &key, const bool updateView) const
build a key press and key release (used for tabs, spaces, enter, etc)
~InternalTestStep()
destructor
void changePlan() const
@bief process changePlan function
void redo() const
process redo function
void fixCrossings()
process fixCrossings function
void overwritingAbort()
process overwriting abort function
FXSelector myMessageType
message type (by default SEL_COMMAND)
void createRectangledShape()
process createRectangledShape function
void createLineShape()
process createLineShape function
void typeKey() const
process typeKey function
std::vector< std::string > myArguments
arguments
void writeError(const std::string &function, const int overlapping, const std::string &expected) const
write error
void setNextStep(InternalTestStep *nextStep)
set next step
Category getCategory() const
get category
void fixRoute()
process fixRoutes function
void selectionRectangle() const
process selectionRectangle function
void saveNewFile()
process save new file function
void leftClickOffset(const std::string &button) const
process click function
void computeJunctionsVolatileOptions()
process computeJunctionsVolatileOptions function
void modifyVClassDialog_Cancel(const int overlappedTabs) const
process modifyVClassDialog_Cancel function
void overwritingCancel()
process overwriting cancel function
void moveElement() const
process moveElement function
int getIntArgument(const std::string &argument) const
get int argument
FXEvent * buildKeyReleaseEvent(const std::string &key) const
build key release event
FXSelector getMessageType() const
get message type
void deleteFunction() const
process delete function
FXEvent * buildMouseMoveEvent(const InternalTest::ViewPosition &viewPosition, const int offsetX, const int offsetY, const int clickedButton, const std::string &keyModifier, const int numberOfClicks) const
build mouse move event
void loadFile()
process load file function
void modifyCrossingDefaultValue() const
process modifyCrossingDefaultValue function
void finish()
finish function
FXEvent * buildMouseClickEvent(FXSelType type, const InternalTest::ViewPosition &viewPosition, const int offsetX, const int offsetY, const std::string &keyModifier, const int numberOfClicks) const
build mouse left click press event
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...
static bool isInt(const std::string &sData)
check if the given sData can be converted to int