![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEChange_Lane.h>
Public Member Functions | |
GNEChange_Lane (GNEEdge *edge, GNELane *lane, const NBEdge::Lane &laneAttrs, bool forward, bool recomputeConnections=true) | |
Constructor for creating/deleting an edge. More... | |
virtual FXuint | size () const |
return actual size More... | |
~GNEChange_Lane () | |
Destructor. More... | |
inherited from GNEChange | |
get undo Name | |
FXString | undoName () const |
return undoName More... | |
FXString | redoName () const |
get Redo name More... | |
void | undo () |
undo action More... | |
void | redo () |
redo action More... | |
Protected Attributes | |
bool | myForward |
we group antagonistic commands (create junction/delete junction) and keep them apart by this flag More... | |
GNENet * | myNet |
the net to which operations shall be applied or which shall be informed about gui updates (we are not responsible for the pointer) More... | |
Private Attributes | |
std::vector< GNEAdditional * > | myChildAdditionals |
vector of child additional More... | |
std::vector< GNEDemandElement * > | myChildDemandElements |
vector of child demand elements More... | |
std::vector< GNEShape * > | myChildShapes |
vector of child shapes More... | |
GNEEdge * | myEdge |
we need the edge because it is the target of our change commands More... | |
GNELane * | myLane |
we need to preserve the lane because it maybe the target of GNEChange_Attribute commands More... | |
const NBEdge::Lane | myLaneAttrs |
we need to preserve the attributes explicitly because they are not contained withing GNELane itself More... | |
std::vector< GNEAdditional * > | myParentAdditionals |
vector of parent additionals More... | |
std::vector< GNEDemandElement * > | myParentDemandElements |
vector of parent demand elements More... | |
std::vector< GNEShape * > | myParentShapes |
vector of parent shapes More... | |
bool | myRecomputeConnections |
@bried whether to recompute connection when adding a new lane More... | |
A network change in which a single lane is created or deleted
Definition at line 46 of file GNEChange_Lane.h.
GNEChange_Lane::GNEChange_Lane | ( | GNEEdge * | edge, |
GNELane * | lane, | ||
const NBEdge::Lane & | laneAttrs, | ||
bool | forward, | ||
bool | recomputeConnections = true |
||
) |
Constructor for creating/deleting an edge.
constructor for creating an edge
[in] | edge | The edge on which to apply changes |
[in] | lane | The lane to be deleted or 0 if a lane should be created |
[in] | laneAttrs | The attributes of the lane to be created/deleted |
[in] | forward | Whether to create/delete (true/false) |
[in] | recomputeConnections | Whether to recompute all connections for the affected edge |
Definition at line 43 of file GNEChange_Lane.cpp.
GNEChange_Lane::~GNEChange_Lane | ( | ) |
Destructor.
Definition at line 67 of file GNEChange_Lane.cpp.
References GNEReferenceCounter::decRef(), GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTagStr(), myEdge, myLane, GNEReferenceCounter::unreferenced(), and WRITE_DEBUG.
|
virtual |
redo action
Reimplemented from GNEChange.
Definition at line 154 of file GNEChange_Lane.cpp.
References GNEEdge::addLane(), GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTagStr(), myChildAdditionals, myChildDemandElements, myChildShapes, myEdge, GNEChange::myForward, myLane, myLaneAttrs, GNEChange::myNet, myParentAdditionals, myParentDemandElements, myParentShapes, myRecomputeConnections, GNEEdge::removeLane(), GNENet::requireSaveNet(), SUMO_TAG_EDGE, SUMO_TAG_LANE, toString(), and WRITE_DEBUG.
|
virtual |
get Redo name
Reimplemented from GNEChange.
Definition at line 230 of file GNEChange_Lane.cpp.
References GNEChange::myForward, SUMO_TAG_LANE, and toString().
|
virtualinherited |
return actual size
Definition at line 44 of file GNEChange.cpp.
|
virtual |
undo action
Reimplemented from GNEChange.
Definition at line 87 of file GNEChange_Lane.cpp.
References GNEEdge::addLane(), GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTagStr(), myChildAdditionals, myChildDemandElements, myChildShapes, myEdge, GNEChange::myForward, myLane, myLaneAttrs, GNEChange::myNet, myParentAdditionals, myParentDemandElements, myParentShapes, GNEEdge::removeLane(), GNENet::requireSaveNet(), SUMO_TAG_EDGE, SUMO_TAG_LANE, toString(), and WRITE_DEBUG.
|
virtual |
return undoName
Reimplemented from GNEChange.
Definition at line 220 of file GNEChange_Lane.cpp.
References GNEChange::myForward, SUMO_TAG_LANE, and toString().
|
private |
vector of child additional
Definition at line 104 of file GNEChange_Lane.h.
|
private |
vector of child demand elements
Definition at line 107 of file GNEChange_Lane.h.
|
private |
vector of child shapes
Definition at line 101 of file GNEChange_Lane.h.
|
private |
we need the edge because it is the target of our change commands
Definition at line 80 of file GNEChange_Lane.h.
Referenced by redo(), undo(), and ~GNEChange_Lane().
|
protectedinherited |
we group antagonistic commands (create junction/delete junction) and keep them apart by this flag
Definition at line 80 of file GNEChange.h.
Referenced by GNEChange_Junction::redo(), GNEChange_Shape::redo(), GNEChange_TLS::redo(), GNEChange_Additional::redo(), GNEChange_DemandElement::redo(), GNEChange_Children::redo(), GNEChange_Connection::redo(), GNEChange_Edge::redo(), redo(), GNEChange_Crossing::redo(), GNEChange_Shape::redoName(), GNEChange_Junction::redoName(), GNEChange_TLS::redoName(), GNEChange_Additional::redoName(), GNEChange_DemandElement::redoName(), GNEChange_Children::redoName(), GNEChange_Connection::redoName(), GNEChange_Edge::redoName(), redoName(), GNEChange_Crossing::redoName(), GNEChange_Junction::undo(), GNEChange_Shape::undo(), GNEChange_TLS::undo(), GNEChange_Additional::undo(), GNEChange_DemandElement::undo(), GNEChange_Children::undo(), GNEChange_Connection::undo(), GNEChange_Edge::undo(), undo(), GNEChange_Crossing::undo(), GNEChange_Junction::undoName(), GNEChange_Shape::undoName(), GNEChange_TLS::undoName(), GNEChange_Additional::undoName(), GNEChange_DemandElement::undoName(), GNEChange_Children::undoName(), GNEChange_Connection::undoName(), GNEChange_Edge::undoName(), undoName(), and GNEChange_Crossing::undoName().
|
private |
we need to preserve the lane because it maybe the target of GNEChange_Attribute commands
Definition at line 83 of file GNEChange_Lane.h.
Referenced by redo(), undo(), and ~GNEChange_Lane().
|
private |
we need to preserve the attributes explicitly because they are not contained withing GNELane itself
Definition at line 86 of file GNEChange_Lane.h.
|
protectedinherited |
the net to which operations shall be applied or which shall be informed about gui updates (we are not responsible for the pointer)
Definition at line 75 of file GNEChange.h.
Referenced by GNEChange_Crossing::GNEChange_Crossing(), GNEChange_Junction::redo(), GNEChange_Shape::redo(), GNEChange_Additional::redo(), GNEChange_TLS::redo(), GNEChange_DemandElement::redo(), GNEChange_Children::redo(), GNEChange_EnableAttribute::redo(), GNEChange_Connection::redo(), GNEChange_Edge::redo(), redo(), GNEChange_Crossing::redo(), GNEChange_Attribute::redo(), GNEChange_Junction::undo(), GNEChange_Shape::undo(), GNEChange_Additional::undo(), GNEChange_TLS::undo(), GNEChange_DemandElement::undo(), GNEChange_EnableAttribute::undo(), GNEChange_Children::undo(), GNEChange_Connection::undo(), GNEChange_Edge::undo(), undo(), GNEChange_Crossing::undo(), GNEChange_Attribute::undo(), GNEChange_Additional::~GNEChange_Additional(), GNEChange_Attribute::~GNEChange_Attribute(), GNEChange_Crossing::~GNEChange_Crossing(), GNEChange_DemandElement::~GNEChange_DemandElement(), GNEChange_EnableAttribute::~GNEChange_EnableAttribute(), and GNEChange_Shape::~GNEChange_Shape().
|
private |
vector of parent additionals
Definition at line 95 of file GNEChange_Lane.h.
|
private |
vector of parent demand elements
Definition at line 98 of file GNEChange_Lane.h.
|
private |
vector of parent shapes
Definition at line 92 of file GNEChange_Lane.h.
|
private |
@bried whether to recompute connection when adding a new lane
Definition at line 89 of file GNEChange_Lane.h.
Referenced by redo().