1 #ifndef BLANK_IO_WORLDSAVE_HPP_
2 #define BLANK_IO_WORLDSAVE_HPP_
4 #include "../world/Chunk.hpp"
5 #include "../world/Generator.hpp"
6 #include "../world/World.hpp"
17 explicit WorldSave(const std::string &path);
21 bool Exists() const noexcept;
22 void Read(World::Config &) const;
23 void Write(const World::Config &) const;
24 void Read(Generator::Config &) const;
25 void Write(const Generator::Config &) const;
28 bool Exists(const Chunk::Pos &) const noexcept;
29 void Read(Chunk &) const;
30 void Write(Chunk &) const;
32 const char *ChunkPath(const Chunk::Pos &) const;
35 std::string root_path;
36 std::string world_conf_path;
37 std::string gen_conf_path;
38 std::string chunk_path;
39 std::size_t chunk_bufsiz;
40 std::unique_ptr<char[]> chunk_buf;