23 JsonFile(File jsonFile,
const Identifier& defaultProperty,
const String& defaultFormat);
81 JsonException(
const String& whatHappened,
const String& whenDidItHappen);
83 char const*
what()
const noexcept override;
An exception for the JSON file class.
Definition JsonFile.h:79
JsonException(const String &whatHappened, const String &whenDidItHappen)
Definition JsonFile.cpp:159
char const * what() const noexcept override
Definition JsonFile.cpp:165
String m_whenDidItHappen
Definition JsonFile.h:92
String when() const
Get the "when" status of the exception. This is the context behind the "what" action.
Definition JsonFile.cpp:167
void initialise()
Parse the file if it exists, or create it if it doesn't. Data is parsed to m_data;.
Definition JsonFile.cpp:61
var getDefaultProperty() const
Get the variant for the default property.
Definition JsonFile.h:28
void saveInternal()
Save any changes made to m_data back to the Json file.
Definition JsonFile.cpp:92
JsonFile(File jsonFile, const Identifier &defaultProperty, const String &defaultFormat)
Simple helper class for handling json files. It will attempt to create a json file with the given def...
Definition JsonFile.cpp:5
void createJsonFromDefaultFormat()
Generate the JSON file using the default format - used in cases where JSON fails to load.
Definition JsonFile.cpp:82
const String & getDefaultFormat() const
Gets the underlying default formatted json, this is used as a fallback when an invalid input is passe...
Definition JsonFile.h:35
void save()
Call save internal.
Definition JsonFile.cpp:134
Identifier m_defaultProperty
Definition JsonFile.h:68
var m_data
The parsed json data.
Definition JsonFile.h:55
File m_jsonFile
The json file.
Definition JsonFile.h:60
String m_defaultFormat
Definition JsonFile.h:69
Definition AirAbsorptionFilter.cpp:2