Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Static Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
Olympe::PrefabLoader Class Reference

#include <PrefabLoader.h>

Static Public Member Functions

static EntityPrefab LoadFromFile (const std::string &filePath)
 
static void SaveToFile (const std::string &filePath, const EntityPrefab &prefab)
 
static json LoadJsonFromFile (const std::string &filePath)
 
static void SaveJsonToFile (const std::string &filePath, const json &data)
 
static ComponentSchema ParseComponentSchema (const json &schemaJson)
 
static std::vector< ComponentSchemaLoadAllSchemas (const std::string &schemasPath)
 
static bool ValidatePrefab (const EntityPrefab &prefab)
 
static bool ValidateComponentData (const ComponentData &component, const ComponentSchema &schema)
 

Private Member Functions

 PrefabLoader ()=default
 

Static Private Member Functions

static std::string GetSchemaVersion (const json &data)
 
static ComponentSchema ParseSchemaV4 (const json &data)
 
static json SerializeSchemaV4 (const EntityPrefab &prefab)
 

Detailed Description

Definition at line 119 of file PrefabLoader.h.

Constructor & Destructor Documentation

◆ PrefabLoader()

Olympe::PrefabLoader::PrefabLoader ( )
privatedefault

Member Function Documentation

◆ GetSchemaVersion()

std::string Olympe::PrefabLoader::GetSchemaVersion ( const json data)
staticprivate

Definition at line 28 of file PrefabLoader.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ LoadAllSchemas()

std::vector< ComponentSchema > Olympe::PrefabLoader::LoadAllSchemas ( const std::string &  schemasPath)
static

Definition at line 25 of file PrefabLoader.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ LoadFromFile()

EntityPrefab Olympe::PrefabLoader::LoadFromFile ( const std::string &  filePath)
static

Definition at line 20 of file PrefabLoader.cpp.

References Olympe::EntityPrefab::FromJson(), GetComponentTypeID_Static(), and LoadJsonFromFile().

+ Here is the call graph for this function:

◆ LoadJsonFromFile()

json Olympe::PrefabLoader::LoadJsonFromFile ( const std::string &  filePath)
static

Definition at line 22 of file PrefabLoader.cpp.

References GetComponentTypeID_Static().

Referenced by Olympe::EntityPrefabRenderer::Load(), Olympe::EntityPrefabGraphDocument::LoadFromFile(), and LoadFromFile().

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

◆ ParseComponentSchema()

ComponentSchema Olympe::PrefabLoader::ParseComponentSchema ( const json schemaJson)
static

Definition at line 24 of file PrefabLoader.cpp.

References Olympe::ComponentSchema::FromJson(), and GetComponentTypeID_Static().

Referenced by ParseSchemaV4().

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

◆ ParseSchemaV4()

ComponentSchema Olympe::PrefabLoader::ParseSchemaV4 ( const json data)
staticprivate

Definition at line 29 of file PrefabLoader.cpp.

References ParseComponentSchema().

+ Here is the call graph for this function:

◆ SaveJsonToFile()

void Olympe::PrefabLoader::SaveJsonToFile ( const std::string &  filePath,
const json data 
)
static

Definition at line 23 of file PrefabLoader.cpp.

References GetComponentTypeID_Static().

Referenced by Olympe::EntityPrefabGraphDocument::SaveToFile(), and SaveToFile().

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

◆ SaveToFile()

void Olympe::PrefabLoader::SaveToFile ( const std::string &  filePath,
const EntityPrefab prefab 
)
static

Definition at line 21 of file PrefabLoader.cpp.

References GetComponentTypeID_Static(), and SaveJsonToFile().

+ Here is the call graph for this function:

◆ SerializeSchemaV4()

json Olympe::PrefabLoader::SerializeSchemaV4 ( const EntityPrefab prefab)
staticprivate

Definition at line 30 of file PrefabLoader.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ ValidateComponentData()

bool Olympe::PrefabLoader::ValidateComponentData ( const ComponentData component,
const ComponentSchema schema 
)
static

Definition at line 27 of file PrefabLoader.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

◆ ValidatePrefab()

bool Olympe::PrefabLoader::ValidatePrefab ( const EntityPrefab prefab)
static

Definition at line 26 of file PrefabLoader.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

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