![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include <EntityBlueprint.h>
Public Member Functions | |
| EntityBlueprint ()=default | |
| EntityBlueprint (const std::string &n) | |
| void | AddComponent (const std::string &type, const json &properties) |
| ComponentData * | GetComponent (const std::string &type) |
| const ComponentData * | GetComponent (const std::string &type) const |
| bool | HasComponent (const std::string &type) const |
| bool | RemoveComponent (const std::string &type) |
| json | ToJson () const |
| bool | SaveToFile (const std::string &filepath) const |
Static Public Member Functions | |
| static EntityBlueprint | FromJson (const json &j) |
| static EntityBlueprint | LoadFromFile (const std::string &filepath) |
Public Attributes | |
| std::string | name |
| std::string | description |
| std::vector< ComponentData > | components |
Definition at line 31 of file EntityBlueprint.h.
|
default |
|
inline |
Definition at line 38 of file EntityBlueprint.h.
| void Olympe::Blueprint::EntityBlueprint::AddComponent | ( | const std::string & | type, |
| const json & | properties | ||
| ) |
Definition at line 14 of file EntityBlueprint.cpp.
References components, and GetComponentTypeID_Static().
Referenced by TestCreateAndSaveBlueprint(), and TestLoadAndModifyBlueprint().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 88 of file EntityBlueprint.cpp.
References JsonHelper::ForEachInArray(), GetComponentTypeID_Static(), JsonHelper::GetString(), JsonHelper::IsArray(), name, and Olympe::Blueprint::ComponentData::type.
Referenced by Olympe::BlueprintEditor::ApplyTemplate(), and LoadFromFile().
Here is the call graph for this function:
Here is the caller graph for this function:| ComponentData * Olympe::Blueprint::EntityBlueprint::GetComponent | ( | const std::string & | type | ) |
Definition at line 30 of file EntityBlueprint.cpp.
References components, and GetComponentTypeID_Static().
Referenced by HasComponent(), and TestLoadAndModifyBlueprint().
Here is the call graph for this function:
Here is the caller graph for this function:| const ComponentData * Olympe::Blueprint::EntityBlueprint::GetComponent | ( | const std::string & | type | ) | const |
Definition at line 40 of file EntityBlueprint.cpp.
References components, and GetComponentTypeID_Static().
Here is the call graph for this function:Definition at line 50 of file EntityBlueprint.cpp.
References GetComponent().
Referenced by TestLoadAndModifyBlueprint().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 117 of file EntityBlueprint.cpp.
References EntityBlueprint(), FromJson(), GetComponentTypeID_Static(), and JsonHelper::LoadJsonFromFile().
Referenced by Olympe::BlueprintEditor::LoadBlueprint(), TestCompleteBlueprint(), and TestLoadAndModifyBlueprint().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 55 of file EntityBlueprint.cpp.
References components, and GetComponentTypeID_Static().
Here is the call graph for this function:Definition at line 112 of file EntityBlueprint.cpp.
References JsonHelper::SaveJsonToFile(), and ToJson().
Referenced by Olympe::BlueprintEditor::SaveBlueprint(), Olympe::BlueprintEditor::SaveBlueprintAs(), TestCreateAndSaveBlueprint(), and TestLoadAndModifyBlueprint().
Here is the call graph for this function:
Here is the caller graph for this function:| json Olympe::Blueprint::EntityBlueprint::ToJson | ( | ) | const |
Definition at line 68 of file EntityBlueprint.cpp.
References components, description, GetComponentTypeID_Static(), and name.
Referenced by Olympe::BlueprintEditor::SaveCurrentAsTemplate(), SaveToFile(), and TestCreateAndSaveBlueprint().
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector<ComponentData> Olympe::Blueprint::EntityBlueprint::components |
Definition at line 35 of file EntityBlueprint.h.
Referenced by AddComponent(), GetComponent(), GetComponent(), RemoveComponent(), Olympe::BlueprintEditorGUI::RemoveComponent(), TestCompleteBlueprint(), TestLoadAndModifyBlueprint(), and ToJson().
| std::string Olympe::Blueprint::EntityBlueprint::description |
Definition at line 34 of file EntityBlueprint.h.
Referenced by Olympe::BlueprintEditor::NewBlueprint(), TestCreateAndSaveBlueprint(), TestLoadAndModifyBlueprint(), and ToJson().
| std::string Olympe::Blueprint::EntityBlueprint::name |
Definition at line 33 of file EntityBlueprint.h.
Referenced by FromJson(), Olympe::BlueprintEditor::HasBlueprint(), Olympe::BlueprintEditor::SaveBlueprint(), Olympe::BlueprintEditor::SaveBlueprintAs(), TestCompleteBlueprint(), TestLoadAndModifyBlueprint(), and ToJson().