Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Functions
Serialization.h File Reference
#include "third_party/nlohmann/json.hpp"
#include "VideoGame.h"
#include "World.h"
#include "Level.h"
#include "Sector.h"
#include "CollisionMap.h"
#include "GraphicMap.h"
#include "QuestManager.h"
#include "Quest.h"
#include "Objective.h"
#include "Task.h"
#include <fstream>
#include <iostream>
#include <string>
+ Include dependency graph for Serialization.h:

Go to the source code of this file.

Functions

void to_json (json &j, Task const &t)
 
void from_json (json const &j, Task &t)
 
void to_json (json &j, Objective const &o)
 
void from_json (json const &j, Objective &o)
 
void to_json (json &j, Quest const &q)
 
void from_json (json const &j, Quest &q)
 
void to_json (json &j, QuestManager const &m)
 
void from_json (json const &j, QuestManager &m)
 
void to_json (json &j, CollisionMap const &c)
 
void from_json (json const &j, CollisionMap &c)
 
void to_json (json &j, GraphicMap const &g)
 
void from_json (json const &j, GraphicMap &g)
 
void to_json (json &j, Sector const &s)
 
void from_json (json const &j, Sector &s)
 
void to_json (json &j, Level const &l)
 
void from_json (json const &j, Level &l)
 
void to_json (json &j, World const &w)
 
void from_json (json const &j, World &w)
 
void to_json (json &j, VideoGame const &vg)
 
void from_json (json const &j, VideoGame &vg)
 
bool SaveToFile (const json &j, const std::string &path)
 
bool LoadFromFile (json &j, const std::string &path)
 

Function Documentation

◆ from_json() [1/10]

void from_json ( json const j,
CollisionMap c 
)
inline

Definition at line 104 of file Serialization.h.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ from_json() [2/10]

void from_json ( json const j,
GraphicMap g 
)
inline

Definition at line 119 of file Serialization.h.

References GraphicMap::elements, and GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ from_json() [3/10]

void from_json ( json const j,
Level l 
)
inline

Definition at line 156 of file Serialization.h.

References from_json(), and GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ from_json() [4/10]

void from_json ( json const j,
Objective o 
)
inline

Definition at line 46 of file Serialization.h.

References from_json(), and GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ from_json() [5/10]

void from_json ( json const j,
Quest q 
)
inline

Definition at line 66 of file Serialization.h.

References from_json(), and GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ from_json() [6/10]

void from_json ( json const j,
QuestManager m 
)
inline

Definition at line 85 of file Serialization.h.

References from_json(), and GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ from_json() [7/10]

void from_json ( json const j,
Sector s 
)
inline

Definition at line 135 of file Serialization.h.

References from_json(), and GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ from_json() [8/10]

void from_json ( json const j,
Task t 
)
inline

Definition at line 32 of file Serialization.h.

References GetComponentTypeID_Static().

Referenced by from_json(), from_json(), from_json(), from_json(), from_json(), from_json(), and from_json().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ from_json() [9/10]

void from_json ( json const j,
VideoGame vg 
)
inline

Definition at line 200 of file Serialization.h.

References QuestManager::AddQuest(), from_json(), QuestManager::Get(), and GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ from_json() [10/10]

void from_json ( json const j,
World w 
)
inline

Definition at line 176 of file Serialization.h.

References from_json(), and GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ LoadFromFile()

bool LoadFromFile ( json j,
const std::string path 
)
inline

Definition at line 225 of file Serialization.h.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ SaveToFile()

bool SaveToFile ( const json j,
const std::string path 
)
inline

Definition at line 218 of file Serialization.h.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ to_json() [1/10]

void to_json ( json j,
CollisionMap const c 
)
inline

Definition at line 98 of file Serialization.h.

References GetComponentTypeID_Static(), and push_back().

+ Here is the call graph for this function:

◆ to_json() [2/10]

void to_json ( json j,
GraphicMap const g 
)
inline

Definition at line 113 of file Serialization.h.

References GraphicMap::elements, GetComponentTypeID_Static(), and push_back().

+ Here is the call graph for this function:

◆ to_json() [3/10]

void to_json ( json j,
Level const l 
)
inline

Definition at line 149 of file Serialization.h.

References GetComponentTypeID_Static(), and push_back().

+ Here is the call graph for this function:

◆ to_json() [4/10]

void to_json ( json j,
Objective const o 
)
inline

Definition at line 39 of file Serialization.h.

References GetComponentTypeID_Static(), and push_back().

+ Here is the call graph for this function:

◆ to_json() [5/10]

void to_json ( json j,
Quest const q 
)
inline

Definition at line 59 of file Serialization.h.

References GetComponentTypeID_Static(), and push_back().

+ Here is the call graph for this function:

◆ to_json() [6/10]

void to_json ( json j,
QuestManager const m 
)
inline

Definition at line 79 of file Serialization.h.

References GetComponentTypeID_Static(), and push_back().

+ Here is the call graph for this function:

◆ to_json() [7/10]

void to_json ( json j,
Sector const s 
)
inline

Definition at line 128 of file Serialization.h.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ to_json() [8/10]

void to_json ( json j,
Task const t 
)
inline

Definition at line 26 of file Serialization.h.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ to_json() [9/10]

void to_json ( json j,
VideoGame const vg 
)
inline

Definition at line 189 of file Serialization.h.

References QuestManager::Get(), GetComponentTypeID_Static(), QuestManager::GetQuests(), and push_back().

+ Here is the call graph for this function:

◆ to_json() [10/10]

void to_json ( json j,
World const w 
)
inline

Definition at line 169 of file Serialization.h.

References GetComponentTypeID_Static(), and push_back().

+ Here is the call graph for this function: