![]() |
SUMO - Simulation of Urban MObility
|
A NBNetBuilder extended by visualisation and editing capabilities. More...
#include <GNENet.h>
Public Member Functions | |
void | addExplicitTurnaround (std::string id) |
add edge id to the list of explicit turnarounds More... | |
GNEEdge * | addReversedEdge (GNEEdge *edge, GNEUndoList *undoList) |
add reversed edge More... | |
void | changeEdgeEndpoints (GNEEdge *edge, const std::string &newSourceID, const std::string &newDestID) |
modifies endpoins of the given edge More... | |
void | computeAndUpdate (OptionsCont &oc) |
recompute the network and update lane geometries More... | |
void | computeEverything (GNEApplicationWindow *window, bool force=false) |
void | computeJunction (GNEJunction *junction) |
GNEEdge * | createEdge (GNEJunction *src, GNEJunction *dest, GNEEdge *tpl, GNEUndoList *undoList, const std::string &suggestedName="", bool wasSplit=false, bool allowDuplicateGeom=false) |
creates a new edge (unless an edge with the same geometry already exists) More... | |
GNEJunction * | createJunction (const Position &pos, GNEUndoList *undoList) |
creates a new junction More... | |
void | deleteEdge (GNEEdge *edge, GNEUndoList *undoList) |
removes edge More... | |
void | deleteGeometryOrEdge (GNEEdge *edge, const Position &pos, GNEUndoList *undoList) |
removes geometry when pos is close to a geometry node, deletes the whole edge otherwise More... | |
void | deleteJunction (GNEJunction *junction, GNEUndoList *undoList) |
removes junction and all incident edges More... | |
void | deleteLane (GNELane *lane, GNEUndoList *undoList) |
removes lane More... | |
virtual void | drawGLAdditional (GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const |
Draws additional, user-triggered visualisations. More... | |
void | drawName (const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const |
void | duplicateLane (GNELane *lane, GNEUndoList *undoList) |
duplicates lane More... | |
void | finishMoveSelection (GNEUndoList *undoList) |
register changes to junction and edge positions with the undoList More... | |
FXApp * | getApp () |
const Boundary & | getBoundary () const |
returns the bounder of the network More... | |
std::set< GUIGlID > | getGlIDs (GUIGlObjectType type=GLO_MAX) |
ShapeContainer & | getShapeContainer () |
NBTrafficLightLogicCont & | getTLLogicCont () |
returns the tllcont of the underlying netbuilder More... | |
SUMORTree & | getVisualisationSpeedUp () |
Returns the RTree used for visualisation speed-up. More... | |
const SUMORTree & | getVisualisationSpeedUp () const |
Returns the RTree used for visualisation speed-up. More... | |
GNENet (NBNetBuilder *netBuilder) | |
Constructor. More... | |
void | joinSelectedJunctions (GNEUndoList *undoList) |
void | mergeJunctions (GNEJunction *moved, GNEJunction *target, GNEUndoList *undoList) |
merge the given junctions edges between the given junctions will be deleted More... | |
void | moveSelection (const Position &moveSrc, const Position &moveDest) |
void | refreshElement (GUIGlObject *o) |
refreshes boundary information for o and update More... | |
void | removeExplicitTurnaround (std::string id) |
remove edge id from the list of explicit turnarounds More... | |
void | removeSolitaryJunctions (GNEUndoList *undoList) |
void | renameEdge (GNEEdge *edge, const std::string &newID) |
updates the map and reserves new id More... | |
void | renameJunction (GNEJunction *junction, const std::string &newID) |
updates the map and reserves new id More... | |
void | replaceJunctionByGeometry (GNEJunction *junction, GNEUndoList *undoList) |
void | requireRecompute () |
inform the net about the need for recomputation More... | |
std::vector< GNEAttributeCarrier * > | retrieveAttributeCarriers (const std::set< GUIGlID > &ids, GUIGlObjectType type) |
get the attribute carriers based on GlIDs More... | |
GNEEdge * | retrieveEdge (const std::string &id, bool failHard=true) |
get edge by id More... | |
std::vector< GNEEdge * > | retrieveEdges (bool onlySelected=false) |
return all edges More... | |
GNEJunction * | retrieveJunction (const std::string &id, bool failHard=true) |
get junction by id More... | |
std::vector< GNEJunction * > | retrieveJunctions (bool onlySelected=false) |
return all junctions More... | |
std::vector< GNELane * > | retrieveLanes (bool onlySelected=false) |
return all lanes More... | |
void | reverseEdge (GNEEdge *edge, GNEUndoList *undoList) |
reverse edge More... | |
void | save (OptionsCont &oc) |
save the network More... | |
void | saveJoined (OptionsCont &oc) |
save log of joined junctions (and nothing else) More... | |
void | savePlain (OptionsCont &oc) |
save plain xml representation of the network (and nothing else) More... | |
void | setUpdateTarget (FXWindow *updateTarget) |
Set the target to be notified of network changes. More... | |
GNEJunction * | splitEdge (GNEEdge *edge, const Position &pos, GNEUndoList *undoList, GNEJunction *newJunction=0) |
split edge at position by inserting a new junction More... | |
void | splitEdgesBidi (const std::set< GNEEdge * > &edges, const Position &pos, GNEUndoList *undoList) |
split all edges at position by inserting one new junction More... | |
~GNENet () | |
Destructor. More... | |
inherited from GUIGlObject | |
GUIGLObjectPopupMenu * | getPopUpMenu (GUIMainWindow &app, GUISUMOAbstractView &parent) |
Returns an own popup-menu. More... | |
GUIParameterTableWindow * | getParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent) |
Returns an own parameter window. More... | |
Boundary | getCenteringBoundary () const |
Returns the boundary to which the view shall be centered in order to show the object. More... | |
const Boundary & | getZBoundary () const |
Returns the Z boundary (stored in the x() coordinate) values of 0 do not affect the boundary. More... | |
void | drawGL (const GUIVisualizationSettings &s) const |
Draws the object. More... | |
Atomar getter methods | |
const std::string & | getFullName () const |
Returns the full name appearing in the tool tip. More... | |
virtual const std::string & | getParentName () const |
Returns the name of the parent object (if any) More... | |
GUIGlID | getGlID () const |
Returns the numerical id of the object. More... | |
interfaces to be implemented by derived classes | |
virtual GUIParameterTableWindow * | getTypeParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent) |
Returns an own type parameter window (optional) More... | |
const std::string & | getMicrosimID () const |
Returns the id of the object as known to microsim. More... | |
virtual void | setMicrosimID (const std::string &newID) |
Changes the microsimID of the object (happens in NETEDIT) More... | |
GUIGlObjectType | getType () const |
Returns the type of the object as coded in GUIGlObjectType. More... | |
Parameter table window I/O | |
void | addParameterTable (GUIParameterTableWindow *w) |
Lets this object know a parameter window showing the object's values was opened. More... | |
void | removeParameterTable (GUIParameterTableWindow *w) |
Lets this object know a parameter window showing the object's values was closed. More... | |
Static Public Attributes | |
static const RGBColor | selectedLaneColor |
static const RGBColor | selectionColor |
static StringBijection< GUIGlObjectType > | TypeNames |
associates object types with strings More... | |
Protected Member Functions | |
void | setPrefix (const std::string &prefix) |
helper methods for building popup-menus | |
void | buildPopupHeader (GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true) |
Builds the header. More... | |
void | buildCenterPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to center to the object. More... | |
void | buildNameCopyPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds entries which allow to copy the name / typed name into the clipboard. More... | |
void | buildSelectionPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to (de)select the object. More... | |
void | buildShowParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to open the parameter window. More... | |
void | buildShowTypeParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to open the type parameter window. More... | |
void | buildPositionCopyEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position. More... | |
void | buildShowManipulatorPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true) |
Builds an entry which allows to open the manipulator window. More... | |
Private Member Functions | |
void | deleteSingleEdge (GNEEdge *edge) |
deletes a single edge More... | |
void | deleteSingleJunction (GNEJunction *junction) |
deletes a single junction More... | |
void | initDetectors () |
Initialises the detector wrappers. More... | |
void | initTLMap () |
Initialises the tl-logic map and wrappers. More... | |
void | insertEdge (GNEEdge *edge) |
inserts a single edge into the net and into the underlying More... | |
void | insertJunction (GNEJunction *junction) |
inserts a single junction into the net and into the underlying More... | |
GNEEdge * | registerEdge (GNEEdge *edge) |
registers an edge with GNENet containers More... | |
GNEJunction * | registerJunction (GNEJunction *junction) |
registers a junction with GNENet containers More... | |
void | remapEdge (GNEEdge *oldEdge, GNEJunction *from, GNEJunction *to, GNEUndoList *undoList, bool keepEndpoints=false) |
void | reserveEdgeID (const std::string &id) |
void | reserveJunctionID (const std::string &id) |
void | update () |
notify myUpdateTarget More... | |
Private Attributes | |
std::set< std::string > | myExplicitTurnarounds |
list of edge ids for which turn-arounds must be added explicitly More... | |
SUMORTree | myGrid |
the rtree which contains all GUIGlObjects (so named for historical reasons) More... | |
bool | myNeedRecompute |
whether the net needs recomputation More... | |
NBNetBuilder * | myNetBuilder |
The internal netbuilder. More... | |
GUIShapeContainer | myShapeContainer |
the container for additional pois and polygons More... | |
FXWindow * | myUpdateTarget |
The window to be notofied of about changes. More... | |
Boundary | myZBoundary |
the z boundary (stored in the x-coordinate), values of 0 are ignored More... | |
ID Suppliers for newly created edges and junctions | |
IDSupplier | myEdgeIDSupplier |
IDSupplier | myJunctionIDSupplier |
Static Private Attributes | |
static const SUMOReal | Z_INITIALIZED = 1 |
marker for whether the z-boundary is initialized More... | |
Friends | |
class | GNEChange_Edge |
class | GNEChange_Junction |
internal GNE components | |
typedef std::map< std::string, GNEEdge * > | GNEEdges |
typedef std::map< std::string, GNEJunction * > | GNEJunctions |
GNEEdges | myEdges |
GNEJunctions | myJunctions |
A NBNetBuilder extended by visualisation and editing capabilities.
|
private |
|
private |
GNENet::GNENet | ( | NBNetBuilder * | netBuilder | ) |
Constructor.
[in] | netbuilder | the netbuilder which may already have been filled GNENet becomes responsible for cleaning this up |
Definition at line 88 of file GNENet.cpp.
References Boundary::add(), NBEdgeCont::getAllNames(), NBNodeCont::getAllNames(), NBNetBuilder::getEdgeCont(), Boundary::getHeight(), NBNetBuilder::getNodeCont(), Boundary::getWidth(), GUIGlObjectStorage::gIDStorage, myEdges, myGrid, myNetBuilder, myZBoundary, registerEdge(), registerJunction(), NBNodeCont::retrieve(), NBEdgeCont::retrieve(), GUIGlObjectStorage::setNetObject(), NBNodesEdgesSorter::sortNodesEdges(), Boundary::ymin(), and Z_INITIALIZED.
GNENet::~GNENet | ( | ) |
Destructor.
Definition at line 142 of file GNENet.cpp.
References myEdges, myJunctions, and myNetBuilder.
void GNENet::addExplicitTurnaround | ( | std::string | id | ) |
add edge id to the list of explicit turnarounds
Definition at line 844 of file GNENet.cpp.
References myExplicitTurnarounds.
Referenced by getApp(), and GNEJunction::setLogicValid().
|
inherited |
Lets this object know a parameter window showing the object's values was opened.
[in] | w | The opened parameter window |
Definition at line 198 of file GUIGlObject.cpp.
References GUIGlObject::myParamWindows.
GNEEdge * GNENet::addReversedEdge | ( | GNEEdge * | edge, |
GNEUndoList * | undoList | ||
) |
add reversed edge
[in] | edge | The edge of which to add the reverse |
Definition at line 436 of file GNENet.cpp.
References createEdge(), createJunction(), GNEEdge::getDest(), NBEdge::getGeometry(), GUIGlObject::getGlID(), GNEAttributeCarrier::getID(), NBEdge::getInnerGeometry(), NBEdge::getLaneSpreadFunction(), GNEEdge::getNBEdge(), GUISelectedStorage::getSelected(), GNEEdge::getSource(), NBEdge::getTotalWidth(), gSelected, LANESPREAD_RIGHT, PositionVector::move2side(), GNEUndoList::p_begin(), GNEUndoList::p_end(), PositionVector::reverse(), GNEEdge::setAttribute(), SUMO_ATTR_SHAPE, SUMOReal, and toString().
Referenced by getVisualisationSpeedUp(), and GNEViewNet::onCmdAddReversedEdge().
|
protectedinherited |
Builds an entry which allows to center to the object.
Definition at line 127 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_RECENTERVIEW, and MID_CENTER.
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIContainer::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GNELane::getPopUpMenu(), GNEJunction::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNEEdge::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds entries which allow to copy the name / typed name into the clipboard.
Definition at line 136 of file GUIGlObject.cpp.
References MID_COPY_NAME, and MID_COPY_TYPED_NAME.
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIContainer::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GNELane::getPopUpMenu(), GNEJunction::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNEEdge::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds the header.
Definition at line 117 of file GUIGlObject.cpp.
References GUIMainWindow::getBoldFont(), and GUIGlObject::getFullName().
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GNEInternalLane::getPopUpMenu(), GUIContainer::getPopUpMenu(), GNECrossing::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GNELane::getPopUpMenu(), GNEJunction::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNEEdge::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.
Definition at line 177 of file GUIGlObject.cpp.
References GeoConvHelper::getFinal(), MID_COPY_CURSOR_GEOPOSITION, and MID_COPY_CURSOR_POSITION.
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIContainer::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GNELane::getPopUpMenu(), GNEJunction::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNEEdge::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to (de)select the object.
Definition at line 146 of file GUIGlObject.cpp.
References GUIGlObject::getGlID(), GUIIconSubSys::getIcon(), GUIGlObject::getType(), gSelected, ICON_FLAG_MINUS, ICON_FLAG_PLUS, GUISelectedStorage::isSelected(), MID_ADDSELECT, and MID_REMOVESELECT.
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIContainer::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GNELane::getPopUpMenu(), GNEJunction::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNEEdge::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to open the manipulator window.
Definition at line 189 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_MANIP, and MID_MANIP.
Referenced by GUILaneSpeedTrigger::getPopUpMenu(), and GUITriggeredRerouter::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to open the parameter window.
Definition at line 159 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_APP_TABLE, and MID_SHOWPARS.
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUIContainer::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to open the type parameter window.
Definition at line 168 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_APP_TABLE, and MID_SHOWTYPEPARS.
Referenced by GUIBaseVehicle::getPopUpMenu().
void GNENet::changeEdgeEndpoints | ( | GNEEdge * | edge, |
const std::string & | newSourceID, | ||
const std::string & | newDestID | ||
) |
modifies endpoins of the given edge
Definition at line 825 of file GNENet.cpp.
References GNEEdge::getNBEdge(), GNEJunction::getNBNode(), NBEdge::reinitNodes(), requireRecompute(), retrieveJunction(), and update().
Referenced by GNEEdge::setAttribute(), and setUpdateTarget().
void GNENet::computeAndUpdate | ( | OptionsCont & | oc | ) |
recompute the network and update lane geometries
Definition at line 1004 of file GNENet.cpp.
References NBNetBuilder::compute(), myEdges, myExplicitTurnarounds, myJunctions, myNeedRecompute, myNetBuilder, and refreshElement().
Referenced by computeEverything(), getTLLogicCont(), save(), saveJoined(), and savePlain().
void GNENet::computeEverything | ( | GNEApplicationWindow * | window, |
bool | force = false |
||
) |
Definition at line 687 of file GNENet.cpp.
References computeAndUpdate(), OptionsCont::getOptions(), myNeedRecompute, GNEApplicationWindow::setStatusBarText(), update(), and WRITE_MESSAGE.
Referenced by getTLLogicCont(), GNEApplicationWindow::onCmdComputeJunctions(), and GNEViewNet::setEditMode().
void GNENet::computeJunction | ( | GNEJunction * | junction | ) |
Definition at line 709 of file GNENet.cpp.
References NBTrafficLightLogicCont::computeSingleLogic(), NBNode::getControllingTLS(), GNEJunction::getNBNode(), OptionsCont::getOptions(), getTLLogicCont(), NBTrafficLightDefinition::setParticipantsInformation(), and NBTrafficLightDefinition::setTLControllingInformation().
Referenced by getTLLogicCont(), and GNETLSEditor::onCmdDefSwitch().
GNEEdge * GNENet::createEdge | ( | GNEJunction * | src, |
GNEJunction * | dest, | ||
GNEEdge * | tpl, | ||
GNEUndoList * | undoList, | ||
const std::string & | suggestedName = "" , |
||
bool | wasSplit = false , |
||
bool | allowDuplicateGeom = false |
||
) |
creates a new edge (unless an edge with the same geometry already exists)
[in] | src | The starting junction |
[in] | dest | The ending junction |
[in] | tpl | The template edge from which to copy attributes (including lane attrs) |
[in] | undoList | The undoList in which to mark changes |
[in] | suggestedName | |
[in] | wasSplit | Whether the edge was created from a split |
[in] | allowDuplicateGeom | Whether to create the edge even though another edge with the same geometry exists |
Definition at line 219 of file GNENet.cpp.
References GNEEdge::getNBEdge(), GNEJunction::getNBNode(), IDSupplier::getNext(), NBNode::getOutgoingEdges(), GNEChange_Edge, myEdgeIDSupplier, myEdges, GNEUndoList::p_begin(), GNEUndoList::p_end(), requireRecompute(), reserveEdgeID(), retrieveEdge(), GNEJunction::setLogicValid(), SUMOReal, NBEdge::UNSPECIFIED_OFFSET, and NBEdge::UNSPECIFIED_WIDTH.
Referenced by addReversedEdge(), getVisualisationSpeedUp(), GNEViewNet::onLeftBtnPress(), remapEdge(), replaceJunctionByGeometry(), reverseEdge(), and splitEdge().
GNEJunction * GNENet::createJunction | ( | const Position & | pos, |
GNEUndoList * | undoList | ||
) |
creates a new junction
[in] | position | The position of the new junction |
[in] | undoList | The undolist in which to mark changes |
Definition at line 208 of file GNENet.cpp.
References IDSupplier::getNext(), GNEChange_Junction, myJunctionIDSupplier, and myJunctions.
Referenced by addReversedEdge(), getVisualisationSpeedUp(), joinSelectedJunctions(), GNEViewNet::onLeftBtnPress(), and splitEdge().
void GNENet::deleteEdge | ( | GNEEdge * | edge, |
GNEUndoList * | undoList | ||
) |
removes edge
[in] | edge | The edge to be removed |
[in] | undoList | The undolist in which to mark changes |
Definition at line 299 of file GNENet.cpp.
References GNEEdge::getDest(), GUIGlObject::getGlID(), GNEEdge::getSource(), GLO_EDGE, GNEChange_Edge, gSelected, GUISelectedStorage::isSelected(), GNEUndoList::p_begin(), GNEUndoList::p_end(), GNEJunction::removeFromCrossings(), requireRecompute(), and GNEJunction::setLogicValid().
Referenced by deleteGeometryOrEdge(), deleteJunction(), GNEViewNet::deleteSelectedEdges(), getVisualisationSpeedUp(), remapEdge(), replaceJunctionByGeometry(), reverseEdge(), and splitEdge().
void GNENet::deleteGeometryOrEdge | ( | GNEEdge * | edge, |
const Position & | pos, | ||
GNEUndoList * | undoList | ||
) |
removes geometry when pos is close to a geometry node, deletes the whole edge otherwise
[in] | edge | The edge to be removed |
[in] | pos | The position that was clicked upon |
[in] | undoList | The undolist in which to mark changes |
Definition at line 352 of file GNENet.cpp.
References deleteEdge(), and GNEEdge::deleteGeometry().
Referenced by getVisualisationSpeedUp(), and GNEViewNet::onLeftBtnPress().
void GNENet::deleteJunction | ( | GNEJunction * | junction, |
GNEUndoList * | undoList | ||
) |
removes junction and all incident edges
[in] | junction | The junction to be removed |
[in] | undoList | The undolist in which to mark changes |
Definition at line 274 of file GNENet.cpp.
References deleteEdge(), NBNode::getEdges(), GUIGlObject::getGlID(), GNEJunction::getNBNode(), GLO_JUNCTION, GNEChange_Junction, gSelected, GUISelectedStorage::isSelected(), myEdges, NODETYPE_PRIORITY, GNEUndoList::p_begin(), GNEUndoList::p_end(), GNEJunction::setAttribute(), SUMO_ATTR_TYPE, and toString().
Referenced by GNEViewNet::deleteSelectedJunctions(), getVisualisationSpeedUp(), joinSelectedJunctions(), mergeJunctions(), GNEViewNet::onLeftBtnPress(), removeSolitaryJunctions(), and replaceJunctionByGeometry().
void GNENet::deleteLane | ( | GNELane * | lane, |
GNEUndoList * | undoList | ||
) |
removes lane
[in] | lane | The lane to be removed |
[in] | undoList | The undolist in which to mark changes |
Definition at line 317 of file GNENet.cpp.
References GNEEdge::getDest(), GUIGlObject::getGlID(), GNELane::getIndex(), NBEdge::getLaneStruct(), GNEEdge::getNBEdge(), GNELane::getParentEdge(), GNEEdge::getSource(), GLO_LANE, gSelected, GUISelectedStorage::isSelected(), GNEUndoList::p_begin(), GNEUndoList::p_end(), NBEdge::Lane::permissions, GNEJunction::removeFromCrossings(), requireRecompute(), GNEJunction::setLogicValid(), and SVC_PEDESTRIAN.
Referenced by GNEViewNet::deleteSelectedEdges(), getVisualisationSpeedUp(), and GNEViewNet::onLeftBtnPress().
|
private |
deletes a single edge
Definition at line 971 of file GNENet.cpp.
References GNEReferenceCounter::decRef(), NBEdgeCont::extract(), NBNetBuilder::getDistrictCont(), NBNetBuilder::getEdgeCont(), GUIGlObject::getMicrosimID(), GNEEdge::getNBEdge(), myEdges, myGrid, myNetBuilder, SUMORTree::removeAdditionalGLObject(), GNEEdge::setResponsible(), and update().
Referenced by GNEChange_Edge::redo(), and GNEChange_Edge::undo().
|
private |
deletes a single junction
Definition at line 960 of file GNENet.cpp.
References GNEReferenceCounter::decRef(), NBNodeCont::extract(), GUIGlObject::getMicrosimID(), GNEJunction::getNBNode(), NBNetBuilder::getNodeCont(), myGrid, myJunctions, myNetBuilder, SUMORTree::removeAdditionalGLObject(), GNEJunction::setResponsible(), and update().
Referenced by GNEChange_Junction::redo(), and GNEChange_Junction::undo().
|
virtual |
Draws the object.
[in] | s | The settings for the current view (may influence drawing) |
Implements GUIGlObject.
Definition at line 197 of file GNENet.cpp.
Referenced by getZBoundary().
|
inlinevirtualinherited |
Draws additional, user-triggered visualisations.
[in] | parent | The view |
[in] | s | The settings for the current view (may influence drawing) |
Reimplemented in GUIBaseVehicle, GUIPerson, and GUIContainer.
Definition at line 203 of file GUIGlObject.h.
References SUMOReal, and UNUSED_PARAMETER.
|
inherited |
Definition at line 225 of file GUIGlObject.cpp.
References GUIVisualizationTextSettings::color, GLHelper::drawText(), GUIGlObject::getMicrosimID(), GLO_MAX, GUIVisualizationTextSettings::show, and GUIVisualizationTextSettings::size.
Referenced by GUIMEInductLoop::MyWrapper::drawGL(), GUIContainer::drawGL(), GUIPerson::drawGL(), GUIPolygon::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GUIPointOfInterest::drawGL(), GNEJunction::drawGL(), GUIJunctionWrapper::drawGL(), GNEEdge::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GUI_E2_ZS_Collector::MyWrapper::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GUIChargingStation::drawGL(), GUIEdge::drawGL(), GUIBaseVehicle::drawGL(), and GUIInductLoop::MyWrapper::drawGL().
void GNENet::duplicateLane | ( | GNELane * | lane, |
GNEUndoList * | undoList | ||
) |
duplicates lane
[in] | lane | The lane to be duplicated |
[in] | undoList | The undolist in which to mark changes |
Definition at line 340 of file GNENet.cpp.
References GNELane::getIndex(), NBEdge::getLaneStruct(), GNEEdge::getNBEdge(), GNELane::getParentEdge(), GNEUndoList::p_begin(), GNEUndoList::p_end(), and requireRecompute().
Referenced by getVisualisationSpeedUp(), and GNEViewNet::onCmdDuplicateLane().
void GNENet::finishMoveSelection | ( | GNEUndoList * | undoList | ) |
register changes to junction and edge positions with the undoList
Definition at line 886 of file GNENet.cpp.
References GNEEdge::getAttribute(), GNEUndoList::p_begin(), GNEUndoList::p_end(), retrieveEdges(), retrieveJunctions(), GNEEdge::setAttribute(), and SUMO_ATTR_SHAPE.
Referenced by getApp(), and GNEViewNet::onLeftBtnRelease().
|
inline |
Definition at line 384 of file GNENet.h.
References addExplicitTurnaround(), finishMoveSelection(), moveSelection(), myUpdateTarget, and removeExplicitTurnaround().
Referenced by GNEJunction::drawGL().
const Boundary & GNENet::getBoundary | ( | ) | const |
returns the bounder of the network
Definition at line 173 of file GNENet.cpp.
References myGrid.
Referenced by getCenteringBoundary(), and getZBoundary().
|
virtual |
Returns the boundary to which the view shall be centered in order to show the object.
Implements GUIGlObject.
Definition at line 202 of file GNENet.cpp.
References getBoundary().
|
inlineinherited |
Returns the full name appearing in the tool tip.
Definition at line 108 of file GUIGlObject.h.
Referenced by GUIGlObject::buildPopupHeader(), GUIGlObject_AbstractAdd::GUIGlObject_AbstractAdd(), GUIGLObjectPopupMenu::onCmdCopyTypedName(), GUIParam_PopupMenuInterface::onCmdOpenTracker(), GUILaneSpeedTrigger::openManipulator(), GUICalibrator::openManipulator(), GUITriggeredRerouter::openManipulator(), GUIDialog_GLChosenEditor::rebuildList(), GUIGlObject_AbstractAdd::remove(), GUISelectedStorage::save(), and GUISUMOAbstractView::showToolTipFor().
|
inlineinherited |
Returns the numerical id of the object.
Definition at line 123 of file GUIGlObject.h.
Referenced by addReversedEdge(), GUIMessageWindow::appendMsg(), GUIGlObject::buildSelectionPopupEntry(), GUINet::createTLWrapper(), deleteEdge(), deleteJunction(), deleteLane(), GUIMEInductLoop::MyWrapper::drawGL(), GNEInternalLane::drawGL(), GNECrossing::drawGL(), GUIContainer::drawGL(), GUIPerson::drawGL(), GUIPolygon::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GUIPointOfInterest::drawGL(), GNEJunction::drawGL(), GUIJunctionWrapper::drawGL(), GNEEdge::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GNELane::drawGL(), GUI_E2_ZS_Collector::MyWrapper::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GUIChargingStation::drawGL(), GNEPoly::drawGL(), GUIEdge::drawGL(), GUIBaseVehicle::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GUIContainer::drawGLAdditional(), GUIPerson::drawGLAdditional(), GUIBaseVehicle::drawGLAdditional(), GUILane::drawLinkRule(), GUIMEVehicle::getColorValue(), GUIVehicle::getColorValue(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GUIContainer::getColorValue(), GNELane::getColorValue(), GUIPerson::getColorValue(), GUILane::getColorValue(), GNEJunction::getColorValue(), GUIEdge::getIDs(), GNEEdge::getLaneGlIDs(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIPerson::getPopUpMenu(), GNELane::getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), GUIEdge::getScaleValue(), GUILane::getScaleValue(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), GNESelector::handleIDs(), GNETLSEditor::handleMultiChange(), GUIGlChildWindow::isSelected(), GNEViewParent::isSelected(), GUISUMOViewParent::isSelected(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUIViewTraffic::onCmdAddRerouter(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCenter(), GUIViewTraffic::onCmdCloseEdge(), GUIViewTraffic::onCmdCloseLane(), GNEViewNet::onCmdDuplicateLane(), GUIApplicationWindow::onCmdEditChosen(), GUIGLObjectPopupMenu::onCmdRemoveSelected(), GNEConnector::onCmdSelectDeadStarts(), GNEConnector::onCmdSelectPass(), GUIPerson::GUIPersonPopupMenu::onCmdStartTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStartTrack(), GNEViewNet::onCmdStraightenEdges(), GNEViewNet::onLeftBtnPress(), GUISUMOAbstractView::removeAdditionalGLVisualisation(), GLObjectValuePassConnector< std::pair< SUMOTime, MSPhaseDefinition > >::removeObject(), GUIVehicle::selectBlockingFoes(), GNEJunction::setColor(), GUIMessageWindow::setCursorPos(), and GUIGlObject::~GUIGlObject().
std::set< GUIGlID > GNENet::getGlIDs | ( | GUIGlObjectType | type = GLO_MAX | ) |
Definition at line 635 of file GNENet.cpp.
References GLO_EDGE, GLO_JUNCTION, GLO_LANE, GLO_MAX, GLO_TLLOGIC, myEdges, and myJunctions.
Referenced by GNESelector::getMatches(), getTLLogicCont(), GNESelector::onCmdInvert(), and GNEViewParent::onCmdLocate().
|
inlineinherited |
Returns the id of the object as known to microsim.
Definition at line 167 of file GUIGlObject.h.
Referenced by GNETLSEditor::controlsEdge(), GUIGlObject::createFullName(), deleteSingleEdge(), deleteSingleJunction(), GUIGlObject::drawName(), GNEPOI::getAttribute(), GNECrossing::getAttribute(), GNELane::getAttribute(), GNEPoly::getAttribute(), GNEJunction::getAttribute(), GNEEdge::getAttribute(), GNELane::getParentName(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), GNEConnector::handleLaneClick(), GNETLSEditor::handleMultiChange(), GNEEdge::isValid(), GNEViewNet::mergeJunctions(), GNEPoly::moveGeometry(), GNEEdge::moveGeometry(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCopyName(), GNEViewNet::onCmdNodeShape(), GNEViewNet::onLeftBtnPress(), GNEInspector::onUpdCopyTemplate(), registerEdge(), registerJunction(), remapEdge(), GNEEdge::removeConnection(), replaceJunctionByGeometry(), retrieveAttributeCarriers(), GNEEdge::setAttribute(), splitEdge(), and GNEConnector::updateDescription().
|
virtual |
Returns an own parameter window.
[in] | app | The application needed to build the parameter window |
[in] | parent | The parent window needed to build the parameter window |
Implements GUIGlObject.
Definition at line 191 of file GNENet.cpp.
|
inlinevirtualinherited |
Returns the name of the parent object (if any)
Reimplemented in GUILane, and GNELane.
Definition at line 115 of file GUIGlObject.h.
References StringUtils::emptyString.
Referenced by GUIGLObjectPopupMenu::onCmdCopyEdgeName().
|
virtual |
Returns an own popup-menu.
[in] | app | The application needed to build the popup-menu |
[in] | parent | The parent window needed to build the popup-menu |
Implements GUIGlObject.
Definition at line 180 of file GNENet.cpp.
References GUIGlObject::buildCenterPopupEntry(), GUIGlObject::buildPopupHeader(), and GUIGlObject::buildPositionCopyEntry().
|
inline |
Definition at line 402 of file GNENet.h.
References myShapeContainer.
Referenced by GNEApplicationWindow::onCmdOpenShapes(), and GNEViewNet::onLeftBtnPress().
|
inline |
returns the tllcont of the underlying netbuilder
Definition at line 337 of file GNENet.h.
References computeAndUpdate(), computeEverything(), computeJunction(), getGlIDs(), NBNetBuilder::getTLLogicCont(), GLO_MAX, joinSelectedJunctions(), myNetBuilder, removeSolitaryJunctions(), and replaceJunctionByGeometry().
Referenced by GNEJunction::addTrafficLight(), computeJunction(), GNETLSEditor::onCmdDefSwitch(), and GNEJunction::removeTrafficLight().
|
inlineinherited |
Returns the type of the object as coded in GUIGlObjectType.
Definition at line 180 of file GUIGlObject.h.
Referenced by GUIGlObject::buildSelectionPopupEntry(), GUIVehicle::drawAction_drawRailCarriages(), GUIPerson::drawAction_drawWalkingareaPath(), GUIMEInductLoop::MyWrapper::drawGL(), GUIContainer::drawGL(), GUIPerson::drawGL(), GUILaneSpeedTrigger::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUICalibrator::drawGL(), GNEJunction::drawGL(), GUIJunctionWrapper::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GNELane::drawGL(), GUI_E2_ZS_Collector::MyWrapper::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GUIChargingStation::drawGL(), GUIBaseVehicle::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GUIPerson::drawGLAdditional(), GUIBaseVehicle::drawGLAdditional(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GNELane::getColorValue(), GUILane::getColorValue(), GNEJunction::getColorValue(), GNEViewNet::getEdgeAtCursorPosition(), GNEViewNet::getEdgesAtCursorPosition(), GNEViewNet::getJunctionAtCursorPosition(), GNEViewNet::getLaneAtCurserPosition(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIEdge::getScaleValue(), GUILane::getScaleValue(), GNESelector::handleIDs(), GUIGlChildWindow::isSelected(), GNEViewParent::isSelected(), GUISUMOViewParent::isSelected(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdBegin2TrackPhases(), GNEConnector::onCmdClearSelectedConnections(), GUIGLObjectPopupMenu::onCmdCopyEdgeName(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideAllRoutes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideBestLanes(), GUIPerson::GUIPersonPopupMenu::onCmdHideCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideLFLinkItems(), GUIPerson::GUIPersonPopupMenu::onCmdHideWalkingareaPath(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowAllRoutes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowBestLanes(), GUIPerson::GUIPersonPopupMenu::onCmdShowCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowFoes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowLFLinkItems(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdShowPhases(), GUIPerson::GUIPersonPopupMenu::onCmdShowWalkingareaPath(), GUIPerson::GUIPersonPopupMenu::onCmdStartTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStartTrack(), GUIPerson::GUIPersonPopupMenu::onCmdStopTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStopTrack(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLS2Off(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLSLogic(), GNEViewNet::onLeftBtnPress(), LayeredRTree::selectLayer(), GNEJunction::setColor(), and GUISelectedStorage::toggleSelection().
|
inlinevirtualinherited |
Returns an own type parameter window (optional)
[in] | app | The application needed to build the parameter window |
[in] | parent | The parent window needed to build the parameter window |
Reimplemented in GUIVehicle, GUIMEVehicle, and GUIBaseVehicle.
Definition at line 156 of file GUIGlObject.h.
References UNUSED_PARAMETER.
Referenced by GUIGLObjectPopupMenu::onCmdShowTypePars().
|
inline |
Returns the RTree used for visualisation speed-up.
Definition at line 154 of file GNENet.h.
References myGrid.
Referenced by GNEConnector::buildIinternalLanes(), GNETLSEditor::buildIinternalLanes(), GNEViewNet::onCmdNodeShape(), and GNEViewNet::removeCurrentPoly().
|
inline |
Returns the RTree used for visualisation speed-up.
Definition at line 162 of file GNENet.h.
References addReversedEdge(), createEdge(), createJunction(), deleteEdge(), deleteGeometryOrEdge(), deleteJunction(), deleteLane(), duplicateLane(), mergeJunctions(), myGrid, retrieveAttributeCarriers(), retrieveEdge(), retrieveEdges(), retrieveJunction(), retrieveJunctions(), retrieveLanes(), reverseEdge(), save(), saveJoined(), savePlain(), splitEdge(), and splitEdgesBidi().
|
inline |
Returns the Z boundary (stored in the x() coordinate) values of 0 do not affect the boundary.
Definition at line 134 of file GNENet.h.
References drawGL(), getBoundary(), and myZBoundary.
|
private |
Initialises the detector wrappers.
|
private |
Initialises the tl-logic map and wrappers.
|
private |
inserts a single edge into the net and into the underlying
Definition at line 919 of file GNENet.cpp.
References NBNode::addIncomingEdge(), NBNode::addOutgoingEdge(), NBNetBuilder::getEdgeCont(), NBEdge::getFromNode(), GNEEdge::getNBEdge(), NBEdge::getToNode(), NBEdgeCont::insert(), myNetBuilder, and registerEdge().
Referenced by GNEChange_Edge::redo(), and GNEChange_Edge::undo().
|
private |
inserts a single junction into the net and into the underlying
Definition at line 912 of file GNENet.cpp.
References GNEJunction::getNBNode(), NBNetBuilder::getNodeCont(), NBNodeCont::insert(), myNetBuilder, and registerJunction().
Referenced by GNEChange_Junction::redo(), and GNEChange_Junction::undo().
void GNENet::joinSelectedJunctions | ( | GNEUndoList * | undoList | ) |
Definition at line 728 of file GNENet.cpp.
References NBNodeCont::analyzeCluster(), createJunction(), deleteJunction(), GNEEdge::getDest(), NBNetBuilder::getNodeCont(), GNEEdge::getSource(), myEdges, myNetBuilder, NODETYPE_TRAFFIC_LIGHT, GNEUndoList::p_begin(), GNEUndoList::p_end(), NBNodeCont::registerJoinedCluster(), remapEdge(), retrieveJunctions(), GNEJunction::setAttribute(), SUMO_ATTR_ID, SUMO_ATTR_TYPE, and toString().
Referenced by getTLLogicCont(), and GNEApplicationWindow::onCmdJoinJunctions().
void GNENet::mergeJunctions | ( | GNEJunction * | moved, |
GNEJunction * | target, | ||
GNEUndoList * | undoList | ||
) |
merge the given junctions edges between the given junctions will be deleted
[in] | moved | The junction that will be eliminated |
[in] | target | The junction that will be enlarged |
[in] | undoList | The undo list with which to register changes |
Definition at line 469 of file GNENet.cpp.
References deleteJunction(), GNEEdge::getDest(), NBNode::getIncomingEdges(), GNEJunction::getNBNode(), NBNode::getOutgoingEdges(), NBNode::getPosition(), GNEEdge::getSource(), GNEJunction::move(), myEdges, GNEUndoList::p_begin(), GNEUndoList::p_end(), GNEJunction::registerMove(), and remapEdge().
Referenced by getVisualisationSpeedUp(), and GNEViewNet::mergeJunctions().
Definition at line 856 of file GNENet.cpp.
References GNEEdge::getDest(), GNEEdge::getSource(), GNEEdge::moveGeometry(), retrieveEdges(), and retrieveJunctions().
Referenced by getApp(), and GNEViewNet::onMouseMove().
void GNENet::refreshElement | ( | GUIGlObject * | o | ) |
refreshes boundary information for o and update
Definition at line 592 of file GNENet.cpp.
References SUMORTree::addAdditionalGLObject(), myGrid, SUMORTree::removeAdditionalGLObject(), and update().
Referenced by GNEEdge::addConnection(), GNEEdge::addLane(), computeAndUpdate(), GNEJunction::move(), GNEPoly::moveGeometry(), GNEEdge::removeConnection(), GNEEdge::removeLane(), GNEEdge::setGeometry(), setUpdateTarget(), and GNEJunction::updateCrossingAttributes().
registers an edge with GNENet containers
Definition at line 948 of file GNENet.cpp.
References Boundary::add(), SUMORTree::addAdditionalGLObject(), GNEEdge::getBoundary(), GUIGlObject::getMicrosimID(), GNEReferenceCounter::incRef(), myEdges, myGrid, GNEEdge::setResponsible(), and update().
Referenced by GNENet(), and insertEdge().
|
private |
registers a junction with GNENet containers
Definition at line 931 of file GNENet.cpp.
References Boundary::add(), SUMORTree::addAdditionalGLObject(), GNEJunction::getBoundary(), GUIGlObject::getMicrosimID(), GNEJunction::getNBNode(), NBNode::getPosition(), GNEReferenceCounter::incRef(), myGrid, myJunctions, myZBoundary, GNEJunction::setResponsible(), SUMOReal, update(), Position::z(), and Z_INITIALIZED.
Referenced by GNENet(), and insertJunction().
|
private |
Definition at line 493 of file GNENet.cpp.
References createEdge(), deleteEdge(), GNEEdge::getAttribute(), GUIGlObject::getMicrosimID(), GNE_ATTR_SHAPE_END, GNE_ATTR_SHAPE_START, GNEEdge::setAttribute(), and SUMO_ATTR_SHAPE.
Referenced by joinSelectedJunctions(), and mergeJunctions().
void GNENet::removeExplicitTurnaround | ( | std::string | id | ) |
remove edge id from the list of explicit turnarounds
Definition at line 850 of file GNENet.cpp.
References myExplicitTurnarounds.
Referenced by getApp(), and GNEEdge::removeConnection().
|
inherited |
Lets this object know a parameter window showing the object's values was closed.
[in] | w | The closed parameter window |
Definition at line 204 of file GUIGlObject.cpp.
References GUIGlObject::myParamWindows.
Referenced by GUIParameterTableWindow::~GUIParameterTableWindow().
void GNENet::removeSolitaryJunctions | ( | GNEUndoList * | undoList | ) |
Definition at line 778 of file GNENet.cpp.
References deleteJunction(), NBNode::getEdges(), GNEJunction::getNBNode(), myJunctions, GNEUndoList::p_begin(), and GNEUndoList::p_end().
Referenced by getTLLogicCont(), and GNEApplicationWindow::onCmdCleanJunctions().
void GNENet::renameEdge | ( | GNEEdge * | edge, |
const std::string & | newID | ||
) |
updates the map and reserves new id
Definition at line 816 of file GNENet.cpp.
References NBNetBuilder::getEdgeCont(), Named::getID(), GNEEdge::getNBEdge(), myEdges, myNetBuilder, NBEdgeCont::rename(), and GNEEdge::setMicrosimID().
Referenced by GNEEdge::setAttribute(), and setUpdateTarget().
void GNENet::renameJunction | ( | GNEJunction * | junction, |
const std::string & | newID | ||
) |
updates the map and reserves new id
Definition at line 835 of file GNENet.cpp.
References Named::getID(), GNEJunction::getNBNode(), NBNetBuilder::getNodeCont(), myJunctions, myNetBuilder, NBNodeCont::rename(), and GUIGlObject::setMicrosimID().
Referenced by GNEJunction::setAttribute(), and setUpdateTarget().
void GNENet::replaceJunctionByGeometry | ( | GNEJunction * | junction, |
GNEUndoList * | undoList | ||
) |
Definition at line 795 of file GNENet.cpp.
References PositionVector::append(), NBNode::checkIsRemovable(), createEdge(), deleteEdge(), deleteJunction(), GNEEdge::getDest(), NBNode::getEdgesToJoin(), NBEdge::getInnerGeometry(), GUIGlObject::getMicrosimID(), GNEEdge::getNBEdge(), GNEJunction::getNBNode(), NBNode::getPosition(), GNEEdge::getSource(), myEdges, GNEUndoList::p_begin(), GNEUndoList::p_end(), GNEEdge::setAttribute(), SUMO_ATTR_SHAPE, and toString().
Referenced by getTLLogicCont(), and GNEViewNet::onCmdNodeReplace().
|
inline |
inform the net about the need for recomputation
Definition at line 379 of file GNENet.h.
References myNeedRecompute.
Referenced by changeEdgeEndpoints(), createEdge(), deleteEdge(), deleteLane(), duplicateLane(), and GNEJunction::invalidateShape().
|
private |
Definition at line 992 of file GNENet.cpp.
References IDSupplier::avoid(), and myEdgeIDSupplier.
Referenced by createEdge().
|
private |
Definition at line 998 of file GNENet.cpp.
References IDSupplier::avoid(), and myJunctionIDSupplier.
std::vector< GNEAttributeCarrier * > GNENet::retrieveAttributeCarriers | ( | const std::set< GUIGlID > & | ids, |
GUIGlObjectType | type | ||
) |
get the attribute carriers based on GlIDs
[in] | ids | The set of ids for which to retrive the ACs |
[in] | type | The GUI-type of the objects with the given ids |
InvalidArgument | if any given id does not match the declared type |
Definition at line 600 of file GNENet.cpp.
References GUIGlObject::getMicrosimID(), GUIGlObjectStorage::getObjectBlocking(), GUIGlObjectStorage::gIDStorage, GLO_EDGE, GLO_JUNCTION, GLO_LANE, and GUIGlObjectStorage::unblockObject().
Referenced by getVisualisationSpeedUp(), and GNEViewNet::onLeftBtnPress().
GNEEdge * GNENet::retrieveEdge | ( | const std::string & | id, |
bool | failHard = true |
||
) |
get edge by id
[in] | id | The id of the desired edge |
[in] | failHard | Whether attempts to retrieve a nonexisting junction should result in an exception |
UnknownElement |
Definition at line 541 of file GNENet.cpp.
References myEdges.
Referenced by GNEEdge::addConnection(), createEdge(), GNEApplicationWindow::GNEShapeHandler::getLanePos(), getVisualisationSpeedUp(), GNEConnector::initTargets(), GNEEdge::isValid(), GNEJunction::move(), GNEConnector::onCmdSelectConflicts(), GNEConnector::onCmdSelectDeadStarts(), GNEEdge::removeConnection(), and GNEJunction::setLogicValid().
std::vector< GNEEdge * > GNENet::retrieveEdges | ( | bool | onlySelected = false | ) |
return all edges
[in] | onlySelected | Whether to return only selected edges |
Definition at line 553 of file GNENet.cpp.
References GLO_EDGE, gSelected, GUISelectedStorage::isSelected(), and myEdges.
Referenced by GNEViewNet::deleteSelectedEdges(), finishMoveSelection(), getVisualisationSpeedUp(), GNETLSEditor::handleMultiChange(), moveSelection(), GNEConnector::onCmdSelectConflicts(), GNEConnector::onCmdSelectDeadEnds(), GNEConnector::onCmdSelectPass(), and GNEViewNet::onCmdStraightenEdges().
GNEJunction * GNENet::retrieveJunction | ( | const std::string & | id, |
bool | failHard = true |
||
) |
get junction by id
[in] | id | The id of the desired junction |
[in] | failHard | Whether attempts to retrieve a nonexisting junction should result in an exception |
UnknownElement |
Definition at line 529 of file GNENet.cpp.
References myJunctions.
Referenced by changeEdgeEndpoints(), GNEEdge::getDest(), GNEEdge::getSource(), getVisualisationSpeedUp(), GNEConnector::handleLaneClick(), GNEJunction::invalidateTLS(), GNEJunction::isValid(), GNEEdge::isValid(), GNETLSEditor::onCmdOK(), and GNEEdge::setAttribute().
std::vector< GNEJunction * > GNENet::retrieveJunctions | ( | bool | onlySelected = false | ) |
return all junctions
[in] | onlySelected | Whether to return only selected junctions |
Definition at line 580 of file GNENet.cpp.
References GLO_JUNCTION, gSelected, GUISelectedStorage::isSelected(), and myJunctions.
Referenced by GNEViewNet::deleteSelectedJunctions(), finishMoveSelection(), getVisualisationSpeedUp(), joinSelectedJunctions(), moveSelection(), and GNEConnector::onCmdSelectDeadStarts().
std::vector< GNELane * > GNENet::retrieveLanes | ( | bool | onlySelected = false | ) |
return all lanes
[in] | onlySelected | Whether to return only selected lanes |
Definition at line 565 of file GNENet.cpp.
References GLO_LANE, gSelected, GUISelectedStorage::isSelected(), and myEdges.
Referenced by GNEViewNet::deleteSelectedEdges(), getVisualisationSpeedUp(), GNETLSEditor::handleMultiChange(), and GNEViewNet::onCmdDuplicateLane().
void GNENet::reverseEdge | ( | GNEEdge * | edge, |
GNEUndoList * | undoList | ||
) |
reverse edge
[in] | edge | The edge to be reversed |
Definition at line 425 of file GNENet.cpp.
References createEdge(), deleteEdge(), GNEEdge::getDest(), GNEAttributeCarrier::getID(), NBEdge::getInnerGeometry(), GNEEdge::getNBEdge(), GNEEdge::getSource(), GNEUndoList::p_begin(), PositionVector::reverse(), GNEEdge::setAttribute(), SUMO_ATTR_SHAPE, and toString().
Referenced by getVisualisationSpeedUp(), and GNEViewNet::onCmdReverseEdge().
void GNENet::save | ( | OptionsCont & | oc | ) |
save the network
[in] | oc | The OptionsCont which knows how and where to save |
Definition at line 508 of file GNENet.cpp.
References computeAndUpdate(), myNetBuilder, and NWFrame::writeNetwork().
Referenced by getVisualisationSpeedUp(), and GNEApplicationWindow::onCmdSaveNetwork().
void GNENet::saveJoined | ( | OptionsCont & | oc | ) |
save log of joined junctions (and nothing else)
[in] | oc | The OptionsCont which knows how and where to save |
Definition at line 522 of file GNENet.cpp.
References computeAndUpdate(), NBNetBuilder::getNodeCont(), myNetBuilder, and NWWriter_XML::writeJoinedJunctions().
Referenced by getVisualisationSpeedUp(), and GNEApplicationWindow::onCmdSaveJoined().
void GNENet::savePlain | ( | OptionsCont & | oc | ) |
save plain xml representation of the network (and nothing else)
[in] | oc | The OptionsCont which knows how and where to save |
Definition at line 515 of file GNENet.cpp.
References computeAndUpdate(), myNetBuilder, and NWWriter_XML::writeNetwork().
Referenced by getVisualisationSpeedUp(), and GNEApplicationWindow::onCmdSaveAsPlainXML().
|
virtualinherited |
Changes the microsimID of the object (happens in NETEDIT)
Reimplemented in GNEEdge.
Definition at line 110 of file GUIGlObject.cpp.
References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myMicrosimID.
Referenced by renameJunction(), GNELane::setIndex(), and GNEEdge::setMicrosimID().
|
protectedinherited |
Definition at line 213 of file GUIGlObject.cpp.
References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myPrefix.
|
inline |
Set the target to be notified of network changes.
Definition at line 320 of file GNENet.h.
References changeEdgeEndpoints(), myUpdateTarget, refreshElement(), renameEdge(), and renameJunction().
GNEJunction * GNENet::splitEdge | ( | GNEEdge * | edge, |
const Position & | pos, | ||
GNEUndoList * | undoList, | ||
GNEJunction * | newJunction = 0 |
||
) |
split edge at position by inserting a new junction
[in] | edge | The edge to be split |
[in] | pos | The position on which to insert the new junction |
Definition at line 360 of file GNENet.cpp.
References TplConvert::_2int(), createEdge(), createJunction(), deleteEdge(), NBEdge::getGeometry(), GUIGlObject::getMicrosimID(), GNEEdge::getNBEdge(), GNEEdge::getSource(), GNE_ATTR_SHAPE_END, GNE_ATTR_SHAPE_START, PositionVector::nearest_offset_to_point2D(), GNEUndoList::p_begin(), GNEEdge::setAttribute(), PositionVector::splitAt(), SUMO_ATTR_SHAPE, SUMOReal, toString(), and GNEEdge::wasSplit().
Referenced by getVisualisationSpeedUp(), GNEViewNet::onCmdSplitEdge(), and splitEdgesBidi().
void GNENet::splitEdgesBidi | ( | const std::set< GNEEdge * > & | edges, |
const Position & | pos, | ||
GNEUndoList * | undoList | ||
) |
split all edges at position by inserting one new junction
[in] | edges | The edges to be split |
[in] | pos | The position on which to insert the new junction |
Definition at line 414 of file GNENet.cpp.
References GNEUndoList::p_begin(), GNEUndoList::p_end(), and splitEdge().
Referenced by getVisualisationSpeedUp(), and GNEViewNet::onCmdSplitEdgeBidi().
|
private |
notify myUpdateTarget
Definition at line 984 of file GNENet.cpp.
References myUpdateTarget.
Referenced by changeEdgeEndpoints(), computeEverything(), deleteSingleEdge(), deleteSingleJunction(), refreshElement(), registerEdge(), and registerJunction().
|
friend |
Definition at line 80 of file GNENet.h.
Referenced by createEdge(), and deleteEdge().
|
friend |
Definition at line 79 of file GNENet.h.
Referenced by createJunction(), and deleteJunction().
|
private |
Definition at line 427 of file GNENet.h.
Referenced by createEdge(), and reserveEdgeID().
|
private |
Definition at line 422 of file GNENet.h.
Referenced by computeAndUpdate(), createEdge(), deleteJunction(), deleteSingleEdge(), getGlIDs(), GNENet(), joinSelectedJunctions(), mergeJunctions(), registerEdge(), renameEdge(), replaceJunctionByGeometry(), retrieveEdge(), retrieveEdges(), retrieveLanes(), and ~GNENet().
|
private |
list of edge ids for which turn-arounds must be added explicitly
Definition at line 435 of file GNENet.h.
Referenced by addExplicitTurnaround(), computeAndUpdate(), and removeExplicitTurnaround().
|
private |
the rtree which contains all GUIGlObjects (so named for historical reasons)
Definition at line 408 of file GNENet.h.
Referenced by deleteSingleEdge(), deleteSingleJunction(), getBoundary(), getVisualisationSpeedUp(), GNENet(), refreshElement(), registerEdge(), and registerJunction().
|
private |
Definition at line 428 of file GNENet.h.
Referenced by createJunction(), and reserveJunctionID().
|
private |
Definition at line 423 of file GNENet.h.
Referenced by computeAndUpdate(), createJunction(), deleteSingleJunction(), getGlIDs(), registerJunction(), removeSolitaryJunctions(), renameJunction(), retrieveJunction(), retrieveJunctions(), and ~GNENet().
|
private |
whether the net needs recomputation
Definition at line 438 of file GNENet.h.
Referenced by computeAndUpdate(), computeEverything(), and requireRecompute().
|
private |
The internal netbuilder.
Definition at line 414 of file GNENet.h.
Referenced by computeAndUpdate(), deleteSingleEdge(), deleteSingleJunction(), getTLLogicCont(), GNENet(), insertEdge(), insertJunction(), joinSelectedJunctions(), renameEdge(), renameJunction(), save(), saveJoined(), savePlain(), and ~GNENet().
|
private |
the container for additional pois and polygons
Definition at line 432 of file GNENet.h.
Referenced by getShapeContainer().
|
private |
The window to be notofied of about changes.
Definition at line 411 of file GNENet.h.
Referenced by getApp(), setUpdateTarget(), and update().
|
private |
the z boundary (stored in the x-coordinate), values of 0 are ignored
Definition at line 482 of file GNENet.h.
Referenced by getZBoundary(), GNENet(), and registerJunction().
|
static |
Definition at line 84 of file GNENet.h.
Referenced by GNELane::drawGL().
|
static |
Definition at line 83 of file GNENet.h.
Referenced by GNEViewNet::doPaintGL(), GNELane::drawGL(), GNELane::drawMarkings(), and GNEJunction::setColor().
|
staticinherited |
associates object types with strings
Definition at line 100 of file GUIGlObject.h.
|
staticprivate |
marker for whether the z-boundary is initialized
Definition at line 485 of file GNENet.h.
Referenced by GNENet(), and registerJunction().