From dbaafe5ecea1b2350d526c51059b9f0d123b5669 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 28 Oct 2022 12:25:44 +0200 Subject: serializer work --- src/world.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') 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 #include -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); }; -- cgit v1.2.3