SUMO - Simulation of Urban MObility
GNEEdge Class Reference

A road/street connecting two junctions (netedit-version) More...

#include <GNEEdge.h>

Inheritance diagram for GNEEdge:
Inheritance graph
Collaboration diagram for GNEEdge:
Collaboration graph

Public Types

typedef std::vector< GNELane * > LaneVector
 Definition of the lane's positions vector. More...
 

Public Member Functions

void copyTemplate (GNEEdge *tpl, GNEUndoList *undolist)
 copy edge attributes from tpl More...
 
void decRef (const std::string &debugMsg="")
 
bool deleteGeometry (const Position &pos, GNEUndoList *undoList)
 deletes the closest geometry node within SNAP_RADIUS. 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
 
const std::vector< SumoXMLAttr > & getAttrs () const
 
Boundary getBoundary () const
 Returns the street's geometry. More...
 
virtual std::string getDescription ()
 how should this attribute carrier be called More...
 
GNEJunctiongetDest () const
 returns the destination-junction More...
 
const std::string getID () const
 function to support debugging More...
 
std::set< GUIGlIDgetLaneGlIDs ()
 
const LaneVectorgetLanes ()
 
NBEdgegetNBEdge ()
 returns the internal NBEdge More...
 
GNEJunctiongetSource () const
 returns the source-junction More...
 
Position getSplitPos (const Position &clickPos)
 
SumoXMLTag getTag () const
 
 GNEEdge (NBEdge &nbe, GNENet *net, bool wasSplit=false, bool loaded=false)
 Constructor. More...
 
void incRef (const std::string &debugMsg="")
 
Position moveGeometry (const Position &oldPos, const Position &newPos, bool relative=false)
 change the edge geometry without registering undo/redo It is up to the Edge to decide whether an new geometry node should be generated or an existing node should be moved More...
 
void moveGeometry (const Position &delta)
 change the edge geometry without registering undo/redo More...
 
template<>
int parse (const std::string &string)
 
template<>
SUMOReal parse (const std::string &string)
 
void resetEndpoint (const Position &pos, GNEUndoList *undoList)
 restores the endpoint to the junction position at the appropriate end More...
 
void setEndpoint (Position pos, GNEUndoList *undoList)
 makes pos the new geometry endpoint at the appropriate end More...
 
void setGeometry (PositionVector geom, bool inner)
 update edge geometry and inform the lanes More...
 
void setMicrosimID (const std::string &newID)
 override to also set lane ids More...
 
void setResponsible (bool newVal)
 set responsibility for deleting internal strctures More...
 
bool unreferenced ()
 
void updateJunctionPosition (GNEJunction *junction, const Position &origPos)
 update edge geometry after junction move More...
 
void updateLaneGeometries ()
 update edge geometry and inform the lanes let the lanes recompute their precomputed geometry information (needed after computing junction shapes) More...
 
bool wasSplit ()
 whether this edge was created from a split More...
 
 ~GNEEdge ()
 Destructor. More...
 
