![]() |
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... | ||||
bool | addSRestrictedLane (SUMOVehicleClass vclass, GNEEdge &edge, GNEUndoList *undoList) | |||
add restricted lane to 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 | deleteAdditional (GNEAdditional *additional) | |||
delete additional element previously inserted More... | ||||
void | deleteConnection (GNEConnection *connection, GNEUndoList *undoList) | |||
remove connection More... | ||||
void | deleteCrossing (GNECrossing *crossing, GNEUndoList *undoList) | |||
remove crossing 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 double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const | |||
draw name of item More... | ||||
void | duplicateLane (GNELane *lane, GNEUndoList *undoList) | |||
duplicates lane More... | ||||
void | finishMoveSelection (GNEUndoList *undoList) | |||
register changes to junction and edge positions with the undoList More... | ||||
bool | flowExists (const std::string &flowID) const | |||
Check if exist a flow with these ID. More... | ||||
std::string | generateVaporizerID () const | |||
generate an ID for vaporizers More... | ||||
GNEAdditional * | getAdditional (SumoXMLTag type, const std::string &id) const | |||
Returns the named additional. More... | ||||
std::string | getAdditionalID (SumoXMLTag type, const GNELane *lane, const double pos) const | |||
Returns the additional close to the given position. More... | ||||
std::vector< GNEAdditional * > | getAdditionals (SumoXMLTag type=SUMO_TAG_NOTHING) const | |||
get vector with additionals More... | ||||
FXApp * | getApp () | |||
get pointer to the main App More... | ||||
const Boundary & | getBoundary () const | |||
returns the bounder of the network More... | ||||
std::set< GUIGlID > | getGlIDs (GUIGlObjectType type=GLO_MAX) | |||
const GNECalibratorFlow & | getGNECalibratorFlow (const std::string &calibratorFlowID) const | |||
Returns a reference to a calibrator flow finding in all calibrators of net. More... | ||||
const GNECalibratorRoute & | getGNECalibratorRoute (const std::string &calibratorRouteID) const | |||
Returns a reference to a calibrator route finding in all calibrators of net. More... | ||||
const GNECalibratorVehicleType & | getGNECalibratorVehicleType (const std::string &calibratorVehicleTypeID) const | |||
Returns a reference to a calibrator vehicle type finding in all calibrators of net. More... | ||||
NBNetBuilder * | getNetBuilder () const | |||
get net builder More... | ||||
int | getNumberOfAdditionals (SumoXMLTag type=SUMO_TAG_NOTHING) const | |||
Returns the number of additionals of the net. More... | ||||
ShapeContainer & | getShapeContainer () | |||
get shape container More... | ||||
NBTrafficLightLogicCont & | getTLLogicCont () | |||
returns the tllcont of the underlying netbuilder More... | ||||
GNEViewNet * | getViewNet () const | |||
get view net 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 | initGNEConnections () | |||
initialize GNEConnections More... | ||||
void | insertAdditional (GNEAdditional *additional, bool hardFail=true) | |||
Insert a additional element previously created in GNEAdditionalHandler. More... | ||||
bool | isAdditionalsSaved () const | |||
check if additional are saved 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) | |||
move all selected junctions and edges More... | ||||
bool | netHasCrossings () const | |||
check if net has crossings More... | ||||
void | refreshAdditional (GNEAdditional *additional) | |||
refreshes boundary information of an additional after a geometry update More... | ||||
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... | ||||
bool | removeRestrictedLane (SUMOVehicleClass vclass, GNEEdge &edge, GNEUndoList *undoList) | |||
remove restricted lane More... | ||||
void | removeSolitaryJunctions (GNEUndoList *undoList) | |||
removes junctions that have no edges More... | ||||
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) | |||
replace the selected junction by geometry node(s) and merge the edges More... | ||||
void | requireRecompute () | |||
inform the net about the need for recomputation More... | ||||
bool | restrictLane (SUMOVehicleClass vclass, GNELane *lane, GNEUndoList *undoList) | |||
transform lane to restricted lane More... | ||||
GNEAdditional * | retrieveAdditional (const std::string &idl, bool hardFail=true) const | |||
Returns the named additional. More... | ||||
std::vector< GNEAdditional * > | retrieveAdditionals (bool onlySelected=false) | |||
return all additionals 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... | ||||
GNELane * | retrieveLane (const std::string &id, bool failHard=true) | |||
get lane by id More... | ||||
std::vector< GNELane * > | retrieveLanes (bool onlySelected=false) | |||
return all lanes More... | ||||
void | reverseEdge (GNEEdge *edge, GNEUndoList *undoList) | |||
reverse edge More... | ||||
bool | revertLaneRestriction (GNELane *lane, GNEUndoList *undoList) | |||
revert prevously restricted lane More... | ||||
bool | routeExists (const std::string &routeID) const | |||
Check if exist a route with these ID. More... | ||||
void | save (OptionsCont &oc) | |||
save the network More... | ||||
void | saveAdditionals (const std::string &filename) | |||
save additional elements of 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 | setAdditionalSaved (bool value) | |||
set manually the flag of additionals More... | ||||
void | setViewNet (GNEViewNet *viewNet) | |||
Set the viewNet 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... | ||||
void | updateAdditionalID (const std::string &oldID, GNEAdditional *additional) | |||
update additional ID in container More... | ||||
bool | vehicleTypeExists (const std::string &vehicleTypeID) const | |||
Check if exist a vehicle type with these ID. 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 | ||||
Returns the full name appearing in the tool tip
| ||||
const std::string & | getFullName () const | |||
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... | ||||
virtual 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. More... | ||||
GUIGlObjectType | getType () const | |||
Returns the type of the object as coded in GUIGlObjectType. More... | ||||
Parameter table window I/O | ||||
Lets this object know a parameter window showing the object's values was opened
| ||||
void | addParameterTable (GUIParameterTableWindow *w) | |||
void | removeParameterTable (GUIParameterTableWindow *w) | |||
Lets this object know a parameter window showing the object's values was closed. More... | ||||
Static Public Attributes | |
static const GUIGlID | INVALID_ID = 0 |
static const RGBColor | selectedConnectionColor |
color of selected connection More... | |
static const RGBColor | selectedLaneColor |
color of selected lane More... | |
static const RGBColor | selectionColor |
color of selection More... | |
static StringBijection< GUIGlObjectType > | TypeNames |
associates object types with strings More... | |
Protected Types | |
internal GNE components | |
typedef std::map< std::string, GNEJunction * > | GNEJunctions |
typedef std::map< std::string, GNEEdge * > | GNEEdges |
typedef std::map< std::pair< std::string, SumoXMLTag >, GNEAdditional * > | GNEAdditionals |
Protected Member Functions | |
void | setPrefix (const std::string &prefix) |
usually names are prefixed by a type-specific string. this method can be used to change the default More... | |
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... | |
Protected Attributes | |
GNEAdditionals | myAdditionals |
map with the name and pointer to additional elements of net More... | |
bool | myAdditionalsSaved |
Flag to check if additionals must be saved. More... | |
GNEEdges | myEdges |
map with the name and pointer to edges of net More... | |
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... | |
GNEJunctions | myJunctions |
map with the name and pointer to junctions of net 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... | |
GNEViewNet * | myViewNet |
The viewNet to be notofied of about changes. More... | |
ID Suppliers for newly created edges and junctions | |
IDSupplier | myEdgeIDSupplier |
IDSupplier | myJunctionIDSupplier |
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 netbuild-container More... | |
void | insertJunction (GNEJunction *junction) |
inserts a single junction into the net and into the underlying netbuild-container 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) |
reserve edge ID (To avoid duplicates) More... | |
void | reserveJunctionID (const std::string &id) |
reserve junction ID (To avoid duplicates) More... | |
void | update () |
notify myViewNet More... | |
Private Attributes | |
Boundary | myZBoundary |
the z boundary (stored in the x-coordinate), values of 0 are ignored More... | |
Static Private Attributes | |
static const double | Z_INITIALIZED = 1 |
marker for whether the z-boundary is initialized More... | |
Friends | |
class | GNEChange_Connection |
class | GNEChange_Edge |
class | GNEChange_Junction |
declare friend class More... | |
A NBNetBuilder extended by visualisation and editing capabilities.
|
protected |
|
protected |
|
protected |
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 99 of file GNENet.cpp.
References Boundary::add(), NBNodeCont::getAllNames(), NBEdgeCont::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 157 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 1186 of file GNENet.cpp.
References myExplicitTurnarounds.
Referenced by GNEJunction::setLogicValid().
|
inherited |
Definition at line 256 of file GUIGlObject.cpp.
References GUIGlObject::myParamWindows.
Referenced by GUIParameterTableWindow::GUIParameterTableWindow().
GNEEdge * GNENet::addReversedEdge | ( | GNEEdge * | edge, |
GNEUndoList * | undoList | ||
) |
add reversed edge
[in] | edge | The edge of which to add the reverse |
Definition at line 615 of file GNENet.cpp.
References createEdge(), createJunction(), NBEdge::getGeometry(), GUIGlObject::getGlID(), GNEEdge::getGNEJunctionDestiny(), GNEEdge::getGNEJunctionSource(), GNEAttributeCarrier::getID(), NBEdge::getInnerGeometry(), NBEdge::getLaneSpreadFunction(), GNEEdge::getNBEdge(), NBEdge::getPermissions(), GUISelectedStorage::getSelected(), NBEdge::getTotalWidth(), gSelected, isRailway(), LANESPREAD_RIGHT, PositionVector::move2side(), GNEUndoList::p_begin(), GNEUndoList::p_end(), PositionVector::reverse(), GNEEdge::setAttribute(), SUMO_ATTR_SHAPE, SUMO_TAG_EDGE, and toString().
Referenced by GNEViewNet::onCmdAddReversedEdge().
bool GNENet::addSRestrictedLane | ( | SUMOVehicleClass | vclass, |
GNEEdge & | edge, | ||
GNEUndoList * | undoList | ||
) |
add restricted lane to edge
[in] | vclass | vehicle class to restrict |
[in] | edge | The edge in which insert restricted lane |
[in] | undoList | The undolist in which to mark changes |
Definition at line 503 of file GNENet.cpp.
References duplicateLane(), GNEEdge::getLanes(), and restrictLane().
Referenced by GNEViewNet::addRestrictedLane().
|
protectedinherited |
Builds an entry which allows to center to the object.
Definition at line 185 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_RECENTERVIEW, and MID_CENTER.
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GNEJunction::getPopUpMenu(), GUIContainer::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNELane::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GNEEdge::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIParkingArea::getPopUpMenu(), GNEConnection::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), GNEAdditional::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds entries which allow to copy the name / typed name into the clipboard.
Definition at line 194 of file GUIGlObject.cpp.
References MID_COPY_NAME, and MID_COPY_TYPED_NAME.
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GUIContainer::getPopUpMenu(), GNEJunction::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNELane::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GNEEdge::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIParkingArea::getPopUpMenu(), GNEConnection::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds the header.
Definition at line 175 of file GUIGlObject.cpp.
References GUIMainWindow::getBoldFont(), and GUIGlObject::getFullName().
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GNEInternalLane::getPopUpMenu(), GUIContainer::getPopUpMenu(), GNEJunction::getPopUpMenu(), GNECrossing::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNELane::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GNEEdge::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIParkingArea::getPopUpMenu(), GNEConnection::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), GNEAdditional::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 235 of file GUIGlObject.cpp.
References GeoConvHelper::getFinal(), MID_COPY_CURSOR_GEOPOSITION, and MID_COPY_CURSOR_POSITION.
Referenced by GUIDetectorWrapper::getPopUpMenu(), GUITrafficLightLogicWrapper::getPopUpMenu(), GNEJunction::getPopUpMenu(), GUIContainer::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNELane::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GNEEdge::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIParkingArea::getPopUpMenu(), GNEConnection::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), GNEAdditional::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to (de)select the object.
Definition at line 204 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(), GNEJunction::getPopUpMenu(), GUIContainer::getPopUpMenu(), GUIPolygon::getPopUpMenu(), GUIPerson::getPopUpMenu(), GUILaneSpeedTrigger::getPopUpMenu(), GUICalibrator::getPopUpMenu(), GUIPointOfInterest::getPopUpMenu(), GUIJunctionWrapper::getPopUpMenu(), GNELane::getPopUpMenu(), GUITriggeredRerouter::getPopUpMenu(), GNEEdge::getPopUpMenu(), GUIContainerStop::getPopUpMenu(), GUIChargingStation::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIParkingArea::getPopUpMenu(), GNEConnection::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), GNEAdditional::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to open the manipulator window.
Definition at line 247 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 217 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(), GUIChargingStation::getPopUpMenu(), GUIBusStop::getPopUpMenu(), GUIParkingArea::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUINet::getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), GNEAdditional::getPopUpMenu(), and GUILane::getPopUpMenu().
|
protectedinherited |
Builds an entry which allows to open the type parameter window.
Definition at line 226 of file GUIGlObject.cpp.
References GUIIconSubSys::getIcon(), ICON_APP_TABLE, and MID_SHOWTYPEPARS.
Referenced by GUIPerson::getPopUpMenu(), and GUIBaseVehicle::getPopUpMenu().
void GNENet::changeEdgeEndpoints | ( | GNEEdge * | edge, |
const std::string & | newSourceID, | ||
const std::string & | newDestID | ||
) |
modifies endpoins of the given edge
Definition at line 1155 of file GNENet.cpp.
References GNEEdge::getNBEdge(), GNEJunction::getNBNode(), NBEdge::reinitNodes(), requireRecompute(), retrieveJunction(), and update().
Referenced by GNEEdge::setAttribute().
void GNENet::computeAndUpdate | ( | OptionsCont & | oc | ) |
recompute the network and update lane geometries
Definition at line 1574 of file GNENet.cpp.
References Boundary::add(), NBNetBuilder::compute(), OptionsCont::getBool(), GeoConvHelper::getFinal(), initGNEConnections(), OptionsCont::isSet(), myEdges, myExplicitTurnarounds, myGrid, myJunctions, myNeedRecompute, myNetBuilder, refreshElement(), and Boundary::reset().
Referenced by computeEverything(), GNELoadThread::run(), save(), saveJoined(), and savePlain().
void GNENet::computeEverything | ( | GNEApplicationWindow * | window, |
bool | force = false |
||
) |
Definition at line 983 of file GNENet.cpp.
References computeAndUpdate(), OptionsCont::getOptions(), myNeedRecompute, GNEApplicationWindow::setStatusBarText(), update(), and WRITE_MESSAGE.
Referenced by GNEApplicationWindow::onCmdComputeJunctions(), and GNEViewNet::setEditMode().
void GNENet::computeJunction | ( | GNEJunction * | junction | ) |
Definition at line 1005 of file GNENet.cpp.
References NBTrafficLightLogicCont::computeSingleLogic(), NBNode::getControllingTLS(), GNEJunction::getNBNode(), OptionsCont::getOptions(), getTLLogicCont(), NBTrafficLightDefinition::setParticipantsInformation(), and NBTrafficLightDefinition::setTLControllingInformation().
Referenced by GNETLSEditorFrame::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 251 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(), SUMO_TAG_EDGE, toString(), NBEdge::UNSPECIFIED_OFFSET, and NBEdge::UNSPECIFIED_WIDTH.
Referenced by addReversedEdge(), 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 240 of file GNENet.cpp.
References IDSupplier::getNext(), GNEChange_Junction, myJunctionIDSupplier, and myJunctions.
Referenced by addReversedEdge(), joinSelectedJunctions(), GNEViewNet::onLeftBtnPress(), and splitEdge().
void GNENet::deleteAdditional | ( | GNEAdditional * | additional | ) |
delete additional element previously inserted
[in] | additional | The additional element to remove |
Definition at line 1275 of file GNENet.cpp.
References GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTag(), myAdditionals, myAdditionalsSaved, myGrid, SUMORTree::removeAdditionalGLObject(), toString(), and update().
Referenced by GNEChange_Lane::redo(), GNEChange_Additional::redo(), GNEChange_Edge::redo(), GNEChange_Lane::undo(), GNEChange_Additional::undo(), and GNEChange_Edge::undo().
void GNENet::deleteConnection | ( | GNEConnection * | connection, |
GNEUndoList * | undoList | ||
) |
remove connection
[in] | connection | The connection to be removed |
[in] | undoList | The undolist in which to mark changes |
Definition at line 415 of file GNENet.cpp.
References GNEConnection::getEdgeFrom(), GUIGlObject::getGlID(), GNEEdge::getGNEJunctionDestiny(), GNEConnection::getNBConnection(), GNEConnection::getNBEdgeConnection(), GNEViewNet::getUndoList(), GLO_CONNECTION, GNEChange_Connection, gSelected, GNEJunction::invalidateTLS(), GUISelectedStorage::isSelected(), GNEJunction::markAsModified(), myViewNet, GNEUndoList::p_begin(), GNEUndoList::p_end(), requireRecompute(), SUMO_TAG_CONNECTION, and toString().
Referenced by GNEConnectorFrame::handleLaneClick(), and GNEDeleteFrame::removeAttributeCarrier().
void GNENet::deleteCrossing | ( | GNECrossing * | crossing, |
GNEUndoList * | undoList | ||
) |
remove crossing
[in] | crossing | The crossing to be removed |
[in] | undoList | The undolist in which to mark changes |
Definition at line 433 of file GNENet.cpp.
References NBNode::Crossing::edges, GUIGlObject::getGlID(), GNECrossing::getNBCrossing(), GNECrossing::getParentJunction(), GLO_CROSSING, gSelected, GUISelectedStorage::isSelected(), GNEUndoList::p_begin(), GNEUndoList::p_end(), NBNode::Crossing::priority, requireRecompute(), and NBNode::Crossing::width.
Referenced by deleteJunction(), and GNEDeleteFrame::removeAttributeCarrier().
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 336 of file GNENet.cpp.
References GNEEdge::getAdditionalChilds(), GUIGlObject::getGlID(), GNEEdge::getGNEJunctionDestiny(), GNEEdge::getGNEJunctionSource(), GNEEdge::getGNERerouters(), GNEEdge::getLanes(), GLO_EDGE, GNEChange_Edge, gSelected, GUISelectedStorage::isSelected(), GNEUndoList::p_begin(), GNEUndoList::p_end(), GNEJunction::removeFromCrossings(), requireRecompute(), GNEJunction::setLogicValid(), SUMO_TAG_EDGE, and toString().
Referenced by deleteGeometryOrEdge(), deleteJunction(), deleteLane(), GNEViewNet::deleteSelectedEdges(), 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 532 of file GNENet.cpp.
References deleteEdge(), and GNEEdge::deleteGeometry().
Referenced by GNEDeleteFrame::removeAttributeCarrier().
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 306 of file GNENet.cpp.
References deleteCrossing(), deleteEdge(), NBNode::getEdges(), GUIGlObject::getGlID(), GNEJunction::getGNECrossings(), GNEJunction::getNBNode(), GLO_JUNCTION, GNEChange_Junction, gSelected, GUISelectedStorage::isSelected(), myEdges, NODETYPE_PRIORITY, GNEUndoList::p_begin(), GNEUndoList::p_end(), GNEJunction::setAttribute(), SUMO_ATTR_TYPE, SUMO_TAG_JUNCTION, and toString().
Referenced by GNEViewNet::deleteSelectedJunctions(), joinSelectedJunctions(), mergeJunctions(), GNEDeleteFrame::removeAttributeCarrier(), 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 382 of file GNENet.cpp.
References deleteEdge(), GNELane::getAdditionalChilds(), GUIGlObject::getGlID(), GNEEdge::getGNEJunctionDestiny(), GNEEdge::getGNEJunctionSource(), GNELane::getIndex(), NBEdge::getLaneStruct(), GNEEdge::getNBEdge(), NBEdge::getNumLanes(), GNELane::getParentEdge(), GLO_LANE, gSelected, GUISelectedStorage::isSelected(), GNEUndoList::p_begin(), GNEUndoList::p_end(), GNEJunction::removeFromCrossings(), requireRecompute(), GNEJunction::setLogicValid(), SUMO_TAG_LANE, and toString().
Referenced by GNEViewNet::deleteSelectedEdges(), GNEDeleteFrame::removeAttributeCarrier(), and removeRestrictedLane().
|
private |
deletes a single edge
Definition at line 1525 of file GNENet.cpp.
References GNEReferenceCounter::decRef(), GUISelectedStorage::deselect(), NBEdgeCont::extract(), NBNetBuilder::getDistrictCont(), NBNetBuilder::getEdgeCont(), GUIGlObject::getGlID(), GNEEdge::getGNEJunctionDestiny(), GNEEdge::getGNEJunctionSource(), GUIGlObject::getMicrosimID(), GNEEdge::getNBEdge(), gSelected, myEdges, myGrid, myNetBuilder, SUMORTree::removeAdditionalGLObject(), GNEJunction::removeIncomingGNEEdge(), GNEJunction::removeOutgoingGNEEdge(), GNEEdge::setResponsible(), and update().
Referenced by GNEChange_Edge::redo(), and GNEChange_Edge::undo().
|
private |
deletes a single junction
Definition at line 1512 of file GNENet.cpp.
References GNEReferenceCounter::decRef(), GUISelectedStorage::deselect(), NBNodeCont::extract(), GUIGlObject::getGlID(), GUIGlObject::getMicrosimID(), GNEJunction::getNBNode(), NBNetBuilder::getNodeCont(), gSelected, 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 211 of file GNENet.cpp.
|
virtualinherited |
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 154 of file GUIGlObject.cpp.
References UNUSED_PARAMETER.
|
inherited |
draw name of item
Definition at line 284 of file GUIGlObject.cpp.
References GUIVisualizationTextSettings::color, GLHelper::drawText(), GUIGlObject::getMicrosimID(), GLO_MAX, GUIVisualizationTextSettings::show, and GUIVisualizationTextSettings::size.
Referenced by GNEDetectorE1::drawGL(), GNEDetectorEntry::drawGL(), GNEDetectorExit::drawGL(), GNEDetectorE2::drawGL(), GNEBusStop::drawGL(), GNEContainerStop::drawGL(), GNEJunction::drawGL(), GUIMEInductLoop::MyWrapper::drawGL(), GUIContainer::drawGL(), GNEVaporizer::drawGL(), GNEVariableSpeedSign::drawGL(), GUIPolygon::drawGL(), GNERouteProbe::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GUIPointOfInterest::drawGL(), GUIPerson::drawGL(), GNERerouter::drawGL(), GUIJunctionWrapper::drawGL(), GNEChargingStation::drawGL(), GNEDetectorE3::drawGL(), GNEEdge::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GUIChargingStation::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GUIParkingArea::drawGL(), GUIEdge::drawGL(), GUIE2Collector::MyWrapper::drawGL(), GNECalibrator::drawGL(), GUIInductLoop::MyWrapper::drawGL(), and GUIBaseVehicle::drawOnPos().
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 447 of file GNENet.cpp.
References GNELane::getIndex(), NBEdge::getLaneStruct(), GNEEdge::getNBEdge(), GNELane::getParentEdge(), GNEUndoList::p_begin(), GNEUndoList::p_end(), requireRecompute(), SUMO_TAG_LANE, and toString().
Referenced by addSRestrictedLane(), and GNEViewNet::onCmdDuplicateLane().
void GNENet::finishMoveSelection | ( | GNEUndoList * | undoList | ) |
register changes to junction and edge positions with the undoList
Definition at line 1228 of file GNENet.cpp.
References GNEEdge::getAttribute(), GNEUndoList::p_begin(), GNEUndoList::p_end(), retrieveEdges(), retrieveJunctions(), GNEEdge::setAttribute(), and SUMO_ATTR_SHAPE.
Referenced by GNEViewNet::onLeftBtnRelease().
bool GNENet::flowExists | ( | const std::string & | flowID | ) | const |
Check if exist a flow with these ID.
Definition at line 1443 of file GNENet.cpp.
References GNECalibrator::flowExists(), getAdditionals(), and SUMO_TAG_CALIBRATOR.
Referenced by GNECalibrator::generateFlowID(), GNEAdditionalHandler::parseCalibratorFlow(), and GNECalibratorFlow::setFlowID().
std::string GNENet::generateVaporizerID | ( | ) | const |
generate an ID for vaporizers
Definition at line 837 of file GNENet.cpp.
References myAdditionals, SUMO_TAG_VAPORIZER, and toString().
GNEAdditional * GNENet::getAdditional | ( | SumoXMLTag | type, |
const std::string & | id | ||
) | const |
Returns the named additional.
[in] | type | tag with the type of additional |
[in] | id | The id of the additional to return. |
Definition at line 1331 of file GNENet.cpp.
References myAdditionals.
Referenced by GNEAdditionalHandler::buildBusStop(), GNEAdditionalHandler::buildCalibrator(), GNEAdditionalHandler::buildChargingStation(), GNEAdditionalHandler::buildContainerStop(), GNEAdditionalHandler::buildDetectorE1(), GNEAdditionalHandler::buildDetectorE2(), GNEAdditionalHandler::buildDetectorE3(), GNEAdditionalHandler::buildDetectorEntry(), GNEAdditionalHandler::buildDetectorExit(), GNEAdditionalHandler::buildRerouter(), GNEAdditionalHandler::buildRouteProbe(), GNEAdditionalHandler::buildVariableSpeedSign(), GNEDetectorE3::generateEntryID(), GNEDetectorE3::generateExitID(), GNEAdditionalFrame::generateID(), GNEDetectorE1::isValid(), GNEDetectorEntry::isValid(), GNEDetectorExit::isValid(), GNEDetectorE2::isValid(), GNEBusStop::isValid(), GNEContainerStop::isValid(), GNEVaporizer::isValid(), GNEVariableSpeedSign::isValid(), GNERouteProbe::isValid(), GNERerouter::isValid(), GNEChargingStation::isValid(), GNEDetectorE3::isValid(), GNECalibrator::isValid(), GNEAdditionalHandler::parseAndBuildDetectorE3(), and GNECalibrator::setAttribute().
std::string GNENet::getAdditionalID | ( | SumoXMLTag | type, |
const GNELane * | lane, | ||
const double | pos | ||
) | const |
Returns the additional close to the given position.
[in] | type | tag with the type of additional |
[in] | lane | the lane of the additional to return. |
[in] | pos | the position of the additional to return. |
Definition at line 1343 of file GNENet.cpp.
References myAdditionals, and POSITION_EPS.
std::vector< GNEAdditional * > GNENet::getAdditionals | ( | SumoXMLTag | type = SUMO_TAG_NOTHING | ) | const |
get vector with additionals
[in] | type | type of additional to get. SUMO_TAG_NOTHING will get all additionals |
Definition at line 1354 of file GNENet.cpp.
References myAdditionals, and SUMO_TAG_NOTHING.
Referenced by flowExists(), getGNECalibratorFlow(), getGNECalibratorRoute(), getGNECalibratorVehicleType(), routeExists(), GNEAdditionalFrame::SelectorParentAdditional::showListOfAdditionals(), and vehicleTypeExists().
FXApp * GNENet::getApp | ( | ) |
const Boundary & GNENet::getBoundary | ( | ) | const |
returns the bounder of the network
Definition at line 188 of file GNENet.cpp.
References myGrid.
Referenced by getCenteringBoundary().
|
virtual |
Returns the boundary to which the view shall be centered in order to show the object.
Implements GUIGlObject.
Definition at line 216 of file GNENet.cpp.
References getBoundary().
|
inherited |
Definition at line 109 of file GUIGlObject.cpp.
References GUIGlObject::myFullName.
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().
|
inherited |
Returns the numerical id of the object.
Definition at line 121 of file GUIGlObject.cpp.
References GUIGlObject::myGlID.
Referenced by addReversedEdge(), GUIMessageWindow::appendMsg(), GUIGlObject::buildSelectionPopupEntry(), GUINet::createTLWrapper(), deleteConnection(), deleteCrossing(), deleteEdge(), deleteJunction(), deleteLane(), deleteSingleEdge(), deleteSingleJunction(), GUIVehicle::drawAction_drawPersonsAndContainers(), GNEDetectorE1::drawGL(), GNEDetectorExit::drawGL(), GNEDetectorEntry::drawGL(), GNEDetectorE2::drawGL(), GNEContainerStop::drawGL(), GNEBusStop::drawGL(), GNEInternalLane::drawGL(), GNEJunction::drawGL(), GNECrossing::drawGL(), GUIMEInductLoop::MyWrapper::drawGL(), GNEVaporizer::drawGL(), GUIContainer::drawGL(), GNEVariableSpeedSign::drawGL(), GUIPolygon::drawGL(), GNERouteProbe::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GUIPointOfInterest::drawGL(), GUIPerson::drawGL(), GNERerouter::drawGL(), GUIJunctionWrapper::drawGL(), GNEChargingStation::drawGL(), GNEEdge::drawGL(), GNEDetectorE3::drawGL(), GNELane::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GUIChargingStation::drawGL(), GUIContainerStop::drawGL(), GNEPoly::drawGL(), GUIBusStop::drawGL(), GNEConnection::drawGL(), GUIParkingArea::drawGL(), GUIEdge::drawGL(), GUIE2Collector::MyWrapper::drawGL(), GNECalibrator::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GUIContainer::drawGLAdditional(), GUIPerson::drawGLAdditional(), GUIBaseVehicle::drawGLAdditional(), GUILane::drawLinkRule(), GUIBaseVehicle::drawOnPos(), GUIMEVehicle::getColorValue(), GUIVehicle::getColorValue(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GUIContainer::getColorValue(), GUIPerson::getColorValue(), GNELane::getColorValue(), GNEJunction::getColorValue(), GUILane::getColorValue(), GUIEdge::getIDs(), GNEEdge::getLaneGlIDs(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIPerson::getPopUpMenu(), GNELane::getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), GUIEdge::getScaleValue(), GUILane::getScaleValue(), GNECalibrator::GNECalibrator(), GNERouteProbe::GNERouteProbe(), GNEVaporizer::GNEVaporizer(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), GNESelectorFrame::handleIDs(), GNETLSEditorFrame::handleMultiChange(), GNEAdditional::isAdditionalSelected(), GUIGlChildWindow::isSelected(), GUISUMOViewParent::isSelected(), GUIVehicle::isSelected(), GNEViewParent::isSelected(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUIViewTraffic::onCmdAddRerouter(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCenter(), GUIViewTraffic::onCmdCloseEdge(), GUIViewTraffic::onCmdCloseLane(), GNEViewNet::onCmdDuplicateLane(), GUIApplicationWindow::onCmdEditChosen(), GUIGLObjectPopupMenu::onCmdRemoveSelected(), GNEViewNet::onCmdRevertRestriction(), GNEConnectorFrame::onCmdSelectDeadStarts(), GNEConnectorFrame::onCmdSelectPass(), GUIPerson::GUIPersonPopupMenu::onCmdStartTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStartTrack(), GNEViewNet::onCmdStraightenEdges(), GNEViewNet::onLeftBtnPress(), GLObjectValuePassConnector< std::pair< SUMOTime, MSPhaseDefinition > >::removeObject(), GUIVehicle::selectBlockingFoes(), GNEJunction::setColor(), GUIMessageWindow::setCursorPos(), GUIBaseVehicle::~GUIBaseVehicle(), GUIGlObject::~GUIGlObject(), and GUIPerson::~GUIPerson().
std::set< GUIGlID > GNENet::getGlIDs | ( | GUIGlObjectType | type = GLO_MAX | ) |
Definition at line 897 of file GNENet.cpp.
References GLO_ADDITIONAL, GLO_CONNECTION, GLO_CROSSING, GLO_EDGE, GLO_JUNCTION, GLO_LANE, GLO_MAX, GLO_TLLOGIC, myAdditionals, myEdges, and myJunctions.
Referenced by GNESelectorFrame::getMatches(), GNESelectorFrame::onCmdInvert(), and GNEViewParent::onCmdLocate().
const GNECalibratorFlow & GNENet::getGNECalibratorFlow | ( | const std::string & | calibratorFlowID | ) | const |
Returns a reference to a calibrator flow finding in all calibrators of net.
Definition at line 1404 of file GNENet.cpp.
References GNECalibrator::flowExists(), getAdditionals(), GNECalibrator::getCalibratorFlow(), SUMO_TAG_CALIBRATOR, SUMO_TAG_VTYPE, and toString().
const GNECalibratorRoute & GNENet::getGNECalibratorRoute | ( | const std::string & | calibratorRouteID | ) | const |
Returns a reference to a calibrator route finding in all calibrators of net.
Definition at line 1378 of file GNENet.cpp.
References getAdditionals(), GNECalibrator::getCalibratorRoute(), GNECalibrator::routeExists(), SUMO_TAG_CALIBRATOR, SUMO_TAG_VTYPE, and toString().
const GNECalibratorVehicleType & GNENet::getGNECalibratorVehicleType | ( | const std::string & | calibratorVehicleTypeID | ) | const |
Returns a reference to a calibrator vehicle type finding in all calibrators of net.
Definition at line 1391 of file GNENet.cpp.
References getAdditionals(), GNECalibrator::getCalibratorVehicleType(), SUMO_TAG_CALIBRATOR, SUMO_TAG_VTYPE, toString(), and GNECalibrator::vehicleTypeExists().
|
virtualinherited |
Returns the id of the object as known to microsim.
Definition at line 135 of file GUIGlObject.cpp.
References GUIGlObject::myMicrosimID.
Referenced by GNEAdditional::changeEdge(), GNEAdditional::changeLane(), GNETLSEditorFrame::controlsEdge(), GUIGlObject::createFullName(), deleteSingleEdge(), deleteSingleJunction(), GUIGlObject::drawName(), GNEAdditional::getAdditionalID(), GNEPOI::getAttribute(), GNECrossing::getAttribute(), GNEConnection::getAttribute(), GNEPoly::getAttribute(), GNEEdge::getAttribute(), GNEJunction::getAttribute(), GNELane::getAttribute(), GNENetElement::getParentName(), GNELane::getParentName(), GNEVaporizer::getParentName(), GNEVariableSpeedSign::getParentName(), GNERouteProbe::getParentName(), GNEStoppingPlace::getParentName(), GNERerouter::getParentName(), GNEDetector::getParentName(), GNEDetectorE3::getParentName(), GNECalibrator::getParentName(), GNEAdditional::getParentName(), GNEAdditional::getPopUpMenu(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), GNETLSEditorFrame::handleMultiChange(), GNEEdge::isValid(), GNEViewNet::mergeJunctions(), GNEPoly::moveGeometry(), GNEEdge::moveGeometry(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCopyName(), GNEViewNet::onCmdNodeShape(), GNEInspectorFrame::onUpdCopyTemplate(), registerEdge(), registerJunction(), remapEdge(), GNEEdge::removeConnection(), replaceJunctionByGeometry(), retrieveAttributeCarriers(), GNEAdditional::setAdditionalID(), GNEEdge::setAttribute(), splitEdge(), GNEConnectorFrame::updateDescription(), and GNEConnection::updateID().
NBNetBuilder * GNENet::getNetBuilder | ( | ) | const |
get net builder
Definition at line 1047 of file GNENet.cpp.
References myNetBuilder.
Referenced by GNEJunction::rebuildGNECrossings().
int GNENet::getNumberOfAdditionals | ( | SumoXMLTag | type = SUMO_TAG_NOTHING | ) | const |
Returns the number of additionals of the net.
[in] | type | type of additional to count. SUMO_TAG_NOTHING will count all additionals |
Definition at line 1366 of file GNENet.cpp.
References myAdditionals, and SUMO_TAG_NOTHING.
Referenced by GNEApplicationWindow::continueWithUnsavedAdditionalChanges(), and GNEAdditionalFrame::generateID().
|
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 205 of file GNENet.cpp.
|
virtualinherited |
Returns the name of the parent object (if any)
Reimplemented in GNEAdditional, GNECalibrator, GNEDetectorE3, GNEDetector, GNERerouter, GNEStoppingPlace, GNERouteProbe, GNEVariableSpeedSign, GNEVaporizer, GUILane, GNELane, and GNENetElement.
Definition at line 115 of file GUIGlObject.cpp.
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 195 of file GNENet.cpp.
References GUIGlObject::buildCenterPopupEntry(), GUIGlObject::buildPopupHeader(), and GUIGlObject::buildPositionCopyEntry().
ShapeContainer & GNENet::getShapeContainer | ( | ) |
get shape container
Definition at line 1252 of file GNENet.cpp.
References myShapeContainer.
Referenced by GNEApplicationWindow::onCmdOpenShapes(), and GNEDeleteFrame::removeAttributeCarrier().
NBTrafficLightLogicCont & GNENet::getTLLogicCont | ( | ) |
returns the tllcont of the underlying netbuilder
Definition at line 1171 of file GNENet.cpp.
References NBNetBuilder::getTLLogicCont(), and myNetBuilder.
Referenced by GNEJunction::addTrafficLight(), computeJunction(), GNETLSEditorFrame::onCmdDefSwitch(), GNEJunction::removeTrafficLight(), and GNEJunction::setAttribute().
|
inherited |
Returns the type of the object as coded in GUIGlObjectType.
Definition at line 148 of file GUIGlObject.cpp.
References GUIGlObject::myGLObjectType.
Referenced by GUIGlObject::buildSelectionPopupEntry(), GUIVehicle::drawAction_drawPersonsAndContainers(), GUIVehicle::drawAction_drawRailCarriages(), GUIPerson::drawAction_drawWalkingareaPath(), GNEDetector::drawDetectorIcon(), GNEDetectorE1::drawGL(), GNEDetectorEntry::drawGL(), GNEDetectorExit::drawGL(), GNEDetectorE2::drawGL(), GNEBusStop::drawGL(), GNEContainerStop::drawGL(), GNEJunction::drawGL(), GUIMEInductLoop::MyWrapper::drawGL(), GNECrossing::drawGL(), GNEVaporizer::drawGL(), GUIContainer::drawGL(), GNEVariableSpeedSign::drawGL(), GNERouteProbe::drawGL(), GUILaneSpeedTrigger::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUICalibrator::drawGL(), GUIPerson::drawGL(), GNERerouter::drawGL(), GUIJunctionWrapper::drawGL(), GNEChargingStation::drawGL(), GNEEdge::drawGL(), GNEDetectorE3::drawGL(), GNELane::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GUIChargingStation::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GNEConnection::drawGL(), GUIParkingArea::drawGL(), GUIE2Collector::MyWrapper::drawGL(), GNECalibrator::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GUIPerson::drawGLAdditional(), GUIBaseVehicle::drawGLAdditional(), GNEAdditional::drawLockIcon(), GUIBaseVehicle::drawOnPos(), GNEAdditional::drawParentAndChildrenConnections(), GNEJunction::getAttribute(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GNELane::getColorValue(), GNEJunction::getColorValue(), GUILane::getColorValue(), GNEViewNet::getEdgeAtCursorPosition(), GNEViewNet::getEdgesAtCursorPosition(), GNEViewNet::getJunctionAtCursorPosition(), GNEViewNet::getLaneAtCurserPosition(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIEdge::getScaleValue(), GUILane::getScaleValue(), GNESelectorFrame::handleIDs(), GNEAdditional::isAdditionalSelected(), GUIGlChildWindow::isSelected(), GUISUMOViewParent::isSelected(), GNEViewParent::isSelected(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdBegin2TrackPhases(), GNEConnectorFrame::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::setAttribute(), GNEJunction::setColor(), and GUISelectedStorage::toggleSelection().
|
virtualinherited |
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, GUIBaseVehicle, GUIMEVehicle, and GUIPerson.
Definition at line 127 of file GUIGlObject.cpp.
References UNUSED_PARAMETER.
Referenced by GUIGLObjectPopupMenu::onCmdShowTypePars().
GNEViewNet * GNENet::getViewNet | ( | ) | const |
get view net
Definition at line 1165 of file GNENet.cpp.
References myViewNet.
Referenced by GNEApplicationWindow::continueWithUnsavedAdditionalChanges(), GNEApplicationWindow::continueWithUnsavedChanges(), GNEJunction::drawGL(), GNEConnection::drawGL(), GNEApplicationWindow::handleEvent_NetworkLoaded(), GNEApplicationWindow::onCmdOpenAdditionals(), GNEApplicationWindow::onCmdSaveAdditionals(), GNEApplicationWindow::onCmdSaveAsPlainXML(), GNEApplicationWindow::onCmdSaveJoined(), GNEApplicationWindow::onCmdSaveNetwork(), GNEApplicationWindow::onCmdSavePois(), GNEChange_Junction::redo(), GNEChange_Selection::redo(), GNEChange_TLS::redo(), GNEChange_Lane::redo(), GNEChange_Connection::redo(), GNEChange_Additional::redo(), GNEChange_Edge::redo(), GNEChange_Crossing::redo(), GNELane::setAttribute(), GNEChange_Junction::undo(), GNEChange_Selection::undo(), GNEChange_TLS::undo(), GNEChange_Connection::undo(), GNEChange_Lane::undo(), GNEChange_Additional::undo(), GNEChange_Edge::undo(), GNEChange_Crossing::undo(), GNELane::updateGeometry(), GNEJunction::updateShapesAndGeometries(), GNEChange_Additional::~GNEChange_Additional(), GNEChange_Edge::~GNEChange_Edge(), GNEChange_Junction::~GNEChange_Junction(), GNEChange_Lane::~GNEChange_Lane(), and GNEChange_TLS::~GNEChange_TLS().
SUMORTree & GNENet::getVisualisationSpeedUp | ( | ) |
Returns the RTree used for visualisation speed-up.
Definition at line 228 of file GNENet.cpp.
References myGrid.
Referenced by GNETLSEditorFrame::buildIinternalLanes(), GNEViewNet::onCmdNodeShape(), and GNEViewNet::removeCurrentPoly().
const SUMORTree & GNENet::getVisualisationSpeedUp | ( | ) | const |
Returns the RTree used for visualisation speed-up.
Definition at line 234 of file GNENet.cpp.
References myGrid.
const Boundary & GNENet::getZBoundary | ( | ) | const |
Returns the Z boundary (stored in the x() coordinate) values of 0 do not affect the boundary.
Definition at line 222 of file GNENet.cpp.
References myZBoundary.
|
private |
Initialises the detector wrappers.
void GNENet::initGNEConnections | ( | ) |
initialize GNEConnections
Definition at line 1564 of file GNENet.cpp.
References myEdges.
Referenced by computeAndUpdate(), and GNEViewNet::onCmdToogleShowConnection().
|
private |
Initialises the tl-logic map and wrappers.
void GNENet::insertAdditional | ( | GNEAdditional * | additional, |
bool | hardFail = true |
||
) |
Insert a additional element previously created in GNEAdditionalHandler.
[in] | additional | pointer to the additional element to add |
[in] | hardFail | enable or disable exception if additional to insert is duplicated |
Definition at line 1258 of file GNENet.cpp.
References SUMORTree::addAdditionalGLObject(), GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTag(), myAdditionals, myAdditionalsSaved, myGrid, toString(), and update().
Referenced by GNEChange_Lane::redo(), GNEChange_Additional::redo(), GNEChange_Edge::redo(), GNEChange_Lane::undo(), GNEChange_Additional::undo(), and GNEChange_Edge::undo().
|
private |
inserts a single edge into the net and into the underlying netbuild-container
Definition at line 1466 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 netbuild-container
Definition at line 1459 of file GNENet.cpp.
References GNEJunction::getNBNode(), NBNetBuilder::getNodeCont(), NBNodeCont::insert(), myNetBuilder, and registerJunction().
Referenced by GNEChange_Junction::redo(), and GNEChange_Junction::undo().
bool GNENet::isAdditionalsSaved | ( | ) | const |
check if additional are saved
Definition at line 1621 of file GNENet.cpp.
References myAdditionalsSaved.
Referenced by GNEApplicationWindow::continueWithUnsavedAdditionalChanges().
void GNENet::joinSelectedJunctions | ( | GNEUndoList * | undoList | ) |
Definition at line 1053 of file GNENet.cpp.
References NBNodeCont::analyzeCluster(), createJunction(), deleteJunction(), GNEEdge::getGNEJunctionDestiny(), GNEEdge::getGNEJunctionSource(), NBNetBuilder::getNodeCont(), myEdges, myNetBuilder, NODETYPE_TRAFFIC_LIGHT, GNEUndoList::p_begin(), GNEUndoList::p_end(), NBNodeCont::registerJoinedCluster(), remapEdge(), retrieveJunctions(), GNEJunction::setAttribute(), SUMO_ATTR_ID, SUMO_ATTR_TYPE, SUMO_TAG_JUNCTION, and toString().
Referenced by 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 649 of file GNENet.cpp.
References deleteJunction(), GNEEdge::getGNEJunctionDestiny(), GNEEdge::getGNEJunctionSource(), NBNode::getIncomingEdges(), GNEJunction::getNBNode(), NBNode::getOutgoingEdges(), NBNode::getPosition(), GNEJunction::move(), myEdges, GNEUndoList::p_begin(), GNEUndoList::p_end(), GNEJunction::registerMove(), remapEdge(), SUMO_TAG_JUNCTION, and toString().
Referenced by GNEViewNet::mergeJunctions().
move all selected junctions and edges
Definition at line 1198 of file GNENet.cpp.
References GNEEdge::getGNEJunctionDestiny(), GNEEdge::getGNEJunctionSource(), GNEEdge::moveGeometry(), retrieveEdges(), and retrieveJunctions().
Referenced by GNEViewNet::onMouseMove().
bool GNENet::netHasCrossings | ( | ) | const |
check if net has crossings
Definition at line 1030 of file GNENet.cpp.
References NBNodeCont::begin(), NBNodeCont::end(), NBNetBuilder::getNodeCont(), and myNetBuilder.
void GNENet::refreshAdditional | ( | GNEAdditional * | additional | ) |
refreshes boundary information of an additional after a geometry update
Definition at line 825 of file GNENet.cpp.
References SUMORTree::addAdditionalGLObject(), GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTag(), myAdditionals, myGrid, SUMORTree::removeAdditionalGLObject(), and update().
Referenced by GNEVariableSpeedSign::commmitAdditionalGeometryMoved(), GNEDetector::commmitAdditionalGeometryMoved(), GNEStoppingPlace::commmitAdditionalGeometryMoved(), GNERerouter::commmitAdditionalGeometryMoved(), GNEDetectorE3::commmitAdditionalGeometryMoved(), GNEAdditional::commmitAdditionalGeometryMoved(), GNEVariableSpeedSign::updateGeometry(), GNEDetectorE1::updateGeometry(), GNERerouter::updateGeometry(), GNEChargingStation::updateGeometry(), GNEVaporizer::updateGeometry(), GNEDetectorE2::updateGeometry(), GNEDetectorE3::updateGeometry(), GNERouteProbe::updateGeometry(), GNEContainerStop::updateGeometry(), GNEBusStop::updateGeometry(), GNECalibrator::updateGeometry(), GNEDetectorEntry::updateGeometryByParent(), and GNEDetectorExit::updateGeometryByParent().
void GNENet::refreshElement | ( | GUIGlObject * | o | ) |
refreshes boundary information for o and update
Definition at line 817 of file GNENet.cpp.
References SUMORTree::addAdditionalGLObject(), myGrid, SUMORTree::removeAdditionalGLObject(), and update().
Referenced by GNEEdge::addConnection(), GNEEdge::addLane(), computeAndUpdate(), GNEPOI::move(), GNEPoly::moveGeometry(), GNEJunction::registerMove(), GNEEdge::remakeGNEConnections(), GNEEdge::removeConnection(), GNEEdge::removeLane(), GNECrossing::setAttribute(), GNEJunction::setAttribute(), and GNEEdge::setGeometry().
registers an edge with GNENet containers
Definition at line 1494 of file GNENet.cpp.
References Boundary::add(), SUMORTree::addAdditionalGLObject(), GNEJunction::addIncomingGNEEdge(), GNEJunction::addOutgoingGNEEdge(), GNEEdge::getBoundary(), GNEEdge::getGNEJunctionDestiny(), GNEEdge::getGNEJunctionSource(), 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 1477 of file GNENet.cpp.
References Boundary::add(), SUMORTree::addAdditionalGLObject(), GNEJunction::getBoundary(), GUIGlObject::getMicrosimID(), GNEJunction::getNBNode(), NBNode::getPosition(), GNEReferenceCounter::incRef(), myGrid, myJunctions, myZBoundary, GNEJunction::setResponsible(), update(), Position::z(), and Z_INITIALIZED.
Referenced by GNENet(), and insertJunction().
|
private |
Definition at line 673 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 1192 of file GNENet.cpp.
References myExplicitTurnarounds.
Referenced by 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 262 of file GUIGlObject.cpp.
References GUIGlObject::myParamWindows.
Referenced by GUIParameterTableWindow::~GUIParameterTableWindow().
bool GNENet::removeRestrictedLane | ( | SUMOVehicleClass | vclass, |
GNEEdge & | edge, | ||
GNEUndoList * | undoList | ||
) |
remove restricted lane
[in] | vclass | vehicle class to restrict |
[in] | edge | the edge in which remove sidewalk |
[in] | undoList | The undolist in which to mark changes |
Definition at line 518 of file GNENet.cpp.
References deleteLane(), and GNEEdge::getLanes().
Referenced by GNEViewNet::removeRestrictedLane().
void GNENet::removeSolitaryJunctions | ( | GNEUndoList * | undoList | ) |
removes junctions that have no edges
Definition at line 1103 of file GNENet.cpp.
References deleteJunction(), NBNode::getEdges(), GNEJunction::getNBNode(), myJunctions, GNEUndoList::p_begin(), GNEUndoList::p_end(), SUMO_TAG_JUNCTION, and toString().
Referenced by GNEApplicationWindow::onCmdCleanJunctions().
void GNENet::renameEdge | ( | GNEEdge * | edge, |
const std::string & | newID | ||
) |
updates the map and reserves new id
Definition at line 1142 of file GNENet.cpp.
References NBNetBuilder::getEdgeCont(), Named::getID(), GNEEdge::getLanes(), GNEEdge::getNBEdge(), myEdges, myNetBuilder, NBEdgeCont::rename(), and GNEEdge::setMicrosimID().
Referenced by GNEEdge::setAttribute().
void GNENet::renameJunction | ( | GNEJunction * | junction, |
const std::string & | newID | ||
) |
updates the map and reserves new id
Definition at line 1177 of file GNENet.cpp.
References Named::getID(), GNEJunction::getNBNode(), NBNetBuilder::getNodeCont(), myJunctions, myNetBuilder, NBNodeCont::rename(), and GUIGlObject::setMicrosimID().
Referenced by GNEJunction::setAttribute().
void GNENet::replaceJunctionByGeometry | ( | GNEJunction * | junction, |
GNEUndoList * | undoList | ||
) |
replace the selected junction by geometry node(s) and merge the edges
Definition at line 1120 of file GNENet.cpp.
References PositionVector::append(), NBNode::checkIsRemovable(), createEdge(), deleteEdge(), deleteJunction(), NBNode::getEdgesToJoin(), GNEEdge::getGNEJunctionDestiny(), GNEEdge::getGNEJunctionSource(), NBEdge::getInnerGeometry(), GUIGlObject::getMicrosimID(), GNEEdge::getNBEdge(), GNEJunction::getNBNode(), NBNode::getPosition(), myEdges, GNEUndoList::p_begin(), GNEUndoList::p_end(), GNEEdge::setAttribute(), SUMO_ATTR_SHAPE, and toString().
Referenced by GNEViewNet::onCmdNodeReplace().
void GNENet::requireRecompute | ( | ) |
inform the net about the need for recomputation
Definition at line 1024 of file GNENet.cpp.
References myNeedRecompute.
Referenced by changeEdgeEndpoints(), createEdge(), deleteConnection(), deleteCrossing(), deleteEdge(), deleteLane(), duplicateLane(), GNEJunction::invalidateShape(), and GNEViewNet::onCmdToogleShowConnection().
|
private |
reserve edge ID (To avoid duplicates)
Definition at line 1552 of file GNENet.cpp.
References IDSupplier::avoid(), and myEdgeIDSupplier.
Referenced by createEdge().
|
private |
reserve junction ID (To avoid duplicates)
Definition at line 1558 of file GNENet.cpp.
References IDSupplier::avoid(), and myJunctionIDSupplier.
bool GNENet::restrictLane | ( | SUMOVehicleClass | vclass, |
GNELane * | lane, | ||
GNEUndoList * | undoList | ||
) |
transform lane to restricted lane
[in] | vclass | vehicle class to restrict |
[in] | lane | The lane to be transformed |
[in] | undoList | The undolist in which to mark changes |
Definition at line 459 of file GNENet.cpp.
References GNEEdge::getLanes(), GNEEdge::getNBEdge(), GNELane::getParentEdge(), NBEdge::getPermissions(), getVehicleClassNames(), GNELane::setAttribute(), SUMO_ATTR_ALLOW, SVC_PEDESTRIAN, and toString().
Referenced by addSRestrictedLane(), and GNEViewNet::restrictLane().
GNEAdditional * GNENet::retrieveAdditional | ( | const std::string & | idl, |
bool | hardFail = true |
||
) | const |
Returns the named additional.
[in] | id | The id of the additional to return. |
[in] | hardFail | enable or disable exception if additional to insert is duplicated |
Definition at line 1304 of file GNENet.cpp.
References myAdditionals.
Referenced by GNEAdditionalHandler::buildAdditional(), and GNEAdditionalHandler::parseAndBuildVariableSpeedSign().
std::vector< GNEAdditional * > GNENet::retrieveAdditionals | ( | bool | onlySelected = false | ) |
return all additionals
[in] | onlySelected | Whether to return only selected additionals |
Definition at line 1319 of file GNENet.cpp.
References GLO_ADDITIONAL, gSelected, GUISelectedStorage::isSelected(), and myAdditionals.
Referenced by GNEViewNet::deleteSelectedAdditionals().
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 847 of file GNENet.cpp.
References GUIGlObject::getMicrosimID(), GUIGlObjectStorage::getObjectBlocking(), GUIGlObjectStorage::gIDStorage, GLO_ADDITIONAL, GLO_CONNECTION, GLO_CROSSING, GLO_EDGE, GLO_JUNCTION, GLO_LANE, GLO_POI, GLO_POLYGON, and GUIGlObjectStorage::unblockObject().
Referenced by 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 edge should result in an exception |
UnknownElement |
Definition at line 743 of file GNENet.cpp.
References myEdges.
Referenced by GNEViewNet::addRestrictedLane(), GNEAdditionalHandler::buildAdditional(), GNEAdditional::changeEdge(), GNECalibratorRoute::checkEdgeRoute(), createEdge(), GNEApplicationWindow::GNEShapeHandler::getLanePos(), GNEAdditional::getPopUpMenu(), GNEConnectorFrame::initTargets(), GNECrossing::isValid(), GNEVaporizer::isValid(), GNERouteProbe::isValid(), GNERerouter::isValid(), GNEEdge::isValid(), GNEJunction::markAsModified(), GNEJunction::move(), GNERerouterIntervalDialog::onCmdEditClosingReroute(), GNERerouterIntervalDialog::onCmdEditDestProbReroute(), GNEConnectorFrame::onCmdSelectConflicts(), GNEConnectorFrame::onCmdSelectDeadStarts(), GNECrossingFrame::crossingParameters::onCmdSetAttribute(), GNEAdditionalHandler::parseAndBuildRerouter(), GNEAdditionalHandler::parseAndBuildRouteProbe(), GNEAdditionalHandler::parseAndBuildVaporizer(), GNEAdditionalHandler::parseCalibratorRoute(), GNEViewNet::removeRestrictedLane(), GNEViewNet::restrictLane(), GNEEdge::retrieveConnection(), retrieveLane(), GNECrossing::setAttribute(), GNERerouter::setAttribute(), GNECalibratorRoute::setEdges(), 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 758 of file GNENet.cpp.
References GLO_EDGE, gSelected, GUISelectedStorage::isSelected(), and myEdges.
Referenced by GNEAdditionalFrame::addAdditional(), GNEViewNet::addRestrictedLane(), GNEViewNet::deleteSelectedEdges(), finishMoveSelection(), GNETLSEditorFrame::handleMultiChange(), moveSelection(), GNEViewNet::onCmdRevertRestriction(), GNEConnectorFrame::onCmdSelectConflicts(), GNEConnectorFrame::onCmdSelectDeadEnds(), GNEConnectorFrame::onCmdSelectPass(), GNEViewNet::onCmdStraightenEdges(), GNEViewNet::removeRestrictedLane(), GNEAdditionalFrame::SelectorParentEdges::showList(), and GNEAdditionalFrame::SelectorParentEdges::updateUseSelectedEdges().
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 730 of file GNENet.cpp.
References myJunctions.
Referenced by changeEdgeEndpoints(), GNEJunction::invalidateTLS(), GNEEdge::isValid(), GNEJunction::isValid(), GNETLSEditorFrame::onCmdOK(), GNEEdge::setAttribute(), and GNEJunction::setAttribute().
std::vector< GNEJunction * > GNENet::retrieveJunctions | ( | bool | onlySelected = false | ) |
return all junctions
[in] | onlySelected | Whether to return only selected junctions |
Definition at line 805 of file GNENet.cpp.
References GLO_JUNCTION, gSelected, GUISelectedStorage::isSelected(), and myJunctions.
Referenced by GNEViewNet::deleteSelectedJunctions(), finishMoveSelection(), joinSelectedJunctions(), moveSelection(), and GNEConnectorFrame::onCmdSelectDeadStarts().
GNELane * GNENet::retrieveLane | ( | const std::string & | id, |
bool | failHard = true |
||
) |
get lane by id
[in] | id | The id of the desired lane |
[in] | failHard | Whether attempts to retrieve a nonexisting lane should result in an exception |
UnknownElement |
Definition at line 785 of file GNENet.cpp.
References SUMOXMLDefinitions::getEdgeIDFromLane(), GNEEdge::getLanes(), retrieveEdge(), SUMO_TAG_LANE, and toString().
Referenced by GNEAdditionalHandler::buildAdditional(), GNEAdditional::changeLane(), GNEAdditional::getPopUpMenu(), GNEDetectorE1::isValid(), GNEDetectorEntry::isValid(), GNEDetectorExit::isValid(), GNEDetectorE2::isValid(), GNEContainerStop::isValid(), GNEBusStop::isValid(), GNEVariableSpeedSign::isValid(), GNEChargingStation::isValid(), GNECalibrator::isValid(), GNERerouterIntervalDialog::onCmdEditClosingLaneReroute(), GNEAdditionalHandler::parseAndBuildBusStop(), GNEAdditionalHandler::parseAndBuildCalibrator(), GNEAdditionalHandler::parseAndBuildChargingStation(), GNEAdditionalHandler::parseAndBuildContainerStop(), GNEAdditionalHandler::parseAndBuildDetectorE1(), GNEAdditionalHandler::parseAndBuildDetectorE2(), GNEAdditionalHandler::parseAndBuildDetectorEntry(), GNEAdditionalHandler::parseAndBuildDetectorExit(), GNEAdditionalHandler::parseAndBuildVariableSpeedSign(), and GNEVariableSpeedSign::setAttribute().
std::vector< GNELane * > GNENet::retrieveLanes | ( | bool | onlySelected = false | ) |
return all lanes
[in] | onlySelected | Whether to return only selected lanes |
Definition at line 770 of file GNENet.cpp.
References GLO_LANE, gSelected, GUISelectedStorage::isSelected(), and myEdges.
Referenced by GNEAdditionalFrame::addAdditional(), GNEViewNet::addRestrictedLane(), GNEViewNet::deleteSelectedEdges(), GNETLSEditorFrame::handleMultiChange(), GNEViewNet::onCmdDuplicateLane(), GNEViewNet::onCmdRevertRestriction(), GNEViewNet::removeRestrictedLane(), GNEViewNet::restrictLane(), GNEAdditionalFrame::SelectorParentLanes::showList(), and GNEAdditionalFrame::SelectorParentLanes::updateUseSelectedLanes().
void GNENet::reverseEdge | ( | GNEEdge * | edge, |
GNEUndoList * | undoList | ||
) |
reverse edge
[in] | edge | The edge to be reversed |
Definition at line 604 of file GNENet.cpp.
References createEdge(), deleteEdge(), GNEEdge::getGNEJunctionDestiny(), GNEEdge::getGNEJunctionSource(), GNEAttributeCarrier::getID(), NBEdge::getInnerGeometry(), GNEEdge::getNBEdge(), GNEUndoList::p_begin(), PositionVector::reverse(), GNEEdge::setAttribute(), SUMO_ATTR_SHAPE, SUMO_TAG_EDGE, and toString().
Referenced by GNEViewNet::onCmdReverseEdge().
bool GNENet::revertLaneRestriction | ( | GNELane * | lane, |
GNEUndoList * | undoList | ||
) |
revert prevously restricted lane
[in] | lane | The lane to be unrestricted |
[in] | undoList | The undolist in which to mark changes |
Definition at line 485 of file GNENet.cpp.
References GNELane::isRestricted(), joinToString(), GNELane::setAttribute(), SUMO_ATTR_ALLOW, SUMO_ATTR_DISALLOW, SumoVehicleClassStrings, SVC_BICYCLE, SVC_BUS, and SVC_PEDESTRIAN.
Referenced by GNEViewNet::onCmdRevertRestriction().
bool GNENet::routeExists | ( | const std::string & | routeID | ) | const |
Check if exist a route with these ID.
Definition at line 1417 of file GNENet.cpp.
References getAdditionals(), GNECalibrator::routeExists(), and SUMO_TAG_CALIBRATOR.
Referenced by GNECalibrator::generateRouteID(), GNEAdditionalHandler::parseCalibratorFlow(), GNEAdditionalHandler::parseCalibratorRoute(), GNECalibratorFlow::setRoute(), and GNECalibratorRoute::setRouteID().
void GNENet::save | ( | OptionsCont & | oc | ) |
save the network
[in] | oc | The OptionsCont which knows how and where to save |
Definition at line 688 of file GNENet.cpp.
References computeAndUpdate(), myNetBuilder, and NWFrame::writeNetwork().
Referenced by GNEApplicationWindow::onCmdSaveNetwork().
void GNENet::saveAdditionals | ( | const std::string & | filename | ) |
save additional elements of the network
[in] | filename | name of the file in wich save additionals |
Definition at line 697 of file GNENet.cpp.
References OutputDevice::close(), OutputDevice::getDevice(), myAdditionals, myAdditionalsSaved, and OutputDevice::openTag().
Referenced by GNEApplicationWindow::onCmdSaveAdditionals().
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 717 of file GNENet.cpp.
References computeAndUpdate(), NBNetBuilder::getNodeCont(), myNetBuilder, and NWWriter_XML::writeJoinedJunctions().
Referenced by 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 710 of file GNENet.cpp.
References computeAndUpdate(), myNetBuilder, and NWWriter_XML::writeNetwork().
Referenced by GNEApplicationWindow::onCmdSaveAsPlainXML().
void GNENet::setAdditionalSaved | ( | bool | value | ) |
set manually the flag of additionals
Definition at line 1627 of file GNENet.cpp.
References myAdditionalsSaved.
|
virtualinherited |
Changes the microsimID of the object.
Reimplemented in GNEEdge.
Definition at line 141 of file GUIGlObject.cpp.
References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myMicrosimID.
Referenced by renameJunction(), GNEAdditional::setAdditionalID(), GNELane::setIndex(), GNEEdge::setMicrosimID(), and GNEConnection::updateID().
|
protectedinherited |
usually names are prefixed by a type-specific string. this method can be used to change the default
Definition at line 271 of file GUIGlObject.cpp.
References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myPrefix.
void GNENet::setViewNet | ( | GNEViewNet * | viewNet | ) |
Set the viewNet to be notified of network changes.
Definition at line 724 of file GNENet.cpp.
References myViewNet.
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 540 of file GNENet.cpp.
References createEdge(), createJunction(), deleteEdge(), NBEdge::getGeometry(), GNEEdge::getGNEJunctionSource(), GUIGlObject::getMicrosimID(), GNEEdge::getNBEdge(), GNE_ATTR_SHAPE_END, GNE_ATTR_SHAPE_START, GNEChange_Connection, PositionVector::nearest_offset_to_point2D(), GNEUndoList::p_begin(), GNEEdge::setAttribute(), PositionVector::splitAt(), SUMO_ATTR_SHAPE, SUMO_TAG_EDGE, toString(), and GNEEdge::wasSplit().
Referenced by 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 593 of file GNENet.cpp.
References GNEUndoList::p_begin(), GNEUndoList::p_end(), splitEdge(), SUMO_TAG_EDGE, and toString().
Referenced by GNEViewNet::onCmdSplitEdgeBidi().
|
private |
notify myViewNet
Definition at line 1544 of file GNENet.cpp.
References myViewNet.
Referenced by changeEdgeEndpoints(), computeEverything(), deleteAdditional(), deleteSingleEdge(), deleteSingleJunction(), insertAdditional(), refreshAdditional(), refreshElement(), registerEdge(), and registerJunction().
void GNENet::updateAdditionalID | ( | const std::string & | oldID, |
GNEAdditional * | additional | ||
) |
update additional ID in container
Definition at line 1290 of file GNENet.cpp.
References GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTag(), myAdditionals, myAdditionalsSaved, and toString().
Referenced by GNEAdditional::setAdditionalID().
bool GNENet::vehicleTypeExists | ( | const std::string & | vehicleTypeID | ) | const |
Check if exist a vehicle type with these ID.
Definition at line 1430 of file GNENet.cpp.
References getAdditionals(), SUMO_TAG_CALIBRATOR, and GNECalibrator::vehicleTypeExists().
Referenced by GNECalibrator::generateVehicleTypeID(), GNEAdditionalHandler::parseCalibratorFlow(), GNEAdditionalHandler::parseCalibratorVehicleType(), GNECalibratorFlow::setVehicleType(), and GNECalibratorVehicleType::setVehicleTypeID().
|
friend |
Definition at line 93 of file GNENet.h.
Referenced by deleteConnection(), and splitEdge().
|
friend |
Definition at line 92 of file GNENet.h.
Referenced by createEdge(), and deleteEdge().
|
friend |
declare friend class
Definition at line 91 of file GNENet.h.
Referenced by createJunction(), and deleteJunction().
|
staticinherited |
Definition at line 77 of file GUIGlObject.h.
Referenced by GUISUMOAbstractView::getTrackedID(), GUISUMOAbstractView::paintGL(), and GUIViewTraffic::stopTrack().
|
protected |
map with the name and pointer to additional elements of net
Definition at line 542 of file GNENet.h.
Referenced by deleteAdditional(), generateVaporizerID(), getAdditional(), getAdditionalID(), getAdditionals(), getGlIDs(), getNumberOfAdditionals(), insertAdditional(), refreshAdditional(), retrieveAdditional(), retrieveAdditionals(), saveAdditionals(), and updateAdditionalID().
|
protected |
Flag to check if additionals must be saved.
Definition at line 560 of file GNENet.h.
Referenced by deleteAdditional(), insertAdditional(), isAdditionalsSaved(), saveAdditionals(), setAdditionalSaved(), and updateAdditionalID().
|
protected |
Definition at line 546 of file GNENet.h.
Referenced by createEdge(), and reserveEdgeID().
|
protected |
map with the name and pointer to edges of net
Definition at line 539 of file GNENet.h.
Referenced by computeAndUpdate(), createEdge(), deleteJunction(), deleteSingleEdge(), getGlIDs(), GNENet(), initGNEConnections(), joinSelectedJunctions(), mergeJunctions(), registerEdge(), renameEdge(), replaceJunctionByGeometry(), retrieveEdge(), retrieveEdges(), retrieveLanes(), and ~GNENet().
|
protected |
list of edge ids for which turn-arounds must be added explicitly
Definition at line 554 of file GNENet.h.
Referenced by addExplicitTurnaround(), computeAndUpdate(), and removeExplicitTurnaround().
|
protected |
the rtree which contains all GUIGlObjects (so named for historical reasons)
Definition at line 520 of file GNENet.h.
Referenced by computeAndUpdate(), deleteAdditional(), deleteSingleEdge(), deleteSingleJunction(), getBoundary(), getVisualisationSpeedUp(), GNENet(), insertAdditional(), refreshAdditional(), refreshElement(), registerEdge(), and registerJunction().
|
protected |
Definition at line 547 of file GNENet.h.
Referenced by createJunction(), and reserveJunctionID().
|
protected |
map with the name and pointer to junctions of net
Definition at line 536 of file GNENet.h.
Referenced by computeAndUpdate(), createJunction(), deleteSingleJunction(), getGlIDs(), registerJunction(), removeSolitaryJunctions(), renameJunction(), retrieveJunction(), retrieveJunctions(), and ~GNENet().
|
protected |
whether the net needs recomputation
Definition at line 557 of file GNENet.h.
Referenced by computeAndUpdate(), computeEverything(), and requireRecompute().
|
protected |
The internal netbuilder.
Definition at line 526 of file GNENet.h.
Referenced by computeAndUpdate(), deleteSingleEdge(), deleteSingleJunction(), getNetBuilder(), getTLLogicCont(), GNENet(), insertEdge(), insertJunction(), joinSelectedJunctions(), netHasCrossings(), renameEdge(), renameJunction(), save(), saveJoined(), savePlain(), and ~GNENet().
|
protected |
the container for additional pois and polygons
Definition at line 551 of file GNENet.h.
Referenced by getShapeContainer().
|
protected |
The viewNet to be notofied of about changes.
Definition at line 523 of file GNENet.h.
Referenced by deleteConnection(), getApp(), getViewNet(), setViewNet(), and update().
|
private |
the z boundary (stored in the x-coordinate), values of 0 are ignored
Definition at line 602 of file GNENet.h.
Referenced by getZBoundary(), GNENet(), and registerJunction().
|
static |
color of selected connection
Definition at line 103 of file GNENet.h.
Referenced by GNEConnection::drawGL().
|
static |
|
static |
color of selection
Definition at line 97 of file GNENet.h.
Referenced by GNEViewNet::doPaintGL(), GNEEdge::drawGL(), GNELane::drawGL(), GNELane::drawMarkings(), and GNEJunction::setColor().
|
staticinherited |
associates object types with strings
Definition at line 76 of file GUIGlObject.h.
|
staticprivate |
marker for whether the z-boundary is initialized
Definition at line 605 of file GNENet.h.
Referenced by GNENet(), and registerJunction().