5#include <nlohmann/json.hpp>
21 static std::pair<String, GameObject *>
40 static void Load(std::istream &stream,
IGame *game);
Represents named set of parameters which can be serialized.
Definition GameObject.h:274
Serializer which serializes GameObjectRepository to JSON objects.
Definition GameSerializer.h:15
static nlohmann::json LoadFromFile(const String &filename)
Loads JSON object from file.
Definition GameSerializer.cpp:96
static std::pair< String, GameObject * > LoadGameObject(const nlohmann::json &obj, std::map< ParentGameObject *, std::vector< String > > &childrenMap)
Loads GameObject and children from JSON object.
Definition GameSerializer.cpp:12
static void Load(std::istream &stream, IGame *game)
Loads JSON object from stream and loads GameObject from object.
Definition GameSerializer.cpp:75
static void SaveToFile(const String &filename, const nlohmann::json &json)
Saves JSON object to file.
Definition GameSerializer.cpp:105
static nlohmann::json SerializeGameObject(const String &name, GameObject *object)
Serializes GameObject and children to JSON object.
Definition GameSerializer.cpp:42
static void Serialize(std::ostream &stream, IGame *game)
Serializes GameObject to JSON object and writes JSON string to stream.
Definition GameSerializer.cpp:112
Represents serializable GameObjectRegistry with rendering, asset manager.
Definition IGame.h:42
Represents GameObject with children.
Definition GameObject.h:449
Represents a mutable sequence of characters, providing various member functions for string manipulati...
Definition String.h:16