inherited from GUIGlObject
virtual GUIGLObjectPopupMenugetPopUpMenu (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own popup-menu. More...
 
virtual 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...
 
void drawGL (const GUIVisualizationSettings &s) const
 Draws the object. More...
 
std::string getAttribute (SumoXMLAttr key) const
 
void setAttribute (SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
 
bool isValid (SumoXMLAttr key, const std::string &value)
 
Atomar getter methods
const std::string & getFullName () const
 Returns the full name appearing in the tool tip. More...
 
virtual const std::string & getParentName () const
 Returns the name of the parent object (if any) More...
 
GUIGlID getGlID () const
 Returns the numerical id of the object. More...
 
interfaces to be implemented by derived classes
virtual GUIParameterTableWindowgetTypeParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own type parameter window (optional) More...
 
const std::string & getMicrosimID () const
 Returns the id of the object as known to microsim. More...
 
GUIGlObjectType getType () const
 Returns the type of the object as coded in GUIGlObjectType. More...
 
Parameter table window I/O
void addParameterTable (GUIParameterTableWindow *w)
 Lets this object know a parameter window showing the object's values was opened. More...
 
void removeParameterTable (GUIParameterTableWindow *w)
 Lets this object know a parameter window showing the object's values was closed. More...
 

Static Public Member Functions

static const std::vector< SumoXMLAttr > & allowedAttributes (SumoXMLTag tag)
 get all editable attributes for tag. More...
 
static const std::vector< SumoXMLTag > & allowedTags ()
 get all editable attributes for tag. More...
 
template<typename T >
static bool canParse (const std::string &string)
 true if a number of type T can be parsed from string More...
 
static bool changeGeometry (PositionVector &geom, const std::string &id, const Position &oldPos, const Position &newPos, bool relative=false, bool moveEndPoints=false)
 
static const std::vector< std::string > & discreteChoices (SumoXMLTag tag, SumoXMLAttr attr)
 return a list of discrete choices for this attribute or an empty vector More...
 
static bool discreteCombinableChoices (SumoXMLTag tag, SumoXMLAttr attr)
 return whether the given attribute allows for a combination of discrete values More...
 
static bool isNumerical (SumoXMLAttr attr)
 whether an attribute is numerical More...
 
template<typename T >
static bool isPositive (const std::string &string)
 true if a positive number of type T can be parsed from string More...
 
static bool isUnique (SumoXMLAttr attr)
 whether an attribute is unique (may not be edited for a multi-selection) More...
 
static bool isValidID (const std::string &value)
 true if value is a valid sumo ID More...
 
template<typename T >
static T parse (const std::string &string)
 parses a number of type T from string More...
 

Static Public Attributes

static const std::string APPROVED = "approved"
 feature has been approved but not changed (i.e. after being reguessed) More...
 
static const std::string GUESSED = "guessed"
 feature has been reguessed (may still be unchanged be we can't tell (yet) More...
 
static const std::string LOADED = "loaded"
 feature is still unchanged after being loaded (implies approval) More...
 
static const std::string MODIFIED = "modified"
 feature has been manually modified (implies approval) More...
 
static const SUMOReal SNAP_RADIUS = SUMO_const_halfLaneWidth
 
static StringBijection< GUIGlObjectTypeTypeNames
 associates object types with strings More...
 

Protected Member Functions

void setPrefix (const std::string &prefix)
 
helper methods for building popup-menus
void buildPopupHeader (GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
 Builds the header. More...
 
void buildCenterPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to center to the object. More...
 
void buildNameCopyPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds entries which allow to copy the name / typed name into the clipboard. More...
 
void buildSelectionPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to (de)select the object. More...
 
void buildShowParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the parameter window. More...
 
void buildShowTypeParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the type parameter window. More...
 
void buildPositionCopyEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position. More...
 
void buildShowManipulatorPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the manipulator window. More...
 

Private Member Functions

void addConnection (unsigned int fromLane, const std::string &toEdgeID, unsigned int toLane, bool mayPass)
 adds a connection More...
 
void addLane (GNELane *lane, const NBEdge::Lane &laneAttrs)
 increase number of lanes by one use the given attributes and restore the GNELane More...
 
 GNEEdge (const GNEEdge &s)
 invalidated copy constructor More...
 
GNEEdgeoperator= (const GNEEdge &s)
 invalidated assignment operator More...
 
void removeConnection (unsigned int fromLane, const std::string &toEdgeID, unsigned int toLane)
 removes a connection More...
 
void removeLane (GNELane *lane)
 
void setAttribute (SumoXMLAttr key, const std::string &value)
 
void setNumLanes (unsigned int numLanes, GNEUndoList *undoList)
 changes the number of lanes. When reducing the number of lanes, higher-numbered lanes are removed first. When increasing the number of lanes, the last known attributes for a lane with this number are restored. If none are found the attributes for the leftmost lane are copied More...
 

Private Attributes

bool myAmResponsible
 whether we are responsible for deleting myNBNode More...
 
std::string myConnectionStatus
 modification status of the connections More...
 
LaneVector myLanes
 List of this edges lanes. More...
 
NBEdgemyNBEdge
 the underlying NBEdge More...
 
GNENetmyNet
 
PositionVector myOrigShape
 restore point for undo More...
 
bool myWasSplit
 whether this edge was created from a split More...
 

Friends

class GNEChange_Connection
 
class GNEChange_Lane
 

Detailed Description

A road/street connecting two junctions (netedit-version)

See also
MSEdge

Definition at line 61 of file GNEEdge.h.

Member Typedef Documentation

typedef std::vector<GNELane*> GNEEdge::LaneVector

Definition of the lane's positions vector.

Definition at line 68 of file GNEEdge.h.

Constructor & Destructor Documentation

GNEEdge::GNEEdge ( NBEdge nbe,
GNENet net,
bool  wasSplit = false,
bool  loaded = false 
)

Constructor.

Parameters
[in]nbeThe represented edge
[in]netThe net to inform about gui updates
[in]loadedWhether the edge was loaded from a file

Definition at line 65 of file GNEEdge.cpp.

References NBEdge::getNumLanes(), myLanes, and myNBEdge.

GNEEdge::~GNEEdge ( )

Destructor.

Definition at line 84 of file GNEEdge.cpp.

References myAmResponsible, myLanes, and myNBEdge.

GNEEdge::GNEEdge ( const GNEEdge s)
private

invalidated copy constructor

Member Function Documentation

void GNEEdge::addConnection ( unsigned int  fromLane,
const std::string &  toEdgeID,
unsigned int  toLane,
bool  mayPass 
)
private
void GUIGlObject::addParameterTable ( GUIParameterTableWindow w)
inherited

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

Parameters
[in]wThe opened parameter window

Definition at line 198 of file GUIGlObject.cpp.

References GUIGlObject::myParamWindows.

const std::vector< SumoXMLTag > & GNEAttributeCarrier::allowedTags ( )
staticinherited
void GUIGlObject::buildShowManipulatorPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to open the manipulator window.

Parameters

Definition at line 189 of file GUIGlObject.cpp.

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

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

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

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

Parameters

Definition at line 168 of file GUIGlObject.cpp.

References GUIIconSubSys::getIcon(), ICON_APP_TABLE, and MID_SHOWTYPEPARS.

Referenced by GUIBaseVehicle::getPopUpMenu().

template<typename T >
static bool GNEAttributeCarrier::canParse ( const std::string &  string)
inlinestaticinherited

true if a number of type T can be parsed from string

Definition at line 121 of file GNEAttributeCarrier.h.

References GNEAttributeCarrier::parse().

bool GNEEdge::changeGeometry ( PositionVector geom,
const std::string &  id,
const Position oldPos,
const Position newPos,
bool  relative = false,
bool  moveEndPoints = false 
)
static
bool GNEEdge::deleteGeometry ( const Position pos,
GNEUndoList undoList 
)

deletes the closest geometry node within SNAP_RADIUS.

Returns
true if a node was deleted

Definition at line 297 of file GNEEdge.cpp.

References NBEdge::getInnerGeometry(), PositionVector::indexOfClosest(), myNBEdge, setAttribute(), SNAP_RADIUS, SUMO_ATTR_SHAPE, and toString().

Referenced by GNENet::deleteGeometryOrEdge(), getNBEdge(), and setEndpoint().

bool GNEAttributeCarrier::discreteCombinableChoices ( SumoXMLTag  tag,
SumoXMLAttr  attr 
)
staticinherited

return whether the given attribute allows for a combination of discrete values

Definition at line 236 of file GNEAttributeCarrier.cpp.

References SUMO_ATTR_ALLOW, and SUMO_ATTR_DISALLOW.

Referenced by GNEInspector::AttrInput::AttrInput(), and GNEAttributeCarrier::getID().

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

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 203 of file GUIGlObject.h.

References SUMOReal, and UNUSED_PARAMETER.

const std::vector<SumoXMLAttr>& GNEAttributeCarrier::getAttrs ( ) const
inlineinherited
Boundary GNEEdge::getBoundary ( ) const

Returns the street's geometry.

Definition at line 98 of file GNEEdge.cpp.

References Boundary::add(), Boundary::grow(), and myLanes.

Referenced by getCenteringBoundary(), and GNENet::registerEdge().

Boundary GNEEdge::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 121 of file GNEEdge.cpp.

References getBoundary(), and Boundary::grow().

virtual std::string GNEAttributeCarrier::getDescription ( )
inlinevirtualinherited

how should this attribute carrier be called

Definition at line 84 of file GNEAttributeCarrier.h.

References GNEAttributeCarrier::myTag, and toString().

Referenced by GNEChange_Attribute::redoName(), and GNEChange_Attribute::undoName().

GUIGlID GUIGlObject::getGlID ( ) const
inlineinherited

Returns the numerical id of the object.

Returns
This object's gl-id

Definition at line 123 of file GUIGlObject.h.

Referenced by GNENet::addReversedEdge(), GUIMessageWindow::appendMsg(), GUIGlObject::buildSelectionPopupEntry(), GUINet::createTLWrapper(), GNENet::deleteEdge(), GNENet::deleteJunction(), GNENet::deleteLane(), GUIMEInductLoop::MyWrapper::drawGL(), GNEInternalLane::drawGL(), GNECrossing::drawGL(), GUIContainer::drawGL(), GUIPerson::drawGL(), GUIPolygon::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GUIPointOfInterest::drawGL(), GNEJunction::drawGL(), GUIJunctionWrapper::drawGL(), drawGL(), GUIE3Collector::MyWrapper::drawGL(), GNELane::drawGL(), GUI_E2_ZS_Collector::MyWrapper::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GUIChargingStation::drawGL(), GNEPoly::drawGL(), GUIEdge::drawGL(), GUIBaseVehicle::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GUIContainer::drawGLAdditional(), GUIPerson::drawGLAdditional(), GUIBaseVehicle::drawGLAdditional(), GUILane::drawLinkRule(), GUIMEVehicle::getColorValue(), GUIVehicle::getColorValue(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GUIContainer::getColorValue(), GNELane::getColorValue(), GUIPerson::getColorValue(), GUILane::getColorValue(), GNEJunction::getColorValue(), GUIEdge::getIDs(), getLaneGlIDs(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIPerson::getPopUpMenu(), GNELane::getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), GUIEdge::getScaleValue(), GUILane::getScaleValue(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), GNESelector::handleIDs(), GNETLSEditor::handleMultiChange(), GUIGlChildWindow::isSelected(), GNEViewParent::isSelected(), GUISUMOViewParent::isSelected(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUIViewTraffic::onCmdAddRerouter(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCenter(), GUIViewTraffic::onCmdCloseEdge(), GUIViewTraffic::onCmdCloseLane(), GNEViewNet::onCmdDuplicateLane(), GUIApplicationWindow::onCmdEditChosen(), GUIGLObjectPopupMenu::onCmdRemoveSelected(), GNEConnector::onCmdSelectDeadStarts(), GNEConnector::onCmdSelectPass(), GUIPerson::GUIPersonPopupMenu::onCmdStartTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStartTrack(), GNEViewNet::onCmdStraightenEdges(), GNEViewNet::onLeftBtnPress(), GUISUMOAbstractView::removeAdditionalGLVisualisation(), GLObjectValuePassConnector< std::pair< SUMOTime, MSPhaseDefinition > >::removeObject(), GUIVehicle::selectBlockingFoes(), GNEJunction::setColor(), GUIMessageWindow::setCursorPos(), and GUIGlObject::~GUIGlObject().

std::set< GUIGlID > GNEEdge::getLaneGlIDs ( )

returns GLIDs of all lanes

Definition at line 391 of file GNEEdge.cpp.

References GUIGlObject::getGlID(), and myLanes.

Referenced by GNEViewParent::isSelected(), GNEConnector::onCmdSelectDeadStarts(), and setResponsible().

const LaneVector& GNEEdge::getLanes ( )
inline
GUIParameterTableWindow * GNEEdge::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 194 of file GNEEdge.cpp.

References UNUSED_PARAMETER.

virtual const std::string& GUIGlObject::getParentName ( ) const
inlinevirtualinherited

Returns the name of the parent object (if any)

Returns
This object's parent id

Reimplemented in GUILane, and GNELane.

Definition at line 115 of file GUIGlObject.h.

References StringUtils::emptyString.

Referenced by GUIGLObjectPopupMenu::onCmdCopyEdgeName().

GUIGLObjectPopupMenu * GNEEdge::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 109 of file GNEEdge.cpp.

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

SumoXMLTag GNEAttributeCarrier::getTag ( ) const
inlineinherited

Definition at line 88 of file GNEAttributeCarrier.h.

References GNEAttributeCarrier::myTag.

Referenced by GNESelector::getMatches().

GUIGlObjectType GUIGlObject::getType ( ) const
inlineinherited

Returns the type of the object as coded in GUIGlObjectType.

Returns
The type of the object
See also
GUIGlObjectType

Definition at line 180 of file GUIGlObject.h.

Referenced by GUIGlObject::buildSelectionPopupEntry(), GUIVehicle::drawAction_drawRailCarriages(), GUIPerson::drawAction_drawWalkingareaPath(), GUIMEInductLoop::MyWrapper::drawGL(), GUIContainer::drawGL(), GUIPerson::drawGL(), GUILaneSpeedTrigger::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUICalibrator::drawGL(), GNEJunction::drawGL(), GUIJunctionWrapper::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GNELane::drawGL(), GUI_E2_ZS_Collector::MyWrapper::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GUIChargingStation::drawGL(), GUIBaseVehicle::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GUIPerson::drawGLAdditional(), GUIBaseVehicle::drawGLAdditional(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GNELane::getColorValue(), GUILane::getColorValue(), GNEJunction::getColorValue(), GNEViewNet::getEdgeAtCursorPosition(), GNEViewNet::getEdgesAtCursorPosition(), GNEViewNet::getJunctionAtCursorPosition(), GNEViewNet::getLaneAtCurserPosition(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIEdge::getScaleValue(), GUILane::getScaleValue(), GNESelector::handleIDs(), GUIGlChildWindow::isSelected(), GNEViewParent::isSelected(), GUISUMOViewParent::isSelected(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdBegin2TrackPhases(), GNEConnector::onCmdClearSelectedConnections(), GUIGLObjectPopupMenu::onCmdCopyEdgeName(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideAllRoutes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideBestLanes(), GUIPerson::GUIPersonPopupMenu::onCmdHideCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideLFLinkItems(), GUIPerson::GUIPersonPopupMenu::onCmdHideWalkingareaPath(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowAllRoutes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowBestLanes(), GUIPerson::GUIPersonPopupMenu::onCmdShowCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowFoes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowLFLinkItems(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdShowPhases(), GUIPerson::GUIPersonPopupMenu::onCmdShowWalkingareaPath(), GUIPerson::GUIPersonPopupMenu::onCmdStartTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStartTrack(), GUIPerson::GUIPersonPopupMenu::onCmdStopTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStopTrack(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLS2Off(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLSLogic(), GNEViewNet::onLeftBtnPress(), LayeredRTree::selectLayer(), GNEJunction::setColor(), and GUISelectedStorage::toggleSelection().

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

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, GUIMEVehicle, and GUIBaseVehicle.

Definition at line 156 of file GUIGlObject.h.

References UNUSED_PARAMETER.

Referenced by GUIGLObjectPopupMenu::onCmdShowTypePars().

void GNEReferenceCounter::incRef ( const std::string &  debugMsg = "")
inlineinherited
template<typename T >
static bool GNEAttributeCarrier::isPositive ( const std::string &  string)
inlinestaticinherited

true if a positive number of type T can be parsed from string

Definition at line 138 of file GNEAttributeCarrier.h.

References GNEAttributeCarrier::isValidID().

bool GNEAttributeCarrier::isUnique ( SumoXMLAttr  attr)
staticinherited

whether an attribute is unique (may not be edited for a multi-selection)

Definition at line 186 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::_uniqueAttrs, SUMO_ATTR_EDGES, SUMO_ATTR_FROM, SUMO_ATTR_ID, SUMO_ATTR_POSITION, SUMO_ATTR_SHAPE, and SUMO_ATTR_TO.

Referenced by GNEInspector::AttrPanel::AttrPanel(), and GNEAttributeCarrier::getID().

bool GNEAttributeCarrier::isValidID ( const std::string &  value)
staticinherited

true if value is a valid sumo ID

Definition at line 70 of file GNEAttributeCarrier.cpp.

Referenced by GNEAttributeCarrier::isPositive(), GNEJunction::isValid(), and isValid().

Position GNEEdge::moveGeometry ( const Position oldPos,
const Position newPos,
bool  relative = false 
)

change the edge geometry without registering undo/redo It is up to the Edge to decide whether an new geometry node should be generated or an existing node should be moved

Parameters
[in]oldPosThe origin of the mouse movement
[in]newPosThe destination of the mouse movenent
[in]relativeWhether newPos is absolute or relative
Returns
newPos if something was moved, oldPos if nothing was moved

Definition at line 231 of file GNEEdge.cpp.

References changeGeometry(), NBEdge::getGeometry(), GUIGlObject::getMicrosimID(), myNBEdge, and setGeometry().

Referenced by getNBEdge(), GNENet::moveSelection(), and GNEViewNet::onMouseMove().

void GNEEdge::moveGeometry ( const Position delta)

change the edge geometry without registering undo/redo

Parameters
[in]deltaAll inner points are moved by adding delta

Definition at line 286 of file GNEEdge.cpp.

References PositionVector::add(), NBEdge::getInnerGeometry(), myNBEdge, setGeometry(), Position::x(), Position::y(), and Position::z().

GNEEdge& GNEEdge::operator= ( const GNEEdge s)
private

invalidated assignment operator

template<>
int GNEAttributeCarrier::parse ( const std::string &  string)
inherited

Definition at line 76 of file GNEAttributeCarrier.cpp.

References TplConvert::_str2int(), and SUMOReal.

template<>
SUMOReal GNEAttributeCarrier::parse ( const std::string &  string)
inherited

Definition at line 82 of file GNEAttributeCarrier.cpp.

References TplConvert::_str2SUMOReal().

template<typename T >
static T GNEAttributeCarrier::parse ( const std::string &  string)
staticinherited

parses a number of type T from string

Referenced by GNEAttributeCarrier::canParse().

void GNEEdge::removeConnection ( unsigned int  fromLane,
const std::string &  toEdgeID,
unsigned int  toLane 
)
private
void GNEEdge::removeLane ( GNELane lane)
private
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 204 of file GUIGlObject.cpp.

References GUIGlObject::myParamWindows.

Referenced by GUIParameterTableWindow::~GUIParameterTableWindow().

void GNEEdge::resetEndpoint ( const Position pos,
GNEUndoList undoList 
)
void GNEEdge::setGeometry ( PositionVector  geom,
bool  inner 
)

update edge geometry and inform the lanes

Parameters
[in]geomThe new geometry
[in]innerWhether geom is only the inner points

Definition at line 351 of file GNEEdge.cpp.

References getDest(), getSource(), GNEJunction::invalidateShape(), myNBEdge, myNet, GNENet::refreshElement(), NBEdge::setGeometry(), and updateLaneGeometries().

Referenced by moveGeometry(), setAttribute(), setResponsible(), and updateJunctionPosition().

void GNEEdge::setMicrosimID ( const std::string &  newID)
virtual

override to also set lane ids

Reimplemented from GUIGlObject.

Definition at line 770 of file GNEEdge.cpp.

References getNBEdge(), myLanes, and GUIGlObject::setMicrosimID().

Referenced by GNENet::renameEdge(), and wasSplit().

void GNEEdge::setNumLanes ( unsigned int  numLanes,
GNEUndoList undoList 
)
private

changes the number of lanes. When reducing the number of lanes, higher-numbered lanes are removed first. When increasing the number of lanes, the last known attributes for a lane with this number are restored. If none are found the attributes for the leftmost lane are copied

Definition at line 674 of file GNEEdge.cpp.

References getDest(), NBEdge::getLaneStruct(), getSource(), GNEChange_Lane, myLanes, myNBEdge, GNEUndoList::p_begin(), GNEUndoList::p_end(), and GNEJunction::setLogicValid().

Referenced by setAttribute().

void GUIGlObject::setPrefix ( const std::string &  prefix)
protectedinherited
void GNEEdge::setResponsible ( bool  newVal)
inline

set responsibility for deleting internal strctures

Definition at line 193 of file GNEEdge.h.

References copyTemplate(), getLaneGlIDs(), myAmResponsible, setGeometry(), and updateLaneGeometries().

Referenced by GNENet::deleteSingleEdge(), and GNENet::registerEdge().

void GNEEdge::updateJunctionPosition ( GNEJunction junction,
const Position origPos 
)

update edge geometry after junction move

Definition at line 203 of file GNEEdge.cpp.

References PositionVector::add(), NBEdge::getGeometry(), GNEJunction::getNBNode(), NBNode::getPosition(), getSource(), myNBEdge, and setGeometry().

Referenced by GNEJunction::move().

void GNEEdge::updateLaneGeometries ( )

update edge geometry and inform the lanes let the lanes recompute their precomputed geometry information (needed after computing junction shapes)

Definition at line 361 of file GNEEdge.cpp.

References myLanes.

Referenced by setGeometry(), and setResponsible().

bool GNEEdge::wasSplit ( )
inline

whether this edge was created from a split

Definition at line 224 of file GNEEdge.h.

References getSplitPos(), myWasSplit, and setMicrosimID().

Referenced by GNENet::splitEdge().

Friends And Related Function Documentation

friend class GNEChange_Connection
friend

Definition at line 64 of file GNEEdge.h.

friend class GNEChange_Lane
friend

Definition at line 63 of file GNEEdge.h.

Referenced by setNumLanes().

Field Documentation

const std::string GNEAttributeCarrier::APPROVED = "approved"
staticinherited

feature has been approved but not changed (i.e. after being reguessed)

Definition at line 152 of file GNEAttributeCarrier.h.

const std::string GNEAttributeCarrier::GUESSED = "guessed"
staticinherited

feature has been reguessed (may still be unchanged be we can't tell (yet)

Definition at line 148 of file GNEAttributeCarrier.h.

Referenced by setAttribute(), and GNEJunction::setResponsible().

const std::string GNEAttributeCarrier::LOADED = "loaded"
staticinherited

feature is still unchanged after being loaded (implies approval)

Definition at line 146 of file GNEAttributeCarrier.h.

const std::string GNEAttributeCarrier::MODIFIED = "modified"
staticinherited

feature has been manually modified (implies approval)

Definition at line 150 of file GNEAttributeCarrier.h.

Referenced by GNEConnector::onCmdClearSelectedConnections(), and setAttribute().

bool GNEEdge::myAmResponsible
private

whether we are responsible for deleting myNBNode

Definition at line 252 of file GNEEdge.h.

Referenced by setResponsible(), and ~GNEEdge().

std::string GNEEdge::myConnectionStatus
private

modification status of the connections

Definition at line 258 of file GNEEdge.h.

Referenced by getAttribute(), and setAttribute().

LaneVector GNEEdge::myLanes
private
GNENet* GNEEdge::myNet
private
PositionVector GNEEdge::myOrigShape
private

restore point for undo

Definition at line 243 of file GNEEdge.h.

Referenced by setAttribute().

bool GNEEdge::myWasSplit
private

whether this edge was created from a split

Definition at line 255 of file GNEEdge.h.

Referenced by wasSplit().

const SUMOReal GNEEdge::SNAP_RADIUS = SUMO_const_halfLaneWidth
static

Definition at line 236 of file GNEEdge.h.

Referenced by changeGeometry(), deleteGeometry(), drawGL(), getSplitPos(), and setEndpoint().

StringBijection< GUIGlObjectType > GUIGlObject::TypeNames
staticinherited

associates object types with strings

Definition at line 100 of file GUIGlObject.h.


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