Fling Engine  0.00.1
Fling Engine is a game engine written in Vulkan
Public Member Functions | Private Member Functions | Private Attributes
Fling::JsonFile Class Reference

A JsonFile provides an interface for easily using JSON files. More...

#include <JsonFile.h>

Inherits Fling::Resource.

Public Member Functions

 JsonFile (Guid t_ID)
 Construct a new JsonFile object. More...
 
jsonGetJsonData ()
 Get a reference to the current Json data that is loaded from this file. More...
 
- Public Member Functions inherited from Fling::Resource
 Resource (Fling::Guid t_ID)
 
virtual ~Resource ()=default
 
Fling::Guid_Handle GetGuidHandle () const
 Get GUID handle (just an int) for this resources guid. More...
 
std::string GetGuidString () const
 Get the human-readable string representation of this GUID. More...
 
std::string GetFilepathReleativeToAssets () const
 Returns the full file path that is relative to the assets path based on the GUID of this resource. More...
 

Private Member Functions

void LoadJsonFile ()
 Loads the JsonFile based on Guid path. More...
 

Private Attributes

json m_JsonData
 

Additional Inherited Members

- Protected Attributes inherited from Fling::Resource
Fling::Guid m_Guid
 

Detailed Description

A JsonFile provides an interface for easily using JSON files.

Constructor & Destructor Documentation

◆ JsonFile()

Fling::JsonFile::JsonFile ( Guid  t_ID)
explicit

Construct a new JsonFile object.

Parameters
t_IDThe GUID that represents the file path to this JsonFile.

Member Function Documentation

◆ GetJsonData()

json& Fling::JsonFile::GetJsonData ( )
inline

Get a reference to the current Json data that is loaded from this file.

Returns
Reference to the current json data

◆ LoadJsonFile()

void Fling::JsonFile::LoadJsonFile ( )
private

Loads the JsonFile based on Guid path.

Note
All Guid paths are relative to the assets directory.

Field Documentation

◆ m_JsonData

json Fling::JsonFile::m_JsonData
private

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