36 #include <xercesc/sax/HandlerBase.hpp>
37 #include <xercesc/sax/AttributeList.hpp>
38 #include <xercesc/sax/SAXParseException.hpp>
39 #include <xercesc/sax/SAXException.hpp>
50 #ifdef CHECK_MEMORY_LEAKS
52 #endif // CHECK_MEMORY_LEAKS
91 if (allowS !=
"" || disallowS !=
"") {
102 for (
int i = 0; i < 10; i++) {
SUMOVehicleClass getVehicleClassID(const std::string &name)
Returns the class id of the abstract class given by its name.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
std::string myCurrentTypeID
The currently parsed type.
bool getIsOneWay(const std::string &type) const
Returns whether edges are one-way per default for the given type.
bool markAsSet(const std::string &id, const SumoXMLAttr attr)
Marks an attribute of a type as set.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
SAX-handler base for SUMO-files.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag; Parses edge type information.
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list...
SUMOReal getWidth(const std::string &type) const
Returns the lane width for the given type [m].
SUMOReal getSidewalkWidth(const std::string &type) const
Returns the lane width for a sidewalk to be added [m].
NBTypeCont & myTypeCont
The type container to fill.
SUMOReal getSpeed(const std::string &type) const
Returns the maximal velocity for the given type [m/s].
SUMOReal getBikeLaneWidth(const std::string &type) const
Returns the lane width for a bike lane to be added [m].
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 Deprecated classes g...
bool knows(const std::string &type) const
Returns whether the named type is in the container.
void insert(const std::string &id, int numLanes, SUMOReal maxSpeed, int prio, SVCPermissions permissions, SUMOReal width, bool oneWayIsDefault, SUMOReal sidewalkWidth, SUMOReal bikeLaneWidth)
Adds a type into the list.
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.
SVCPermissions getPermissions(const std::string &type) const
Returns allowed vehicle classes for the given type.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
bool addRestriction(const std::string &id, const SUMOVehicleClass svc, const SUMOReal speed)
Adds a restriction to a type.
A storage for available types of edges.