36 #include <xercesc/sax/HandlerBase.hpp>
37 #include <xercesc/sax/AttributeList.hpp>
38 #include <xercesc/sax/SAXParseException.hpp>
39 #include <xercesc/sax/SAXException.hpp>
54 #ifdef CHECK_MEMORY_LEAKS
56 #endif // CHECK_MEMORY_LEAKS
66 myHaveWarnedAboutDeprecatedLanes(false),
67 myErrorMsgHandler(
OptionsCont::getOptions().getBool(
"ignore-errors.connections") ?
99 WRITE_WARNING(
"Target edge '" + toEdge->
getID() +
"' is not connected with '" + fromEdge->
getID() +
"'; the connection cannot be reset.");
107 if (!
parseLaneInfo(attrs, fromEdge, toEdge, &fromLane, &toLane)) {
113 WRITE_WARNING(
"Edge '" + fromEdge->
getID() +
"' has no connection to lane " +
toString(toLane) +
" of edge '" + toEdge->
getID() +
"'; the connection cannot be reset.");
134 if (toEdge == 0 && to.length() != 0) {
173 size_t div = def.find(
"->");
174 if (div == std::string::npos) {
178 std::string fromDef = def.substr(0, div);
179 std::string toDef = def.substr(div + 2);
183 if (fromDef.find(
'_') != std::string::npos) {
184 fromDef = fromDef.substr(0, fromDef.find(
'_'));
186 if (toDef.find(
'_') != std::string::npos) {
187 toDef = toDef.substr(0, toDef.find(
'_'));
226 from->
getID() +
"' to '" + to->
getID() +
"'.");
232 from->
getID() +
"' to '" + to->
getID() +
"'.");
245 if (t->
getID().substr(0, t->
getID().find(
'/')) != nFrom->
getID().substr(0, nFrom->
getID().find(
'/'))) {
265 if (keepUncontrolled) {
272 int* fromLane,
int* toLane) {
284 int* fromLane,
int* toLane) {
295 if (!ok || st.size() != 2) {
297 from->
getID() +
"' to '" + to->
getID() +
"'.");
326 std::vector<std::string> edgeIDs;
331 for (std::vector<std::string>::const_iterator it = edgeIDs.begin(); it != edgeIDs.end(); ++it) {
334 WRITE_ERROR(
"Edge '" + (*it) +
"' for crossing at node '" + nodeID +
"' is not known.");
343 WRITE_ERROR(
"Edge '" + (*it) +
"' does not touch node '" + nodeID +
"'.");
348 WRITE_ERROR(
"Edge '" + (*it) +
"' does not touch node '" + nodeID +
"'.");
352 edges.push_back(edge);
357 WRITE_WARNING(
"Crossing at controlled node '" + nodeID +
"' must be prioritized");