40 GNENetworkElement(createEdgeFrame->getViewNet()->getNet(),
"",
GLO_EDGE,
SUMO_TAG_TYPE, {}, {}, {}, {}, {}, {}, {}, {}) {
47 GNENetworkElement(edgeType->getNet(), edgeType->getID(),
GLO_EDGE,
SUMO_TAG_TYPE, {}, {}, {}, {}, {}, {}, {}, {}),
54 GNENetworkElement(net, net->getAttributeCarriers()->generateEdgeTypeID(),
GLO_EDGE,
SUMO_TAG_TYPE, {}, {}, {}, {}, {}, {}, {}, {}) {
57 myLaneTypes.push_back(laneType);
62 GNENetworkElement(net, ID,
GLO_EDGE,
SUMO_TAG_TYPE, {}, {}, {}, {}, {}, {}, {}, {}) {
64 for (
const auto& laneTypeDef : edgeType->laneTypeDefinitions) {
66 myLaneTypes.push_back(laneType);
69 speed = edgeType->speed;
70 priority = edgeType->priority;
71 permissions = edgeType->permissions;
72 spreadType = edgeType->spreadType;
73 oneWay = edgeType->oneWay;
74 discard = edgeType->discard;
75 width = edgeType->width;
76 widthResolution = edgeType->widthResolution;
77 maxWidth = edgeType->maxWidth;
78 minWidth = edgeType->minWidth;
79 sidewalkWidth = edgeType->sidewalkWidth;
80 bikeLaneWidth = edgeType->bikeLaneWidth;
81 restrictions = edgeType->restrictions;
82 attrs = edgeType->attrs;
83 laneTypeDefinitions = edgeType->laneTypeDefinitions;
123 const std::vector<GNELaneType*>&
131 for (
int i = 0; i < (int)
myLaneTypes.size(); i++) {
214 if (
attrs.count(key) == 0) {
238 if (
attrs.count(key) == 0) {
244 if (
attrs.count(key) == 0) {
285 return canParse<int>(value) && (parse<double>(value) > 0);
290 return canParse<double>(value) && (parse<double>(value) > 0);
302 if (value.empty() || (value ==
"-1")) {
305 return canParse<double>(value);
308 return canParse<int>(value);
329 const std::map<std::string, std::string>&
349 const int numLanes = parse<int>(value);
366 speed = parse<double>(value);
415 width = parse<double>(value);
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)
const std::string & getTagStr() const
get tag assigned to this object in string format
GNENet * myNet
pointer to net
void updateIDinComboBox(const std::string &oldID, const std::string &newID)
update id in comboBox
void refreshLaneTypeSelector()
refresh LaneTypeSelector
EdgeTypeSelector * getEdgeTypeSelector() const
get edgeType selector
GNEFrameAttributeModules::AttributesCreator * 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)
Position getPositionInView() const
Returns position of hierarchical element in view.
int getLaneTypeIndex(const GNELaneType *laneType) const
get laneType index
bool isValid(SumoXMLAttr key, const std::string &value)
GNEMoveOperation * getMoveOperation()
get move operation
void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList)
remove geometry point in the clicked position
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
const std::map< std::string, std::string > & getACParametersMap() const
get parameters map
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
bool isAttributeComputed(SumoXMLAttr key) const
const std::vector< GNELaneType * > & getLaneTypes() const
get laneTypes
void addLaneType(GNELaneType *laneType)
add laneType
~GNEEdgeType()
Destructor.
std::string getAttribute(SumoXMLAttr key) const
void updateGeometry()
update pre-computed geometry information
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration asociated with this GLObject
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
void refreshAttributesCreator()
refresh attribute creator
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.
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
GNEViewNet * getViewNet() const
get view net
const std::string & getID() const
get ID
GNEViewParent * getViewParent() const
get the net object
GNECreateEdgeFrame * getCreateEdgeFrame() const
get frame for NETWORK_CREATEEDGE
Stores the information about how to visualize structures.
static const double UNSPECIFIED_WIDTH
unspecified lane width
A storage for options typed value containers)
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
static OptionsCont & getOptions()
Retrieves the options.
An upper class for objects with additional parameters.
static bool areParametersValid(const std::string &value, bool report=false, const std::string kvsep="=", const std::string sep="|")
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
void setParametersStr(const std::string ¶msString, const std::string kvsep="=", const std::string sep="|")
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
std::string getParametersStr(const std::string kvsep="=", const std::string sep="|") const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
const std::map< std::string, std::string > & 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
bool hasString(const std::string &str) const
const std::string & getString(const T key) const
T get(const std::string &str) const
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.
bool discard
Whether edges of this edgeType shall be discarded.