Config class.
More...
#include <Config.hpp>
|
| Config (const std::string &filename) |
|
| ~Config () |
|
| Config (const Config &other)=delete |
|
boost::property_tree::ptree & | tree () |
|
void | save () |
|
void | load () |
|
template<class T > |
T | get (const std::string &key, T defaultVar) |
|
|
static Config * | instance () |
|
template<class T > |
static T | g (const std::string &key, T defaultVar) |
|
Config class.
Using Boost ptree struct. Config file hashing and buffering in memory. (You can't get an instance of Config from constructor) Please call Config::instance to get an instance of Config.
Config::Config |
( |
const std::string & |
filename | ) |
|
Config::Config |
( |
const Config & |
other | ) |
|
|
delete |
template<class T >
static T Config::g |
( |
const std::string & |
key, |
|
|
T |
defaultVar |
|
) |
| |
|
inlinestatic |
template<class T >
T Config::get |
( |
const std::string & |
key, |
|
|
T |
defaultVar |
|
) |
| |
|
inline |
This method create param if not exist
- Template Parameters
-
- Parameters
-
key | string with path like 'general.server.port' |
defaultVar | var used when config var is empty |
- Returns
- defultVar returned if config var is empty
The documentation for this class was generated from the following files:
- /home/travis/build/glitchless/Recast/src/headers/io/configs/Config.hpp
- /home/travis/build/glitchless/Recast/src/core/io/configs/Config.cpp