120const std::vector<GNELaneType*>&
128 for (
int i = 0; i < (int)
myLaneTypes.size(); i++) {
271 if (
attrs.count(key) == 0) {
272 return toString(neteditOptions.getFloat(
"default.speed"));
277 if (
attrs.count(key) == 0) {
278 return toString(neteditOptions.getFloat(
"default.friction"));
301 if (
attrs.count(key) != 0) {
307 if (
attrs.count(key) != 0) {
324 if (
attrs.count(key) != 0) {
330 if (
attrs.count(key) != 0) {
359 return canParse<int>(value) && (parse<double>(value) > 0);
364 return canParse<double>(value) && (parse<double>(value) > 0);
378 if (value.empty() || (value ==
"-1") || (value ==
"default")) {
381 return canParse<double>(value);
384 return canParse<int>(value);
396 if (edgeTypeSelector->useDefaultEdgeTypeShort() || edgeTypeSelector->useDefaultEdgeType()) {
402 if (edgeTypeSelector->useDefaultEdgeTypeShort() || edgeTypeSelector->useDefaultEdgeType()) {
403 return edgeTypeSelector->isAddBikelaneEnabled();
433 const int numLanes = parse<int>(value);
450 speed = parse<double>(value);
511 if (value.empty() || (value ==
"-1") || (value ==
"default")) {
515 width = parse<double>(value);
519 if (value.empty() || (value ==
"-1") || (value ==
"default")) {
527 if (value.empty() || (value ==
"-1") || (value ==
"default")) {
const SVCPermissions SVCAll
all VClasses are allowed
SVCPermissions invertPermissions(SVCPermissions permissions)
negate the given permissions and ensure that only relevant bits are set
const std::string & getVehicleClassNames(SVCPermissions permissions, bool expand)
Returns the ids of the given classes, divided using a ' '.
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
bool canParseVehicleClasses(const std::string &classes)
Checks whether the given string contains only known vehicle classes.
@ SUMO_TAG_TYPE
type (edge)
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_WIDTHRESOLUTION
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
@ SUMO_ATTR_SPREADTYPE
The information about how to spread the lanes from the given position.
@ SUMO_ATTR_BIKELANEWIDTH
@ SUMO_ATTR_SIDEWALKWIDTH
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
const std::string getID() const
get ID (all Attribute Carriers have one)
std::string getCommonAttribute(const Parameterised *parameterised, SumoXMLAttr key) const
void setCommonAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
const std::string & getTagStr() const
get tag assigned to this object in string format
GNENet * myNet
pointer to net
bool isCommonValid(SumoXMLAttr key, const std::string &value) const
void refreshAttributesEditor()
refresh attribute editor
Boundary getContourBoundary() const
get contour boundary
void updateIDinComboBox(const std::string &oldID, const std::string &newID)
update id in comboBox
bool isAddSidewalkEnabled() const
check if add sidewalk check button is enabled
void refreshLaneTypeSelector()
refresh LaneTypeSelector
EdgeTypeSelector * getEdgeTypeSelector() const
get edgeType selector
GNEAttributesEditor * getEdgeTypeAttributes() const
get edgeType attributes
LaneTypeSelector * getLaneTypeSelector()
get lane type selector
std::string getAttribute(SumoXMLAttr key) const
const std::vector< GNELaneTemplate * > & getLaneTemplates() const
get vector with the lane templates of this edge
bool isAttributeEnabled(SumoXMLAttr key) const
std::vector< GNELaneType * > myLaneTypes
vector with laneTypes
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
GNEEdgeType(GNECreateEdgeFrame *createEdgeFrame)
Constructor for default edge (empty ID)
bool checkDrawFromContour() const
check if draw from contour (green)
bool checkDrawDeleteContour() const
check if draw delete contour (pink/white)
bool checkDrawMoveContour() const
check if draw move contour (red)
bool checkDrawRelatedContour() const
check if draw related contour (cyan)
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Position getPositionInView() const
Returns position of hierarchical element in view.
const Parameterised::Map & getACParametersMap() const
get parameters map
int getLaneTypeIndex(const GNELaneType *laneType) const
get laneType index
bool isValid(SumoXMLAttr key, const std::string &value)
void deleteGLObject()
delete element
PositionVector getAttributePositionVector(SumoXMLAttr key) const
bool checkDrawSelectContour() const
check if draw select contour (blue)
GNEMoveOperation * getMoveOperation()
get move operation
bool checkDrawToContour() const
check if draw from contour (magenta)
void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList)
remove geometry point in the clicked position
bool checkDrawOverContour() const
check if draw over contour (orange)
bool checkDrawDeleteContourSmall() const
check if draw delete contour small (pink/white)
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void removeLaneType(const int index)
remove laneType
void copyTemplate(const GNEEdgeTemplate *edgeTemplate)
copy edge template
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
const std::vector< GNELaneType * > & getLaneTypes() const
get laneTypes
void addLaneType(GNELaneType *laneType)
add laneType
void updateGLObject()
update GLObject (geometry, ID, etc.)
~GNEEdgeType()
Destructor.
std::string getAttribute(SumoXMLAttr key) const
void updateGeometry()
update pre-computed geometry information
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
GNEEdgeType * retrieveEdgeType(const std::string &id, bool hardFail=true) const
get edge type by id
void updateEdgeTypeID(GNEEdgeType *edgeType, const std::string &newID)
update edgeType ID in container
A NBNetBuilder extended by visualisation and editing capabilities.
void deleteNetworkElement(GNENetworkElement *networkElement, GNEUndoList *undoList)
delete network element
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
GNEViewNet * getViewNet() const
get view net
GNEContour myNetworkElementContour
network element contour
GNEViewParent * getViewParent() const
get the net object
GNEUndoList * getUndoList() const
get the undoList object
GNECreateEdgeFrame * getCreateEdgeFrame() const
get frame for NETWORK_CREATEEDGE
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
Stores the information about how to visualize structures.
A storage for available edgeTypes of edges.
static OptionsCont & getOptions()
Retrieves the options.
An upper class for objects with additional parameters.
std::map< std::string, std::string > Map
parameters map
const Parameterised::Map & getParametersMap() const
Returns the inner key/value map.
A point in 2D or 3D with translation and scaling methods.
static StringBijection< LaneSpreadFunction > LaneSpreadFunctions
lane spread functions
static bool isValidNetID(const std::string &value)
whether the given string is a valid id for a network element
const std::string & getString(const T key) const
get string
bool hasString(const std::string &str) const
check if the given string exist
T get(const std::string &str) const
get key
int priority
The priority of an edge.
double width
The width of lanes of edges of this edgeType [m].
double minWidth
The minimum width for lanes of this edgeType [m].
double speed
The maximal velocity on an edge in m/s.
LaneSpreadFunction spreadType
lane spread type
SVCPermissions permissions
List of vehicle edgeTypes that are allowed on this edge.
double maxWidth
The maximum width for lanes of this edgeType [m].
double widthResolution
The resolution for interpreting custom (noisy) lane widths of this edgeType [m].
bool oneWay
Whether one-way traffic is mostly common for this edgeType (mostly unused)
std::set< SumoXMLAttr > attrs
The attributes which have been set.
double friction
The default friction on an edge.
std::map< SUMOVehicleClass, double > restrictions
The vehicle class specific speed restrictions.
std::vector< LaneTypeDefinition > laneTypeDefinitions
vector with LaneTypeDefinitions
bool discard
Whether edges of this edgeType shall be discarded.