GigaPasjans
Loading...
Searching...
No Matches
Phosphorus::GameSerializer Class Reference

Serializer which serializes GameObjectRepository to JSON objects. More...

#include <GameSerializer.h>

Static Public Member Functions

static std::pair< String, GameObject * > LoadGameObject (const nlohmann::json &obj, std::map< ParentGameObject *, std::vector< String > > &childrenMap)
 Loads GameObject and children from JSON object.
 
static nlohmann::json SerializeGameObject (const String &name, GameObject *object)
 Serializes GameObject and children to JSON object.
 
static void Serialize (std::ostream &stream, IGame *game)
 Serializes GameObject to JSON object and writes JSON string to stream.
 
static void Load (std::istream &stream, IGame *game)
 Loads JSON object from stream and loads GameObject from object.
 
static nlohmann::json LoadFromFile (const String &filename)
 Loads JSON object from file.
 
static void SaveToFile (const String &filename, const nlohmann::json &json)
 Saves JSON object to file.
 

Detailed Description

Serializer which serializes GameObjectRepository to JSON objects.


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