matf-rg-engine 1.0.0
Base for project for the Computer Graphics course at Faculty of Mathematics, University of Belgrade
|
Loads and stores the configuration file. More...
#include <Configuration.hpp>
Public Types | |
using | json = nlohmann::json |
Public Member Functions | |
void | initialize () |
Initialize the Configuration class. | |
Static Public Member Functions | |
static json & | config () |
Get the configuration file. | |
static Configuration * | instance () |
Get the instance of the Configuration class. | |
Static Private Member Functions | |
static std::filesystem::path | get_config_path () |
Get the path to the configuration file. | |
static json | create_default () |
Create the default configuration file. | |
Private Attributes | |
json | m_config |
The configuration file. | |
Static Private Attributes | |
static constexpr std::string_view | CONFIG_FILE_NAME = "config.json" |
The default name of the configuration file. | |
Friends | |
class | App |
Loads and stores the configuration file.
The configuration file is loaded from the default path: CONFIG_FILE_NAME=config.json. The configuration file is stored in a static variable, so it is shared between all instances of the Configuration class.
using engine::util::Configuration::json = nlohmann::json |
|
static |
Get the configuration file.
|
static |
Get the instance of the Configuration class.
void engine::util::Configuration::initialize | ( | ) |
Initialize the Configuration class.
|
staticprivate |
Get the path to the configuration file.
|
staticprivate |
Create the default configuration file.
|
friend |
|
staticconstexprprivate |
The default name of the configuration file.
|
private |
The configuration file.