36 #include <xercesc/sax/HandlerBase.hpp>
37 #include <xercesc/sax/AttributeList.hpp>
38 #include <xercesc/sax/SAXParseException.hpp>
39 #include <xercesc/sax/SAXException.hpp>
49 #ifdef CHECK_MEMORY_LEAKS
51 #endif // CHECK_MEMORY_LEAKS
88 if (!
myTypeCont.
insert(
id, noLanes, speed, priority, permissions, width, oneway)) {
89 WRITE_ERROR(
"Duplicate type occured. ID='" +
id +
"'");
static const SUMOReal UNSPECIFIED_WIDTH
unspecified lane width
bool insert(const std::string &id, int noLanes, SUMOReal maxSpeed, int prio, SUMOReal width, SUMOVehicleClass vClasses=SVC_UNKNOWN, bool oneWayIsDefault=false)
Adds a type into the list. This is a simplified convenience form of insert, if only one allowed vehic...
SAX-handler base for SUMO-files.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag; Parses edge type information.
NBTypeCont & myTypeCont
The type container to fill.
SUMOReal getSpeed(const std::string &type) const
Returns the maximal velocity for the given type [m/s].
Encapsulated SAX-Attributes.
int getNumLanes(const std::string &type) const
Returns the number of lanes for the given type.
int getPriority(const std::string &type) const
Returns the priority for the given type.
~NIXMLTypesHandler()
Destructor.
NIXMLTypesHandler(NBTypeCont &tc)
Constructor.
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers. ...
bool markAsToDiscard(const std::string &id)
Marks a type as to be discarded.
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue, bool report=true) const
Tries to read given attribute assuming it is an int.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
A storage for available types of edges.