36 #include <xercesc/sax/HandlerBase.hpp> 37 #include <xercesc/sax/AttributeList.hpp> 38 #include <xercesc/sax/SAXParseException.hpp> 39 #include <xercesc/sax/SAXException.hpp> 87 if (allowS !=
"" || disallowS !=
"") {
98 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.
void insert(const std::string &id, int numLanes, double maxSpeed, int prio, SVCPermissions permissions, double width, bool oneWayIsDefault, double sidewalkWidth, double bikeLaneWidth)
Adds a type into the list.
double getSpeed(const std::string &type) const
Returns the maximal velocity for the given type [m/s].
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
std::string myCurrentTypeID
The currently parsed type.
int getPriority(const std::string &type) const
Returns the priority 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.
int getNumLanes(const std::string &type) const
Returns the number of lanes for the given type.
begin/end of the description of an edge restriction
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...
double getWidth(const std::string &type) const
Returns the lane width for the given type [m].
NBTypeCont & myTypeCont
The type container to fill.
bool addRestriction(const std::string &id, const SUMOVehicleClass svc, const double speed)
Adds a restriction to a type.
bool knows(const std::string &type) const
Returns whether the named type is in the container.
double getBikeLaneWidth(const std::string &type) const
Returns the lane width for a bike lane to be added [m].
double getSidewalkWidth(const std::string &type) const
Returns the lane width for a sidewalk to be added [m].
Encapsulated SAX-Attributes.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
~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 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.
bool getIsOneWay(const std::string &type) const
Returns whether edges are one-way per default for the given type.
SVCPermissions getPermissions(const std::string &type) const
Returns allowed vehicle classes for the given type.
A storage for available types of edges.