Fling Engine  0.00.1
Fling Engine is a game engine written in Vulkan
JsonFile.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Resource.h"
4 
5 #include <fstream>
6 #include <nlohmann/json.hpp>
7 
8 namespace Fling
9 {
11 
15  class JsonFile : public Resource
16  {
17  public:
18 
24  explicit JsonFile(Guid t_ID);
25 
30  json& GetJsonData() { return m_JsonData; }
31 
32  private:
33 
35 
40  void LoadJsonFile();
41 
42  };
43 } // namespace Fling
nlohmann::json json
Definition: JsonFile.h:10
json m_JsonData
Definition: JsonFile.h:34
Base class that represents a loaded resource in the engine.
Definition: Resource.h:11
void LoadJsonFile()
Loads the JsonFile based on Guid path.
Definition: JsonFile.cpp:12
json & GetJsonData()
Get a reference to the current Json data that is loaded from this file.
Definition: JsonFile.h:30
entt::hashed_string Guid
Definition: FlingTypes.h:21
A JsonFile provides an interface for easily using JSON files.
Definition: JsonFile.h:15
JsonFile(Guid t_ID)
Construct a new JsonFile object.
Definition: JsonFile.cpp:6
Definition: Engine.h:13