TheAtlasEngine
 
Loading...
Searching...
No Matches
atlas::serializer Class Referenceexport

serializer is responsible for saving/loading scenes More...

Public Member Functions

 serializer (const ref< scene > &p_scene_ctx)
 constructs a new serializer with a requirement to specify a scene to serialize
 
void save (const std::filesystem::path &p_filepath)
 
bool load (const std::filesystem::path &p_filepath, const flecs::world &p_registry)
 

Detailed Description

serializer is responsible for saving/loading scenes

This class excepts a scene context with the purpose of serializing with the entities that reside within that specific scene context

Which also provide an API for loading in a scene from disk for deserialization.

Constructor & Destructor Documentation

◆ serializer()

atlas::serializer::serializer ( const ref< scene > &  p_scene_ctx)
inline

constructs a new serializer with a requirement to specify a scene to serialize

Parameters
p_scene_ctxis the current scene to perform serialization/deserialization to

Member Function Documentation

◆ load()

bool atlas::serializer::load ( const std::filesystem::path &  p_filepath,
const flecs::world &  p_registry 
)
inline
Parameters
p_filepathis the specified path to loading in the saved file from
p_registryis the current scene registry to load/create the entities through that registry
Returns
true if loading was successful, otherwise will return false

◆ save()

void atlas::serializer::save ( const std::filesystem::path &  p_filepath)
inline
Parameters
p_filepathis the specified path to save the file
Note
Queries in flecs the ecs framework are how we can query all entities that the engine (user creates through our API)

The documentation for this class was generated from the following file: