A base class for json data files.
More...
#include <datafilebase.h>
A base class for json data files.
◆ DataFileBase()
Nickvision::App::DataFileBase::DataFileBase |
( |
const std::string & | key, |
|
|
const std::string & | appName ) |
Constructs a DataFileBase, loading the file from disk.
- Parameters
-
key | The key of the config file |
appName | The name of the application the data file belongs to |
- Exceptions
-
std::invalid_argument | Thrown if key is empty |
std::invalid_argument | Thrown if appName is empty |
◆ ~DataFileBase()
virtual Nickvision::App::DataFileBase::~DataFileBase |
( |
| ) |
|
|
virtualdefault |
◆ getKey()
const std::string & Nickvision::App::DataFileBase::getKey |
( |
| ) |
const |
Gets the key of the config file.
- Returns
- The key of the config file
◆ save()
bool Nickvision::App::DataFileBase::save |
( |
| ) |
|
Saves the config file to disk.
- Returns
- True if saved to disk, else false
◆ saved()
Gets the Saved event.
- Returns
- The Saved event
◆ m_json
boost::json::object Nickvision::App::DataFileBase::m_json |
|
mutableprotected |
The documentation for this class was generated from the following file: