-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsystem.cpp
More file actions
21 lines (20 loc) · 979 Bytes
/
system.cpp
File metadata and controls
21 lines (20 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// system graphs - only a few interesting systems; many aren't useful on their own
file.open(Args::datapath+"/graphs/systemgraphs.csv");
getline(file, line); // ignore header line
while (getline(file, line))
try { HighwaySystem* const h = HighwaySystem::sysname_hash.at(line);
if (h->active_or_preview())
{ GraphListEntry::add_group(
h->systemname + "-system",
h->systemname + " (" + h->fullname + ")",
's', nullptr, new vector<HighwaySystem*>(1, h), nullptr, el);
// deleted @ end of HighwayGraph::write_subgraphs_tmg
h->is_subgraph_system = 1;
} else el.add_error("devel system "+h->systemname+" in systemgraphs.csv");
}
catch (const std::out_of_range&)
{ el.add_error("unrecognized system code "+line+" in systemgraphs.csv");
}
file.close();
graph_types.push_back({"system", "Routes Within a Single Highway System",
"These graphs contain the routes within a single highway system and are not restricted by region."});