TheAtlasEngine
 
Loading...
Searching...
No Matches
serializer.hpp
1#pragma once
2#include <core/core.hpp>
3#include <core/scene/scene.hpp>
4#include <string>
5#include <filesystem>
6
7namespace atlas {
17 class serializer {
18 public:
19 serializer() = default;
20
27 serializer(const ref<scene>& p_scene_ctx);
28
32 void save(const std::filesystem::path& p_filepath);
33
41 bool load(const std::filesystem::path& p_filepath,
42 const flecs::world& p_registry);
43
44 private:
45 ref<scene> m_current_scene_ctx;
46 };
47
48}; // namespace atlas
serializer is responsible for saving/loading scenes
Definition serializer.hpp:17
serializer(const ref< scene > &p_scene_ctx)
constructs a new serializer with a requirement to specify a scene to serialize
bool load(const std::filesystem::path &p_filepath, const flecs::world &p_registry)
void save(const std::filesystem::path &p_filepath)