62 GNELaneType* laneType = new GNELaneType(this, laneTypeDef);
63 myLaneTypes.push_back(laneType);
138const std::vector<GNELaneType*>&
146 for (
int i = 0; i < (int)
myLaneTypes.size(); i++) {
257 myNet->deleteNetworkElement(
this,
myNet->getViewNet()->getUndoList());
277 if (
attrs.count(key) == 0) {
278 return toString(neteditOptions.getFloat(
"default.speed"));
283 if (
attrs.count(key) == 0) {
284 return toString(neteditOptions.getFloat(
"default.friction"));
307 if (
attrs.count(key) != 0) {
313 if (
attrs.count(key) != 0) {
330 if (
attrs.count(key) != 0) {
336 if (
attrs.count(key) != 0) {
411 const auto edgeTypeSelector =
myNet->getViewNet()->getViewParent()->getCreateEdgeFrame()->getEdgeTypeSelector();
414 if (edgeTypeSelector->useDefaultEdgeTypeShort() || edgeTypeSelector->useDefaultEdgeType()) {
415 return edgeTypeSelector->isAddSidewalkEnabled();
420 if (edgeTypeSelector->useDefaultEdgeTypeShort() || edgeTypeSelector->useDefaultEdgeType()) {
421 return edgeTypeSelector->isAddBikelaneEnabled();
439 myNet->getViewNet()->getViewParent()->getCreateEdgeFrame()->getEdgeTypeSelector()->updateIDinComboBox(
getID(),
value);
441 myNet->getAttributeCarriers()->updateEdgeTypeID(
this,
value);
559 if (
myNet->getViewNet()->getViewParent()->getCreateEdgeFrame()->shown()) {
560 myNet->getViewNet()->getViewParent()->getCreateEdgeFrame()->getEdgeTypeAttributes()->refreshAttributesEditor();
561 myNet->getViewNet()->getViewParent()->getCreateEdgeFrame()->getLaneTypeSelector()->refreshLaneTypeSelector();
const std::string invalid_return< std::string >::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)
A class that stores a 2D geometrical boundary.
double getCommonAttributeDouble(SumoXMLAttr key) const
const std::string getID() const override
get ID (all Attribute Carriers have one)
static T parse(const std::string &string)
parses a value of type T from string (used for basic types: int, double, bool, etc....
PositionVector getCommonAttributePositionVector(SumoXMLAttr key) const
void setCommonAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
Position getCommonAttributePosition(SumoXMLAttr key) const
static bool canParse(const std::string &string)
true if a value of type T can be parsed from string
GNENet * myNet
pointer to net
GNENet * getNet() const
get pointer to net
bool isCommonAttributeValid(SumoXMLAttr key, const std::string &value) const
std::string getCommonAttribute(SumoXMLAttr key) const
const std::vector< GNELaneTemplate * > & getLaneTemplates() const
get vector with the lane templates of this edge
std::string getAttribute(SumoXMLAttr key) const override
std::vector< GNELaneType * > myLaneTypes
vector with laneTypes
GNEEdgeType(GNECreateEdgeFrame *createEdgeFrame)
Constructor for default edge (empty ID).
void updateGeometry() override
update pre-computed geometry information
Position getPositionInView() const
Returns position of hierarchical element in view.
int getLaneTypeIndex(const GNELaneType *laneType) const
get laneType index
bool checkDrawRelatedContour() const override
check if draw related contour (cyan)
std::string getAttribute(SumoXMLAttr key) const override
double getAttributeDouble(SumoXMLAttr key) const override
void drawGL(const GUIVisualizationSettings &s) const override
Draws the object.
bool checkDrawDeleteContourSmall() const override
check if draw delete contour small (pink/white)
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
Parameterised * getParameters() override
get parameters associated with this edgeType
void removeLaneType(const int index)
remove laneType
void copyTemplate(const GNEEdgeTemplate *edgeTemplate)
copy edge template
bool checkDrawFromContour() const override
check if draw from contour (green)
bool isAttributeEnabled(SumoXMLAttr key) const override
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own popup-menu.
bool checkDrawOverContour() const override
check if draw over contour (orange)
bool checkDrawMoveContour() const override
check if draw move contour (red)
friend class GNECreateEdgeFrame
GNECreateEdgeFrame need access to setAttribute.
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
bool checkDrawDeleteContour() const override
check if draw delete contour (pink/white)
bool isValid(SumoXMLAttr key, const std::string &value) override
Boundary getCenteringBoundary() const override
Returns the boundary to which the view shall be centered in order to show the object.
const std::vector< GNELaneType * > & getLaneTypes() const
get laneTypes
void addLaneType(GNELaneType *laneType)
add laneType
bool checkDrawSelectContour() const override
check if draw select contour (blue)
void updateGLObject() override
update GLObject (geometry, ID, etc.)
~GNEEdgeType()
Destructor.
void deleteGLObject() override
delete element
Position getAttributePosition(SumoXMLAttr key) const override
bool checkDrawToContour() const override
check if draw from contour (magenta)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this edgeType
A NBNetBuilder extended by visualisation and editing capabilities.
GNEContour myNetworkElementContour
network element contour
GNENetworkElement(GNENet *net, const std::string &id, SumoXMLTag tag)
Constructor.
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.
Parameterised()
Default constructor.
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
int priority
The priority of an edge.
EdgeTypeDefinition()
Constructor.
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.