42 #ifdef CHECK_MEMORY_LEAKS 44 #endif // CHECK_MEMORY_LEAKS 84 bool haveSavedOneAtLeast =
false;
85 for (std::vector<RODFRouteDesc>::const_iterator j =
myRoutes.begin(); j !=
myRoutes.end(); ++j) {
87 if (find(saved.begin(), saved.end(), desc.
routename) != saved.end()) {
90 saved.push_back((*j).routename);
94 for (ROEdgeVector::const_iterator k = desc.
edges2Pass.begin(); k != desc.
edges2Pass.end(); k++) {
102 haveSavedOneAtLeast =
true;
104 return haveSavedOneAtLeast;
116 for (std::vector<RODFRouteDesc>::iterator i =
myRoutes.begin(); i !=
myRoutes.end();) {
119 for (std::vector<ROEdgeVector >::const_iterator j = illegals.begin(); !
remove && j != illegals.end(); ++j) {
121 for (ROEdgeVector::const_iterator k = (*j).begin(); !
remove && k != (*j).end(); ++k) {
142 desc.
routename = c.first->getID() +
"_to_" + c.second->getID();
void removeIllegal(const std::vector< ROEdgeVector > &illegals)
Removes "illegal" routes.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
std::vector< RODFRouteDesc > myRoutes
Stored route descriptions.
A class for sorting route descriptions by their length.
~RODFRouteCont()
Destructor.
ROEdgeVector edges2Pass
The edges the route is made of.
A class for finding a same route (one that passes the same edges)
bool removeRouteDesc(RODFRouteDesc &desc)
Removes the given route description from the container.
void sortByDistance()
Sorts routes by their distance (length)
std::map< std::pair< ROEdge *, ROEdge * >, int > myConnectionOccurences
Counts how many routes connecting the key-edges were already stored.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
A route within the DFROUTER.
RODFRouteCont()
Constructor.
std::string routename
The name of the route.
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
void addRouteDesc(RODFRouteDesc &desc)
Adds a route to the container.
void setID(RODFRouteDesc &desc) const
Computes and sets the id of a route.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool save(std::vector< std::string > &saved, const std::string &prependix, OutputDevice &out)
Saves routes.