3 #include <boost/archive/binary_iarchive.hpp> 4 #include <boost/archive/binary_oarchive.hpp> 12 namespace io_handlers {
16 RegisterParser<BinParser> regParser;
17 RegisterWriter<BinWriter> regWriter;
22 std::ofstream fs(filename, std::ofstream::binary);
24 throw ParseError(
"Failed open archive " + filename);
26 boost::archive::binary_oarchive oa(fs);
33 std::ifstream fs(filename, std::ifstream::binary);
35 throw ParseError(
"Failed open archive " + filename);
37 std::unique_ptr<LaneletMap> laneletMap = std::make_unique<LaneletMap>();
38 boost::archive::binary_iarchive ia(fs);
void write(const std::string &filename, const LaneletMap &laneletMap, ErrorMessages &, const io::Configuration &) const override
std::vector< std::string > ErrorMessages
Error thrown if some error occured during the parsing of the file.
std::map< std::string, Attribute > Configuration
std::unique_ptr< LaneletMap > parse(const std::string &filename, ErrorMessages &) const override