41 myLaneAttrs(laneAttrs),
42 myRecomputeConnections(true) {
43 myEdge->incRef(
"GNEChange_Lane");
48 GNEChange(lane, forward, lane->isAttributeCarrierSelected()),
51 myLaneAttrs(laneAttrs),
52 myRecomputeConnections(recomputeConnections) {
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_EDGE
begin/end of the description of an edge
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const std::string & getTagStr() const
get tag assigned to this object in string format
void unselectAttributeCarrier(const bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
GNENet * getNet() const
get pointer to net
void selectAttributeCarrier(const bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
FXString undoName() const
return undoName
const NBEdge::Lane myLaneAttrs
we need to preserve the attributes explicitly because they are not contained withing GNELane itself
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
@bried whether to recompute connection when adding a new lane
GNEEdge * myEdge
we need the edge because it is the target of our change commands
FXString redoName() const
get Redo name
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
void addElementInParentsAndChildren(T *element)
add given element into parents and children (only use in redo() function)
void removeElementFromParentsAndChildren(T *element)
remove given element from parents and children (only use in redo() function)
void restoreHierarchicalContainers()
restore container (only use in undo() function)
A road/street connecting two junctions (netedit-version)
void removeLane(GNELane *lane, bool recomputeConnections)
@briefdecrease the number of lanes by one. argument is only used to increase robustness (assertions)
void addLane(GNELane *lane, const NBEdge::Lane &laneAttrs, bool recomputeConnections)
increase number of lanes by one use the given attributes and restore the GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
void requireSaveNet(bool value)
inform that net has to be saved
const std::string & getID() const
get ID
void decRef(const std::string &debugMsg="")
Decrease reference.
void incRef(const std::string &debugMsg="")
Increarse reference.
bool unreferenced()
check if object ins't referenced
C++ TraCI client API implementation.
The representation of a single edge during network building.
An (internal) definition of a single lane of an edge.