![]() |
SUMO - Simulation of Urban MObility
|
#include <GNEChange_Crossing.h>
Public Member Functions | |
GNEChange_Crossing (GNEJunction *junctionParent, const std::vector< NBEdge *> &edges, double width, bool priority, int customTLIndex, const PositionVector &customShape, bool selected, bool forward) | |
Constructor for creating/deleting an crossing. More... | |
virtual FXuint | size () const |
return actual size More... | |
~GNEChange_Crossing () | |
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 | |
PositionVector | myCustomShape |
priority of GNECrossing More... | |
int | myCustomTLIndex |
custom index of GNECrossing More... | |
std::vector< NBEdge * > | myEdges |
vector to save all edges of GNECrossing More... | |
GNEJunction * | myJunctionParent |
full information regarding the Junction in which GNECRossing is created More... | |
bool | myPriority |
priority of GNECrossing More... | |
bool | mySelected |
flag to indicates if crossing was previously selected More... | |
double | myWidth |
width of GNECrossing More... | |
A network change in which a single crossing is created or deleted
Definition at line 53 of file GNEChange_Crossing.h.
GNEChange_Crossing::GNEChange_Crossing | ( | GNEJunction * | junctionParent, |
const std::vector< NBEdge *> & | edges, | ||
double | width, | ||
bool | priority, | ||
int | customTLIndex, | ||
const PositionVector & | customShape, | ||
bool | selected, | ||
bool | forward | ||
) |
Constructor for creating/deleting an crossing.
constructor for creating an crossing
[in] | JunctionParent | GNEJunction in which the crossing will be created/deleted |
[in] | edges | vector of edges of crossing |
[in] | width | value with the width of crossing |
[in] | priority | boolean with the priority of crossing |
[in] | check | if in the moment of change connection was selected |
[in] | forward | Whether to create/delete (true/false) |
Definition at line 50 of file GNEChange_Crossing.cpp.
GNEChange_Crossing::~GNEChange_Crossing | ( | ) |
|
virtual |
redo action
Reimplemented from GNEChange.
Definition at line 124 of file GNEChange_Crossing.cpp.
References NBNode::addCrossing(), NBNode::Crossing::edges, GNEJunction::getGNECrossings(), GNEAttributeCarrier::getID(), GNEJunction::getNBNode(), GNENet::getNetBuilder(), OptionsCont::getOptions(), GNEAttributeCarrier::getTag(), GNENet::getViewNet(), gSelected, NBNetBuilder::haveNetworkCrossings(), myEdges, GNEChange::myForward, myJunctionParent, GNEChange::myNet, myPriority, mySelected, myWidth, GNENet::netHasGNECrossings(), GNEJunction::rebuildGNECrossings(), NBNode::removeCrossing(), GUISelectedStorage::select(), NBNetBuilder::setHaveNetworkCrossings(), SUMO_TAG_CROSSING, toString(), and WRITE_WARNING.
|
virtual |
get Redo name
Reimplemented from GNEChange.
Definition at line 190 of file GNEChange_Crossing.cpp.
References GNEChange::myForward, SUMO_TAG_CROSSING, and toString().
|
virtualinherited |
return actual size
Definition at line 52 of file GNEChange.cpp.
|
virtual |
undo action
Reimplemented from GNEChange.
Definition at line 69 of file GNEChange_Crossing.cpp.
References NBNode::addCrossing(), NBNode::Crossing::edges, GNEJunction::getGNECrossings(), GNEAttributeCarrier::getID(), GNEJunction::getNBNode(), GNENet::getNetBuilder(), OptionsCont::getOptions(), GNEAttributeCarrier::getTag(), GNENet::getViewNet(), gSelected, NBNetBuilder::haveNetworkCrossings(), myCustomShape, myCustomTLIndex, myEdges, GNEChange::myForward, myJunctionParent, GNEChange::myNet, myPriority, mySelected, myWidth, GNENet::netHasGNECrossings(), GNEJunction::rebuildGNECrossings(), NBNode::removeCrossing(), GUISelectedStorage::select(), NBNetBuilder::setHaveNetworkCrossings(), SUMO_TAG_CROSSING, toString(), and WRITE_WARNING.
|
virtual |
return undoName
Reimplemented from GNEChange.
Definition at line 180 of file GNEChange_Crossing.cpp.
References GNEChange::myForward, SUMO_TAG_CROSSING, and toString().
|
private |
|
private |
custom index of GNECrossing
Definition at line 101 of file GNEChange_Crossing.h.
Referenced by undo().
|
private |
vector to save all edges of GNECrossing
Definition at line 92 of file GNEChange_Crossing.h.
|
protectedinherited |
we group antagonistic commands (create junction/delete junction) and keep them apart by this flag
Definition at line 86 of file GNEChange.h.
Referenced by GNEChange_Junction::redo(), GNEChange_Shape::redo(), GNEChange_Selection::redo(), GNEChange_TLS::redo(), GNEChange_VariableSpeedSignItem::redo(), GNEChange_Connection::redo(), GNEChange_Lane::redo(), GNEChange_Additional::redo(), GNEChange_Edge::redo(), redo(), GNEChange_CalibratorItem::redo(), GNEChange_RerouterItem::redo(), GNEChange_Shape::redoName(), GNEChange_Junction::redoName(), GNEChange_Selection::redoName(), GNEChange_TLS::redoName(), GNEChange_Additional::redoName(), GNEChange_Connection::redoName(), GNEChange_Lane::redoName(), GNEChange_Edge::redoName(), redoName(), GNEChange_Shape::undo(), GNEChange_Junction::undo(), GNEChange_Selection::undo(), GNEChange_TLS::undo(), GNEChange_VariableSpeedSignItem::undo(), GNEChange_Connection::undo(), GNEChange_Lane::undo(), GNEChange_Additional::undo(), GNEChange_Edge::undo(), undo(), GNEChange_CalibratorItem::undo(), GNEChange_RerouterItem::undo(), GNEChange_Shape::undoName(), GNEChange_Junction::undoName(), GNEChange_Selection::undoName(), GNEChange_TLS::undoName(), GNEChange_Connection::undoName(), GNEChange_Lane::undoName(), GNEChange_Additional::undoName(), GNEChange_Edge::undoName(), and undoName().
|
private |
full information regarding the Junction in which GNECRossing is created
Definition at line 89 of file GNEChange_Crossing.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 81 of file GNEChange.h.
Referenced by GNEChange_Junction::redo(), GNEChange_Shape::redo(), GNEChange_Selection::redo(), GNEChange_VariableSpeedSignItem::redo(), GNEChange_Additional::redo(), GNEChange_Lane::redo(), GNEChange_Edge::redo(), redo(), GNEChange_CalibratorItem::redo(), GNEChange_RerouterItem::redo(), GNEChange_Shape::undo(), GNEChange_Junction::undo(), GNEChange_Selection::undo(), GNEChange_VariableSpeedSignItem::undo(), GNEChange_Additional::undo(), GNEChange_Lane::undo(), GNEChange_Edge::undo(), undo(), GNEChange_CalibratorItem::undo(), GNEChange_RerouterItem::undo(), GNEChange_Additional::~GNEChange_Additional(), GNEChange_CalibratorItem::~GNEChange_CalibratorItem(), ~GNEChange_Crossing(), and GNEChange_Shape::~GNEChange_Shape().
|
private |
priority of GNECrossing
Definition at line 98 of file GNEChange_Crossing.h.
|
private |
flag to indicates if crossing was previously selected
Definition at line 107 of file GNEChange_Crossing.h.
|
private |
width of GNECrossing
Definition at line 95 of file GNEChange_Crossing.h.