summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-28 12:25:44 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-28 12:25:44 +0200
commitdbaafe5ecea1b2350d526c51059b9f0d123b5669 (patch)
tree9c0a07fc4558f88168eec4c121eae82a1e428106 /src
parentb93ec1eee7d3199ecd1fa8bf2061622ede93a98c (diff)
serializer work
Diffstat (limited to 'src')
-rw-r--r--src/world.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/world.hpp b/src/world.hpp
index cbdec4f5..84659753 100644
--- a/src/world.hpp
+++ b/src/world.hpp
@@ -7,9 +7,9 @@
#include <memory>
#include <optional>
-namespace floormat {
+namespace std::filesystem { class path; }
-struct chunk;
+namespace floormat {
struct world final
{
@@ -40,6 +40,9 @@ public:
[[deprecated]] const auto& chunks() const noexcept { return _chunks; } // only for serialization
+ void serialize(StringView filename);
+ static world deserialize(StringView filename);
+
fm_DECLARE_DEPRECATED_COPY_ASSIGNMENT(world);
fm_DECLARE_DEFAULT_MOVE_ASSIGNMENT_(world);
};