79 SUMOReal defaultSpeed,
int defaultPriority);
92 void insert(
const std::string&
id,
int numLanes,
95 SUMOReal width,
bool oneWayIsDefault,
110 bool knows(
const std::string& type)
const;
241 width(
NBEdge::UNSPECIFIED_WIDTH),
242 sidewalkWidth(
NBEdge::UNSPECIFIED_WIDTH),
243 bikeLaneWidth(
NBEdge::UNSPECIFIED_WIDTH) {
251 numLanes(_numLanes), speed(_speed),
priority(_priority),
252 permissions(_permissions),
254 sidewalkWidth(_sideWalkWidth),
255 bikeLaneWidth(_bikeLaneWidth) {
300 typedef std::map<std::string, TypeDefinition>
TypesCont;
std::set< SumoXMLAttr > attrs
The attributes which have been set.
int numLanes
The number of lanes of an edge.
bool wasSet(const std::string &type, const SumoXMLAttr attr) const
Returns whether an attribute of a type was set.
std::map< std::string, TypeDefinition > TypesCont
A container of types, accessed by the string id.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
NBTypeCont & operator=(const NBTypeCont &s)
invalid assignment operator
const TypeDefinition & getType(const std::string &name) const
Retrieve the name or the default type.
SUMOReal width
The width of lanes of edges of this type [m].
The representation of a single edge during network building.
bool getIsOneWay(const std::string &type) const
Returns whether edges are one-way per default for the given type.
SUMOReal speed
The maximal velocity on an edge in m/s.
bool markAsSet(const std::string &id, const SumoXMLAttr attr)
Marks an attribute of a type as set.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
bool oneWay
Whether one-way traffic is mostly common for this type (mostly unused)
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].
TypeDefinition()
Constructor.
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].
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.
bool knows(const std::string &type) const
Returns whether the named type is in the container.
void setDefaults(int defaultNumLanes, SUMOReal defaultLaneWidth, SUMOReal defaultSpeed, int defaultPriority)
Sets the default values.
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.
void writeTypes(OutputDevice &into) const
writes all types a s XML
bool markAsToDiscard(const std::string &id)
Marks a type as to be discarded.
int size() const
Returns the number of known types.
TypeDefinition myDefaultType
The default type.
bool getShallBeDiscarded(const std::string &type) const
Returns the information whether edges of this type shall be discarded.
bool copyRestrictionsAndAttrs(const std::string &fromId, const std::string &toId)
Copy restrictions to a type.
Static storage of an output device and its base (abstract) implementation.
SVCPermissions getPermissions(const std::string &type) const
Returns allowed vehicle classes for the given type.
int priority
The priority of an edge.
SVCPermissions permissions
List of vehicle types that are allowed on this edge.
std::map< SUMOVehicleClass, SUMOReal > restrictions
The vehicle class specific speed restrictions.
TypesCont myTypes
The container of types.
bool addRestriction(const std::string &id, const SUMOVehicleClass svc, const SUMOReal speed)
Adds a restriction to a type.
const SVCPermissions SVC_UNSPECIFIED
bool discard
Whether edges of this type shall be discarded.
A storage for available types of edges.
TypeDefinition(int _numLanes, SUMOReal _speed, int _priority, SUMOReal _width, SVCPermissions _permissions, bool _oneWay, SUMOReal _sideWalkWidth, SUMOReal _bikeLaneWidth)
Constructor.