Holds configuration settings that affect the behavior of the game.
More...
#include <Configuration.hpp>
|
| Configuration (std::string const &configFile) noexcept(false) |
| Loads the configuration from the given file path. More...
|
|
virtual | ~Configuration ()=default |
|
template<typename... Path> |
auto | setting (Path const &...path) -> decltype(reader.navigate(path...)) |
| Access values in the configuration. More...
|
|
Holds configuration settings that affect the behavior of the game.
Configuration files are in JSON format - http://www.json.org/
chesspp::config::Configuration::Configuration |
( |
std::string const & |
configFile | ) |
|
|
inlinenoexcept |
Loads the configuration from the given file path.
- Parameters
-
configFile | the relative path to the configuration file. Must end in .json |
- Exceptions
-
virtual chesspp::config::Configuration::~Configuration |
( |
| ) |
|
|
virtualdefault |
std::string chesspp::config::Configuration::executablePath |
( |
| ) |
|
|
staticprotected |
Get the path to the directory the executable is in.
- Returns
- Path to the directory the executable is in.
template<typename... Path>
auto chesspp::config::Configuration::setting |
( |
Path const &... |
path | ) |
-> decltype(reader.navigate(path...))
|
|
inline |
The chessp::util::JsonReader for reading the configuration values.
std::string chesspp::config::Configuration::res_path |
|
protected |
Stores the path to the directory where configuration paths are relative to.
This may not be the same as the directory containing the executable.
The documentation for this class was generated from the following files: