MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / write

Function write

include/contractor/serialization.hpp:15–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14template <storage::Ownership Ownership>
15void write(storage::tar::FileWriter &writer,
16 const std::string &name,
17 const detail::ContractedMetric<Ownership> &metric)
18{
19 util::serialization::write(writer, name + "/contracted_graph", metric.graph);
20
21 writer.WriteElementCount64(name + "/exclude", metric.edge_filter.size());
22 for (const auto index : util::irange<std::size_t>(0, metric.edge_filter.size()))
23 {
24 storage::serialization::write(writer,
25 name + "/exclude/" + std::to_string(index) + "/edge_filter",
26 metric.edge_filter[index]);
27 }
28}
29
30template <storage::Ownership Ownership>
31void read(storage::tar::FileReader &reader,

Callers 1

writeGraphFunction · 0.70

Calls 3

to_stringFunction · 0.85
WriteElementCount64Method · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected