Integrate CellStorage into datafacade

This commit is contained in:
Patrick Niklaus
2017-03-04 18:36:29 +00:00
committed by Patrick Niklaus
parent ef71cc0d12
commit 694bf9d8b1
9 changed files with 157 additions and 132 deletions
+15
View File
@@ -3,6 +3,7 @@
#include "storage/io.hpp"
#include "util/multi_level_partition.hpp"
#include "util/cell_storage.hpp"
namespace osrm
{
@@ -21,6 +22,20 @@ inline void write(const boost::filesystem::path &path, const util::MultiLevelPar
writer.SerializeVector(mlp.partition);
writer.SerializeVector(mlp.cell_to_children);
}
template <>
inline void write(const boost::filesystem::path &path, const util::CellStorage &storage)
{
const auto fingerprint = storage::io::FileWriter::GenerateFingerprint;
storage::io::FileWriter writer{path, fingerprint};
writer.SerializeVector(storage.weights);
writer.SerializeVector(storage.source_boundary);
writer.SerializeVector(storage.destination_boundary);
writer.SerializeVector(storage.cells);
writer.SerializeVector(storage.level_to_cell_offset);
}
}
}
}