44 myEdge->incRef(
"GNEChange_Lane");
55 myEdge->incRef(
"GNEChange_Lane");
56 myLane->incRef(
"GNEChange_Lane");
62 if (
myEdge->getNet()->getViewNet()->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed()) {
63 myEdge->decRef(
"GNEChange_Lane");
64 if (
myEdge->unreferenced()) {
68 myLane->decRef(
"GNEChange_Lane");
69 if (
myLane->unreferenced()) {
85 myLane->unselectAttributeCarrier();
90 myLane->selectAttributeCarrier();
96 myEdge->getNet()->getSavingStatus()->requireSaveNetwork();
105 myLane->selectAttributeCarrier();
112 myLane->unselectAttributeCarrier();
118 myEdge->getNet()->getSavingStatus()->requireSaveNetwork();
125 return (
TL(
"Undo create lane '") +
myLane->getID() +
"'");
127 return (
TL(
"Undo delete lane '") +
myLane->getID() +
"'");
135 return (
TL(
"Redo create lane '") +
myLane->getID() +
"'");
137 return (
TL(
"Redo delete lane '") +
myLane->getID() +
"'");
Supermode
@brie enum for supermodes
@ NETWORK
Network mode (Edges, junctions, etc..).
const NBEdge::Lane myLaneAttrs
we need to preserve the attributes explicitly because they are not contained withing GNELane itself
std::string redoName() const
get Redo name
GNEChange_Lane(GNEEdge *edge, const NBEdge::Lane &laneAttrs)
Constructor for creating a lane.
~GNEChange_Lane()
Destructor.
GNELane * myLane
we need to preserve the lane because it maybe the target of GNEChange_Attribute commands
bool myRecomputeConnections
whether to recompute connection when adding a new lane
GNEEdge * myEdge
we need the edge because it is the target of our change commands
std::string undoName() const
return undoName
the function-object for an editing operation (abstract base)
bool myForward
we group antagonistic commands (create junction/delete junction) and keep them apart by this flag
const bool mySelectedElement
flag for check if element is selected
GNEChange(Supermode supermode, bool forward, const bool selectedElement)
Constructor.
C++ TraCI client API implementation.
The representation of a single edge during network building.
An (internal) definition of a single lane of an edge.