49 #ifdef CHECK_MEMORY_LEAKS
51 #endif // CHECK_MEMORY_LEAKS
60 myNet(net), myCurrentName(),
61 myCurrentEdge(0), myEdgeBuilder(eb) {}
127 fromNode =
new RONode(from);
140 if (type ==
"" || type ==
"normal" || type ==
"connector") {
142 }
else if (type ==
"source") {
144 }
else if (type ==
"sink") {
146 }
else if (type ==
"internal") {
185 if (maxSpeed > 0 && length > 0 &&
id.length() > 0) {
221 if (fromID[0] ==
':') {
227 throw ProcessError(
"unknown from-edge '" + fromID +
"' in connection");
230 throw ProcessError(
"unknown to-edge '" + toID +
"' in connection");
252 for (std::vector<std::string>::const_iterator i = desc.begin(); i != desc.end(); ++i) {
std::string myCurrentName
The name of the edge/node that is currently processed.
ROAbstractEdgeBuilder & myEdgeBuilder
The object used to build of edges of the desired type.
A single lane the router may use.
void parseDistrict(const SUMOSAXAttributes &attrs)
void addNode(RONode *node)
ROEdge * getEdge(const std::string &name) const
Retrieves an edge from the network.
void parseJunction(const SUMOSAXAttributes &attrs)
Parses a junction's position.
virtual void addLane(ROLane *lane)
Adds a lane to the edge while loading.
virtual void parseLane(const SUMOSAXAttributes &attrs)
Parses and builds a lane.
SAX-handler base for SUMO-files.
Interface for building instances of router-edges.
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list...
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
An edge where vehicles are inserted at (no vehicle may come from back)
RONetHandler(RONet &net, ROAbstractEdgeBuilder &eb)
Constructor.
void setType(EdgeType type)
Sets the type of te edge.
Encapsulated SAX-Attributes.
A point in 2D or 3D with translation and scaling methods.
An edge representing a whole district.
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers. ...
void setPosition(const Position &p)
Sets the position of the node.
virtual ~RONetHandler()
Destructor.
const SVCPermissions SVCFreeForAll
A basic edge for routing applications.
virtual std::vector< std::string > getStringVector(int attr) const =0
Tries to read given attribute assuming it is a string vector.
virtual ROEdge * buildEdge(const std::string &name, RONode *from, RONode *to, const int priority)=0
Builds an edge with the given name.
The router's network representation.
void setRestrictionFound()
RONode * getNode(const std::string &id) const
Retrieves an node from the network.
The abstract direction of a link.
virtual bool addEdge(ROEdge *edge)
RONet & myNet
The net to store the information into.
void parseConnection(const SUMOSAXAttributes &attrs)
Base class for nodes used by the router.
An edge where vehicles disappear (no vehicle may leave this edge)
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 myProcess
An indicator whether the next edge shall be read (internal edges are not read by now) ...
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
virtual void addFollower(ROEdge *s, std::string dir="")
Adds information about a connected edge.
ROEdge * myCurrentEdge
The currently built edge.
void parseDistrictEdge(const SUMOSAXAttributes &attrs, bool isSource)
void parseEdge(const SUMOSAXAttributes &attrs)
Parses and builds an edge.