SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GNENet Class Reference

A NBNetBuilder extended by visualisation and editing capabilities. More...

#include <GNENet.h>

Inheritance diagram for GNENet:
Inheritance graph
Collaboration diagram for GNENet:
Collaboration graph

Public Member Functions

void addExplicitTurnaround (std::string id)
 add edge id to the list of explicit turnarounds More...
 
GNEEdgeaddReversedEdge (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)
 
GNEEdgecreateEdge (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...
 
GNEJunctioncreateJunction (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 connectino 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
 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...
 
GNEAdditionalgetAdditional (SumoXMLTag type, const std::string &id) const
 Returns the named additional. More...
 
std::string getAdditionalID (SumoXMLTag type, const GNELane *lane, const SUMOReal pos) const
 Returns the additional close to the given position. More...
 
std::vector< GNEAdditional * > getAdditionals (SumoXMLTag type=SUMO_TAG_NOTHING)
 get vector with additionals More...
 
FXApp * getApp ()
 get pointer to the main App More...
 
const BoundarygetBoundary () const
 returns the bounder of the network More...
 
std::set< GUIGlIDgetGlIDs (GUIGlObjectType type=GLO_MAX)
 
int getNumberOfAdditionals (SumoXMLTag type=SUMO_TAG_NOTHING)
 Returns the number of additionals of the net. More...
 
ShapeContainergetShapeContainer ()
 get shape container More...
 
NBTrafficLightLogicContgetTLLogicCont ()
 returns the tllcont of the underlying netbuilder More...
 
GNEViewNetgetViewNet () const
 get view net More...
 
SUMORTreegetVisualisationSpeedUp ()
 Returns the RTree used for visualisation speed-up. More...
 
const SUMORTreegetVisualisationSpeedUp () 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...
 
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...
 
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)
 
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...
 
bool restrictLane (SUMOVehicleClass vclass, GNELane *lane, GNEUndoList *undoList)
 transform lane to restricted lane More...
 
std::vector
< GNEAttributeCarrier * > 
retrieveAttributeCarriers (const std::set< GUIGlID > &ids, GUIGlObjectType type)
 get the attribute carriers based on GlIDs More...
 
GNEEdgeretrieveEdge (const std::string &id, bool failHard=true)
 get edge by id More...
 
std::vector< GNEEdge * > retrieveEdges (bool onlySelected=false)
 return all edges More...
 
GNEJunctionretrieveJunction (const std::string &id, bool failHard=true)
 get junction by id More...
 
std::vector< GNEJunction * > retrieveJunctions (bool onlySelected=false)
 return all junctions More...
 
GNELaneretrieveLane (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...
 
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 setAdditionalsFile (const std::string &additionalFile)
 set additionals File More...
 
void setAdditionalsOutputFile (const std::string &additionalOutputFile)
 set additionals File More...
 
void setViewNet (GNEViewNet *viewNet)
 Set the viewNet to be notified of network changes. More...
 
GNEJunctionsplitEdge (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...
 
void updateJunctionShapes ()
 update junction shapes More...
 
 ~GNENet ()
 Destructor. More...
 
inherited from GUIGlObject
GUIGLObjectPopupMenugetPopUpMenu (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own popup-menu. More...
 
GUIParameterTableWindowgetParameterWindow (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 BoundarygetZBoundary () 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

Returns
This object's typed id
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 GUIParameterTableWindowgetTypeParameterWindow (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

Parameters
[in]wThe opened parameter window
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...
 
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...
 
NBNetBuildermyNetBuilder
 The internal netbuilder. More...
 
GUIShapeContainer myShapeContainer
 the container for additional pois and polygons More...
 
GNEViewNetmyViewNet
 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...
 
GNEEdgeregisterEdge (GNEEdge *edge)
 registers an edge with GNENet containers More...
 
GNEJunctionregisterJunction (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 SUMOReal 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...
 

Detailed Description

A NBNetBuilder extended by visualisation and editing capabilities.

Definition at line 87 of file GNENet.h.

Member Typedef Documentation

typedef std::map<std::pair<std::string, SumoXMLTag>, GNEAdditional*> GNENet::GNEAdditionals
protected

Definition at line 495 of file GNENet.h.

typedef std::map<std::string, GNEEdge*> GNENet::GNEEdges
protected

Definition at line 494 of file GNENet.h.

typedef std::map<std::string, GNEJunction*> GNENet::GNEJunctions
protected

Definition at line 493 of file GNENet.h.

Constructor & Destructor Documentation

GNENet::~GNENet ( )

Destructor.

Definition at line 156 of file GNENet.cpp.

References myEdges, myJunctions, and myNetBuilder.

Member Function Documentation

void GNENet::addExplicitTurnaround ( std::string  id)

add edge id to the list of explicit turnarounds

Definition at line 1103 of file GNENet.cpp.

References myExplicitTurnarounds.

Referenced by GNEJunction::setLogicValid().

void GUIGlObject::addParameterTable ( GUIParameterTableWindow w)
inherited

Definition at line 260 of file GUIGlObject.cpp.

References GUIGlObject::myParamWindows.

bool GNENet::addSRestrictedLane ( SUMOVehicleClass  vclass,
GNEEdge edge,
GNEUndoList undoList 
)

add restricted lane to edge

Parameters
[in]vclassvehicle class to restrict
[in]edgeThe edge in which insert restricted lane
[in]undoListThe undolist in which to mark changes

Definition at line 459 of file GNENet.cpp.

References duplicateLane(), GNEEdge::getLanes(), and restrictLane().

Referenced by GNEViewNet::addRestrictedLane().

void GUIGlObject::buildShowManipulatorPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to open the manipulator window.

Parameters
in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether a separator shall be added, too

Definition at line 251 of file GUIGlObject.cpp.

References GUIIconSubSys::getIcon(), ICON_MANIP, and MID_MANIP.

Referenced by GUILaneSpeedTrigger::getPopUpMenu(), and GUITriggeredRerouter::getPopUpMenu().

void GUIGlObject::buildShowParamsPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited
void GUIGlObject::buildShowTypeParamsPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to open the type parameter window.

Parameters
in,filled]ret The popup menu to add the entry to
[in]addSeparatorWhether a separator shall be added, too

Definition at line 230 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 1072 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 1406 of file GNENet.cpp.

References NBNetBuilder::compute(), initGNEConnections(), myEdges, myExplicitTurnarounds, myJunctions, myNeedRecompute, myNetBuilder, and refreshElement().

Referenced by computeEverything(), save(), saveJoined(), and savePlain().

void GNENet::computeEverything ( GNEApplicationWindow window,
bool  force = false 
)
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)

Parameters
[in]srcThe starting junction
[in]destThe ending junction
[in]tplThe template edge from which to copy attributes (including lane attrs)
[in]undoListThe undoList in which to mark changes
[in]suggestedName
[in]wasSplitWhether the edge was created from a split
[in]allowDuplicateGeomWhether to create the edge even though another edge with the same geometry exists
Returns
The newly created edge or 0 if no edge was created

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(), SUMOReal, 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

Parameters
[in]positionThe position of the new junction
[in]undoListThe undolist in which to mark changes
Returns
the new junction

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::deleteGeometryOrEdge ( GNEEdge edge,
const Position pos,
GNEUndoList undoList 
)

removes geometry when pos is close to a geometry node, deletes the whole edge otherwise

Parameters
[in]edgeThe edge to be removed
[in]posThe position that was clicked upon
[in]undoListThe undolist in which to mark changes

Definition at line 488 of file GNENet.cpp.

References deleteEdge(), and GNEEdge::deleteGeometry().

Referenced by GNEViewNet::onLeftBtnPress().

void GNENet::deleteJunction ( GNEJunction junction,
GNEUndoList undoList 
)
void GNENet::drawGL ( const GUIVisualizationSettings s) const
virtual

Draws the object.

Parameters
[in]sThe settings for the current view (may influence drawing)
See also
GUIGlObject::drawGL

Implements GUIGlObject.

Definition at line 211 of file GNENet.cpp.

void GUIGlObject::drawGLAdditional ( GUISUMOAbstractView *const  parent,
const GUIVisualizationSettings s 
) const
virtualinherited

Draws additional, user-triggered visualisations.

Parameters
[in]parentThe view
[in]sThe settings for the current view (may influence drawing)

Reimplemented in GUIBaseVehicle, GUIPerson, and GUIContainer.

Definition at line 158 of file GUIGlObject.cpp.

References UNUSED_PARAMETER.

void GNENet::duplicateLane ( GNELane lane,
GNEUndoList undoList 
)

duplicates lane

Parameters
[in]laneThe lane to be duplicated
[in]undoListThe undolist in which to mark changes

Definition at line 402 of file GNENet.cpp.

References GNELane::getIndex(), NBEdge::getLaneStruct(), GNEEdge::getNBEdge(), GNELane::getParentEdge(), GNEUndoList::p_begin(), GNEUndoList::p_end(), and requireRecompute().

Referenced by addSRestrictedLane(), and GNEViewNet::onCmdDuplicateLane().

void GNENet::finishMoveSelection ( GNEUndoList undoList)

register changes to junction and edge positions with the undoList

Definition at line 1145 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().

GNEAdditional * GNENet::getAdditional ( SumoXMLTag  type,
const std::string &  id 
) const
std::string GNENet::getAdditionalID ( SumoXMLTag  type,
const GNELane lane,
const SUMOReal  pos 
) const

Returns the additional close to the given position.

Parameters
[in]typetag with the type of additional
[in]lanethe lane of the additional to return.
[in]posthe position of the additional to return.
Returns
The additional id on the location, or "" if don't exists

Definition at line 1262 of file GNENet.cpp.

References myAdditionals, and POSITION_EPS.

std::vector< GNEAdditional * > GNENet::getAdditionals ( SumoXMLTag  type = SUMO_TAG_NOTHING)

get vector with additionals

Parameters
[in]typetype of additional to get. SUMO_TAG_NOTHING will get all additionals
Returns
vector with pointers to additionals.

Definition at line 1273 of file GNENet.cpp.

References myAdditionals, and SUMO_TAG_NOTHING.

Referenced by GNEAdditionalFrame::additionalSet::showList().

FXApp * GNENet::getApp ( )

get pointer to the main App

Definition at line 969 of file GNENet.cpp.

References myViewNet.

const Boundary & GNENet::getBoundary ( ) const

returns the bounder of the network

Definition at line 187 of file GNENet.cpp.

References myGrid.

Referenced by getCenteringBoundary().

Boundary GNENet::getCenteringBoundary ( ) const
virtual

Returns the boundary to which the view shall be centered in order to show the object.

Returns
The boundary the object is within
See also
GUIGlObject::getCenteringBoundary

Implements GUIGlObject.

Definition at line 216 of file GNENet.cpp.

References getBoundary().

GUIGlID GUIGlObject::getGlID ( ) const
inherited

Returns the numerical id of the object.

Returns
This object's gl-id

Definition at line 125 of file GUIGlObject.cpp.

References GUIGlObject::myGlID.

Referenced by addReversedEdge(), GUIMessageWindow::appendMsg(), GUIGlObject::buildSelectionPopupEntry(), GUINet::createTLWrapper(), deleteConnection(), deleteEdge(), deleteJunction(), deleteLane(), deleteSingleEdge(), deleteSingleJunction(), GUIVehicle::drawAction_drawPersonsAndContainers(), GNEDetectorExit::drawGL(), GNEDetectorEntry::drawGL(), GNEDetectorE1::drawGL(), GNEDetectorE2::drawGL(), GNEContainerStop::drawGL(), GNEBusStop::drawGL(), GNEDetectorE3::drawGL(), GNEInternalLane::drawGL(), GNECrossing::drawGL(), GNEJunction::drawGL(), GUIContainer::drawGL(), GNEVaporizer::drawGL(), GNEVariableSpeedSignal::drawGL(), GUIPerson::drawGL(), GUIPolygon::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GUIPointOfInterest::drawGL(), GNERouteProbe::drawGL(), GUIJunctionWrapper::drawGL(), GNEChargingStation::drawGL(), GNEEdge::drawGL(), GNELane::drawGL(), GUIChargingStation::drawGL(), GUIContainerStop::drawGL(), GNEPoly::drawGL(), GNEConnection::drawGL(), GNECalibrator::drawGL(), GUIBusStop::drawGL(), GUIEdge::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GNERerouter::drawGL(), GUIContainer::drawGLAdditional(), GUIPerson::drawGLAdditional(), GUIBaseVehicle::drawGLAdditional(), GUILane::drawLinkRule(), GUIBaseVehicle::drawOnPos(), GUIMEVehicle::getColorValue(), GUIVehicle::getColorValue(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GUIContainer::getColorValue(), GUIPerson::getColorValue(), GNEJunction::getColorValue(), GUILane::getColorValue(), GNELane::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(), 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(), GUISUMOAbstractView::removeAdditionalGLVisualisation(), GLObjectValuePassConnector< std::pair< SUMOTime, MSPhaseDefinition > >::removeObject(), GUIVehicle::selectBlockingFoes(), GNEJunction::setColor(), GUIMessageWindow::setCursorPos(), and GUIGlObject::~GUIGlObject().

const std::string & GUIGlObject::getMicrosimID ( ) const
virtualinherited

Returns the id of the object as known to microsim.

Definition at line 139 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(), GNEJunction::getAttribute(), GNEPoly::getAttribute(), GNEEdge::getAttribute(), GNELane::getAttribute(), GNELane::getParentName(), GNENetElement::getParentName(), GNEDetectorE3::getParentName(), GNEVariableSpeedSignal::getParentName(), GNEVaporizer::getParentName(), GNEStoppingPlace::getParentName(), GNERouteProbe::getParentName(), GNEDetector::getParentName(), GNECalibrator::getParentName(), GNEAdditional::getParentName(), GNERerouter::getParentName(), GNEAdditional::getPopUpMenu(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), GNEConnectorFrame::handleLaneClick(), GNETLSEditorFrame::handleMultiChange(), GNEEdge::isValid(), GNEViewNet::mergeJunctions(), GNEPoly::moveGeometry(), GNEEdge::moveGeometry(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCopyName(), GNEViewNet::onCmdNodeShape(), GNEViewNet::onLeftBtnPress(), GNEInspectorFrame::onUpdCopyTemplate(), registerEdge(), registerJunction(), remapEdge(), GNEEdge::removeConnection(), replaceJunctionByGeometry(), retrieveAttributeCarriers(), GNEAdditional::setAdditionalID(), GNEEdge::setAttribute(), splitEdge(), and GNEConnectorFrame::updateDescription().

int GNENet::getNumberOfAdditionals ( SumoXMLTag  type = SUMO_TAG_NOTHING)

Returns the number of additionals of the net.

Parameters
[in]typetype of additional to count. SUMO_TAG_NOTHING will count all additionals
Returns
Number of additionals of the net

Definition at line 1285 of file GNENet.cpp.

References myAdditionals, and SUMO_TAG_NOTHING.

Referenced by GNEAdditionalFrame::generateID().

GUIParameterTableWindow * GNENet::getParameterWindow ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
virtual

Returns an own parameter window.

Parameters
[in]appThe application needed to build the parameter window
[in]parentThe parent window needed to build the parameter window
Returns
The built parameter window
See also
GUIGlObject::getParameterWindow

Implements GUIGlObject.

Definition at line 205 of file GNENet.cpp.

const std::string & GUIGlObject::getParentName ( ) const
virtualinherited

Returns the name of the parent object (if any)

Returns
This object's parent id

Reimplemented in GNERerouter, GNEAdditional, GNEAdditionalSet, GNECalibrator, GNEDetector, GNERouteProbe, GNEStoppingPlace, GNEVaporizer, GNEVariableSpeedSignal, GUILane, GNEDetectorE3, GNELane, and GNENetElement.

Definition at line 119 of file GUIGlObject.cpp.

References StringUtils::emptyString.

Referenced by GUIGLObjectPopupMenu::onCmdCopyEdgeName().

GUIGLObjectPopupMenu * GNENet::getPopUpMenu ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
virtual

Returns an own popup-menu.

Parameters
[in]appThe application needed to build the popup-menu
[in]parentThe parent window needed to build the popup-menu
Returns
The built popup-menu
See also
GUIGlObject::getPopUpMenu

Implements GUIGlObject.

Definition at line 194 of file GNENet.cpp.

References GUIGlObject::buildCenterPopupEntry(), GUIGlObject::buildPopupHeader(), and GUIGlObject::buildPositionCopyEntry().

ShapeContainer & GNENet::getShapeContainer ( )

get shape container

Definition at line 1169 of file GNENet.cpp.

References myShapeContainer.

Referenced by GNEApplicationWindow::onCmdOpenShapes(), and GNEViewNet::onLeftBtnPress().

NBTrafficLightLogicCont & GNENet::getTLLogicCont ( )
GUIGlObjectType GUIGlObject::getType ( ) const
inherited

Returns the type of the object as coded in GUIGlObjectType.

See also
GUIGlObjectType

Definition at line 152 of file GUIGlObject.cpp.

References GUIGlObject::myGLObjectType.

Referenced by GUIGlObject::buildSelectionPopupEntry(), GUIVehicle::drawAction_drawPersonsAndContainers(), GUIVehicle::drawAction_drawRailCarriages(), GUIPerson::drawAction_drawWalkingareaPath(), GNEAdditionalSet::drawConnections(), GNEDetector::drawDetectorIcon(), GNEDetectorEntry::drawGL(), GNEDetectorExit::drawGL(), GNEDetectorE1::drawGL(), GNEDetectorE2::drawGL(), GNEContainerStop::drawGL(), GNEBusStop::drawGL(), GNEDetectorE3::drawGL(), GNEJunction::drawGL(), GUIContainer::drawGL(), GUIPerson::drawGL(), GNEVaporizer::drawGL(), GNEVariableSpeedSignal::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GNERouteProbe::drawGL(), GUIJunctionWrapper::drawGL(), GNEChargingStation::drawGL(), GNEEdge::drawGL(), GNELane::drawGL(), GUIChargingStation::drawGL(), GUIContainerStop::drawGL(), GNEConnection::drawGL(), GNECalibrator::drawGL(), GUIBusStop::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GNERerouter::drawGL(), GUIPerson::drawGLAdditional(), GUIBaseVehicle::drawGLAdditional(), GNEAdditional::drawLockIcon(), GUIBaseVehicle::drawOnPos(), GNEDetectorEntry::getAttribute(), GNEDetectorExit::getAttribute(), GNEDetectorE1::getAttribute(), GNEDetectorE2::getAttribute(), GNEContainerStop::getAttribute(), GNEBusStop::getAttribute(), GNEDetectorE3::getAttribute(), GNEVariableSpeedSignal::getAttribute(), GNEVaporizer::getAttribute(), GNERouteProbe::getAttribute(), GNEChargingStation::getAttribute(), GNECalibrator::getAttribute(), GNEJunction::getAttribute(), GNERerouter::getAttribute(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GNEJunction::getColorValue(), GUILane::getColorValue(), GNELane::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(), GNEDetectorEntry::isValid(), GNEDetectorExit::isValid(), GNEDetectorE1::isValid(), GNEDetectorE2::isValid(), GNEContainerStop::isValid(), GNEBusStop::isValid(), GNEDetectorE3::isValid(), GNEVariableSpeedSignal::isValid(), GNEVaporizer::isValid(), GNERouteProbe::isValid(), GNEChargingStation::isValid(), GNECalibrator::isValid(), GNERerouter::isValid(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GNEConnectorFrame::onCmdClearSelectedConnections(), GUIGLObjectPopupMenu::onCmdCopyEdgeName(), GNEViewNet::onDoubleClicked(), GNEViewNet::onLeftBtnPress(), LayeredRTree::selectLayer(), GNEDetectorExit::setAttribute(), GNEDetectorEntry::setAttribute(), GNEDetectorE1::setAttribute(), GNEDetectorE2::setAttribute(), GNEContainerStop::setAttribute(), GNEBusStop::setAttribute(), GNEDetectorE3::setAttribute(), GNEVaporizer::setAttribute(), GNEVariableSpeedSignal::setAttribute(), GNERouteProbe::setAttribute(), GNEChargingStation::setAttribute(), GNECalibrator::setAttribute(), GNERerouter::setAttribute(), GNEJunction::setColor(), and GUISelectedStorage::toggleSelection().

GUIParameterTableWindow * GUIGlObject::getTypeParameterWindow ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
virtualinherited

Returns an own type parameter window (optional)

Parameters
[in]appThe application needed to build the parameter window
[in]parentThe parent window needed to build the parameter window
Returns
The built parameter window

Reimplemented in GUIVehicle, GUIBaseVehicle, and GUIMEVehicle.

Definition at line 131 of file GUIGlObject.cpp.

References UNUSED_PARAMETER.

Referenced by GUIGLObjectPopupMenu::onCmdShowTypePars().

SUMORTree & GNENet::getVisualisationSpeedUp ( )

Returns the RTree used for visualisation speed-up.

Returns
The 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.

Returns
The 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.

void GNENet::initDetectors ( )
private

Initialises the detector wrappers.

void GNENet::initGNEConnections ( )

initialize GNEConnections

Definition at line 1396 of file GNENet.cpp.

References myEdges.

Referenced by computeAndUpdate(), and GNEViewNet::onCmdToogleShowConnection().

void GNENet::initTLMap ( )
private

Initialises the tl-logic map and wrappers.

void GNENet::insertAdditional ( GNEAdditional additional,
bool  hardFail = true 
)
void GNENet::insertEdge ( GNEEdge edge)
private

inserts a single edge into the net and into the underlying netbuild-container

Definition at line 1307 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().

void GNENet::insertJunction ( GNEJunction junction)
private

inserts a single junction into the net and into the underlying netbuild-container

Definition at line 1300 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::mergeJunctions ( GNEJunction moved,
GNEJunction target,
GNEUndoList undoList 
)

merge the given junctions edges between the given junctions will be deleted

Parameters
[in]movedThe junction that will be eliminated
[in]targetThe junction that will be enlarged
[in]undoListThe undo list with which to register changes

Definition at line 604 of file GNENet.cpp.

References deleteJunction(), GNEEdge::getGNEJunctionDest(), GNEEdge::getGNEJunctionSource(), NBNode::getIncomingEdges(), GNEJunction::getNBNode(), NBNode::getOutgoingEdges(), NBNode::getPosition(), GNEJunction::move(), myEdges, GNEUndoList::p_begin(), GNEUndoList::p_end(), GNEJunction::registerMove(), and remapEdge().

Referenced by GNEViewNet::mergeJunctions().

void GNENet::moveSelection ( const Position moveSrc,
const Position moveDest 
)

move all selected junctions and edges

Note
: inner points of an edge will only be modified if the edge and its endpoints are selected

Definition at line 1115 of file GNENet.cpp.

References GNEEdge::getGNEJunctionDest(), GNEEdge::getGNEJunctionSource(), GNEEdge::moveGeometry(), retrieveEdges(), and retrieveJunctions().

Referenced by GNEViewNet::onMouseMove().

GNEEdge * GNENet::registerEdge ( GNEEdge edge)
private
void GNENet::remapEdge ( GNEEdge oldEdge,
GNEJunction from,
GNEJunction to,
GNEUndoList undoList,
bool  keepEndpoints = false 
)
private
void GNENet::removeExplicitTurnaround ( std::string  id)

remove edge id from the list of explicit turnarounds

Definition at line 1109 of file GNENet.cpp.

References myExplicitTurnarounds.

Referenced by GNEEdge::removeConnection().

void GUIGlObject::removeParameterTable ( GUIParameterTableWindow w)
inherited

Lets this object know a parameter window showing the object's values was closed.

Parameters
[in]wThe closed parameter window

Definition at line 266 of file GUIGlObject.cpp.

References GUIGlObject::myParamWindows.

Referenced by GUIParameterTableWindow::~GUIParameterTableWindow().

bool GNENet::removeRestrictedLane ( SUMOVehicleClass  vclass,
GNEEdge edge,
GNEUndoList undoList 
)

remove restricted lane

Parameters
[in]vclassvehicle class to restrict
[in]edgethe edge in which remove sidewalk
[in]undoListThe undolist in which to mark changes

Definition at line 474 of file GNENet.cpp.

References deleteLane(), and GNEEdge::getLanes().

Referenced by GNEViewNet::removeRestrictedLane().

void GNENet::removeSolitaryJunctions ( GNEUndoList undoList)
void GNENet::renameEdge ( GNEEdge edge,
const std::string &  newID 
)

updates the map and reserves new id

Definition at line 1063 of file GNENet.cpp.

References NBNetBuilder::getEdgeCont(), Named::getID(), GNEEdge::getNBEdge(), myEdges, myNetBuilder, NBEdgeCont::rename(), and GNEEdge::setMicrosimID().

Referenced by GNEEdge::setAttribute().

void GNENet::renameJunction ( GNEJunction junction,
const std::string &  newID 
)
void GNENet::requireRecompute ( )

inform the net about the need for recomputation

Definition at line 963 of file GNENet.cpp.

References myNeedRecompute.

Referenced by changeEdgeEndpoints(), createEdge(), deleteConnection(), deleteEdge(), deleteLane(), duplicateLane(), GNEJunction::invalidateShape(), and GNEViewNet::onCmdToogleShowConnection().

void GNENet::reserveEdgeID ( const std::string &  id)
private

reserve edge ID (To avoid duplicates)

Definition at line 1384 of file GNENet.cpp.

References IDSupplier::avoid(), and myEdgeIDSupplier.

Referenced by createEdge().

void GNENet::reserveJunctionID ( const std::string &  id)
private

reserve junction ID (To avoid duplicates)

Definition at line 1390 of file GNENet.cpp.

References IDSupplier::avoid(), and myJunctionIDSupplier.

bool GNENet::restrictLane ( SUMOVehicleClass  vclass,
GNELane lane,
GNEUndoList undoList 
)

transform lane to restricted lane

Parameters
[in]vclassvehicle class to restrict
[in]laneThe lane to be trasformed
[in]undoListThe undolist in which to mark changes

Definition at line 414 of file GNENet.cpp.

References GNEEdge::getLanes(), GNELane::getParentEdge(), joinToString(), GNELane::setAttribute(), SUMO_ATTR_ALLOW, SUMO_ATTR_DISALLOW, SumoVehicleClassStrings, SVC_IGNORING, and toString().

Referenced by addSRestrictedLane(), and GNEViewNet::restrictLane().

std::vector< GNEAttributeCarrier * > GNENet::retrieveAttributeCarriers ( const std::set< GUIGlID > &  ids,
GUIGlObjectType  type 
)

get the attribute carriers based on GlIDs

Parameters
[in]idsThe set of ids for which to retrive the ACs
[in]typeThe GUI-type of the objects with the given ids
Exceptions
InvalidArgumentif any given id does not match the declared type

Definition at line 796 of file GNENet.cpp.

References GUIGlObject::getMicrosimID(), GUIGlObjectStorage::getObjectBlocking(), GUIGlObjectStorage::gIDStorage, GLO_ADDITIONAL, GLO_EDGE, GLO_JUNCTION, GLO_LANE, and GUIGlObjectStorage::unblockObject().

Referenced by GNEViewNet::onLeftBtnPress().

GNEJunction * GNENet::retrieveJunction ( const std::string &  id,
bool  failHard = true 
)

get junction by id

Parameters
[in]idThe id of the desired junction
[in]failHardWhether attempts to retrieve a nonexisting junction should result in an exception
Exceptions
UnknownElement

Definition at line 689 of file GNENet.cpp.

References myJunctions.

Referenced by changeEdgeEndpoints(), GNEEdge::getGNEJunctionDest(), GNEEdge::getGNEJunctionSource(), GNEJunction::invalidateTLS(), GNEJunction::isValid(), GNEEdge::isValid(), GNETLSEditorFrame::onCmdOK(), GNEJunction::setAttribute(), and GNEEdge::setAttribute().

std::vector< GNEJunction * > GNENet::retrieveJunctions ( bool  onlySelected = false)

return all junctions

Parameters
[in]onlySelectedWhether to return only selected junctions

Definition at line 764 of file GNENet.cpp.

References GLO_JUNCTION, gSelected, GUISelectedStorage::isSelected(), and myJunctions.

Referenced by GNEViewNet::deleteSelectedJunctions(), finishMoveSelection(), joinSelectedJunctions(), moveSelection(), and GNEConnectorFrame::onCmdSelectDeadStarts().

bool GNENet::revertLaneRestriction ( GNELane lane,
GNEUndoList undoList 
)

revert prevously restricted lane

Parameters
[in]laneThe lane to be unrestricted
[in]undoListThe undolist in which to mark changes

Definition at line 441 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().

void GNENet::save ( OptionsCont oc)

save the network

Parameters
[in]ocThe OptionsCont which knows how and where to save

Definition at line 643 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

Parameters
[in]filenamename of the file in wich save additionals

Definition at line 650 of file GNENet.cpp.

References OutputDevice::close(), OutputDevice::getDevice(), myAdditionals, and OutputDevice::openTag().

Referenced by GNEApplicationWindow::onCmdSaveAdditionals(), and GNEApplicationWindow::onCmdSaveAdditionalsAs().

void GNENet::saveJoined ( OptionsCont oc)

save log of joined junctions (and nothing else)

Parameters
[in]ocThe OptionsCont which knows how and where to save

Definition at line 676 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)

Parameters
[in]ocThe OptionsCont which knows how and where to save

Definition at line 669 of file GNENet.cpp.

References computeAndUpdate(), myNetBuilder, and NWWriter_XML::writeNetwork().

Referenced by GNEApplicationWindow::onCmdSaveAsPlainXML().

void GNENet::setAdditionalsFile ( const std::string &  additionalFile)

set additionals File

Note
used to load additionals throught command line

Definition at line 1175 of file GNENet.cpp.

References OptionsCont::getOptions(), and OptionsCont::set().

Referenced by GNELoadThread::run().

void GNENet::setAdditionalsOutputFile ( const std::string &  additionalOutputFile)

set additionals File

Note
used to set additionals output file throught command line

Definition at line 1181 of file GNENet.cpp.

References OptionsCont::getOptions(), and OptionsCont::set().

Referenced by GNELoadThread::run().

void GUIGlObject::setMicrosimID ( const std::string &  newID)
virtualinherited

Changes the microsimID of the object.

Note
happens in NETEDIT

Reimplemented in GNEEdge.

Definition at line 145 of file GUIGlObject.cpp.

References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myMicrosimID.

Referenced by renameJunction(), GNEAdditional::setAdditionalID(), GNELane::setIndex(), and GNEEdge::setMicrosimID().

void GUIGlObject::setPrefix ( const std::string &  prefix)
protectedinherited

usually names are prefixed by a type-specific string. this method can be used to change the default

Definition at line 275 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 683 of file GNENet.cpp.

References myViewNet.

GNEJunction * GNENet::splitEdge ( GNEEdge edge,
const Position pos,
GNEUndoList undoList,
GNEJunction newJunction = 0 
)
void GNENet::splitEdgesBidi ( const std::set< GNEEdge * > &  edges,
const Position pos,
GNEUndoList undoList 
)

split all edges at position by inserting one new junction

Parameters
[in]edgesThe edges to be split
[in]posThe position on which to insert the new junction

Definition at line 549 of file GNENet.cpp.

References GNEUndoList::p_begin(), GNEUndoList::p_end(), and splitEdge().

Referenced by GNEViewNet::onCmdSplitEdgeBidi().

void GNENet::updateAdditionalID ( const std::string &  oldID,
GNEAdditional additional 
)

update additional ID in container

Note
this function is automatically called when user changes the ID of an additional

Definition at line 1239 of file GNENet.cpp.

References GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTag(), and myAdditionals.

Referenced by GNEAdditional::setAdditionalID().

void GNENet::updateJunctionShapes ( )

update junction shapes

Definition at line 952 of file GNENet.cpp.

References myJunctions, and myViewNet.

Referenced by GNEViewNet::onCmdToogleShowBubbles(), and GNEViewNet::setEditMode().

Friends And Related Function Documentation

friend class GNEChange_Connection
friend

Definition at line 92 of file GNENet.h.

Referenced by deleteConnection(), and splitEdge().

friend class GNEChange_Edge
friend

Definition at line 91 of file GNENet.h.

Referenced by createEdge(), and deleteEdge().

friend class GNEChange_Junction
friend

declare friend class

Definition at line 90 of file GNENet.h.

Referenced by createJunction(), and deleteJunction().

Field Documentation

const GUIGlID GUIGlObject::INVALID_ID = 0
staticinherited
GNEAdditionals GNENet::myAdditionals
protected

map with the name and pointer to additional elements of net

Definition at line 505 of file GNENet.h.

Referenced by deleteAdditional(), getAdditional(), getAdditionalID(), getAdditionals(), getGlIDs(), getNumberOfAdditionals(), insertAdditional(), refreshAdditional(), saveAdditionals(), and updateAdditionalID().

IDSupplier GNENet::myEdgeIDSupplier
protected

Definition at line 509 of file GNENet.h.

Referenced by createEdge(), and reserveEdgeID().

std::set<std::string> GNENet::myExplicitTurnarounds
protected

list of edge ids for which turn-arounds must be added explicitly

Definition at line 517 of file GNENet.h.

Referenced by addExplicitTurnaround(), computeAndUpdate(), and removeExplicitTurnaround().

SUMORTree GNENet::myGrid
protected

the rtree which contains all GUIGlObjects (so named for historical reasons)

Definition at line 483 of file GNENet.h.

Referenced by deleteAdditional(), deleteSingleEdge(), deleteSingleJunction(), getBoundary(), getVisualisationSpeedUp(), GNENet(), insertAdditional(), refreshAdditional(), refreshElement(), registerEdge(), and registerJunction().

IDSupplier GNENet::myJunctionIDSupplier
protected

Definition at line 510 of file GNENet.h.

Referenced by createJunction(), and reserveJunctionID().

GNEJunctions GNENet::myJunctions
protected
bool GNENet::myNeedRecompute
protected

whether the net needs recomputation

Definition at line 520 of file GNENet.h.

Referenced by computeAndUpdate(), computeEverything(), and requireRecompute().

GUIShapeContainer GNENet::myShapeContainer
protected

the container for additional pois and polygons

Definition at line 514 of file GNENet.h.

Referenced by getShapeContainer().

GNEViewNet* GNENet::myViewNet
protected

The viewNet to be notofied of about changes.

Definition at line 486 of file GNENet.h.

Referenced by deleteConnection(), getApp(), getViewNet(), setViewNet(), update(), and updateJunctionShapes().

Boundary GNENet::myZBoundary
private

the z boundary (stored in the x-coordinate), values of 0 are ignored

Definition at line 564 of file GNENet.h.

Referenced by getZBoundary(), GNENet(), and registerJunction().

const RGBColor GNENet::selectedConnectionColor
static

color of selected connection

Definition at line 102 of file GNENet.h.

Referenced by GNEConnection::drawGL().

const RGBColor GNENet::selectedLaneColor
static

color of selected lane

Definition at line 99 of file GNENet.h.

Referenced by GNELane::drawGL().

const RGBColor GNENet::selectionColor
static

color of selection

Definition at line 96 of file GNENet.h.

Referenced by GNEViewNet::doPaintGL(), GNEEdge::drawGL(), GNELane::drawGL(), GNELane::drawMarkings(), and GNEJunction::setColor().

StringBijection< GUIGlObjectType > GUIGlObject::TypeNames
staticinherited

associates object types with strings

Definition at line 76 of file GUIGlObject.h.

const SUMOReal GNENet::Z_INITIALIZED = 1
staticprivate

marker for whether the z-boundary is initialized

Definition at line 567 of file GNENet.h.

Referenced by GNENet(), and registerJunction().


The documentation for this class was generated from the following files: