![]() |
TrinityCore
|
#include <Config.h>
Public Member Functions | |
| bool | LoadInitial (std::string file, std::vector< std::string > args, std::string &error) |
| Method used only for loading main configuration files (authserver.conf and worldserver.conf) | |
| bool | LoadAdditionalFile (std::string file, bool keepOnReload, std::string &error) |
| bool | LoadAdditionalDir (std::string const &dir, bool keepOnReload, std::vector< std::string > &loadedFiles, std::vector< std::string > &errors) |
| std::vector< std::string > | OverrideWithEnvVariablesIfAny () |
| Overrides configuration with environment variables and returns overridden keys. | |
| bool | Reload (std::vector< std::string > &errors) |
| std::string | GetStringDefault (std::string const &name, const std::string &def, bool quiet=false) const |
| bool | GetBoolDefault (std::string const &name, bool def, bool quiet=false) const |
| int | GetIntDefault (std::string const &name, int def, bool quiet=false) const |
| float | GetFloatDefault (std::string const &name, float def, bool quiet=false) const |
| std::string const & | GetFilename () |
| std::vector< std::string > const & | GetArguments () const |
| std::vector< std::string > | GetKeysByString (std::string const &name) |
Static Public Member Functions | |
| static ConfigMgr * | instance () |
Private Member Functions | |
| ConfigMgr ()=default | |
| ConfigMgr (ConfigMgr const &)=delete | |
| ConfigMgr & | operator= (ConfigMgr const &)=delete |
| ~ConfigMgr ()=default | |
| template<class T > | |
| T | GetValueDefault (std::string const &name, T def, bool quiet) const |
|
privatedefault |
|
privatedelete |
|
privatedefault |
| std::vector< std::string > const & ConfigMgr::GetArguments | ( | ) | const |
Definition at line 354 of file Config.cpp.
| bool ConfigMgr::GetBoolDefault | ( | std::string const & | name, |
| bool | def, | ||
| bool | quiet = false |
||
| ) | const |
Definition at line 323 of file Config.cpp.
References GetValueDefault(), and TC_LOG_ERROR.
| std::string const & ConfigMgr::GetFilename | ( | ) |
Definition at line 348 of file Config.cpp.
| float ConfigMgr::GetFloatDefault | ( | std::string const & | name, |
| float | def, | ||
| bool | quiet = false |
||
| ) | const |
Definition at line 343 of file Config.cpp.
References GetValueDefault().
| int ConfigMgr::GetIntDefault | ( | std::string const & | name, |
| int | def, | ||
| bool | quiet = false |
||
| ) | const |
Definition at line 338 of file Config.cpp.
References GetValueDefault().
| std::vector< std::string > ConfigMgr::GetKeysByString | ( | std::string const & | name | ) |
Definition at line 359 of file Config.cpp.
| std::string ConfigMgr::GetStringDefault | ( | std::string const & | name, |
| const std::string & | def, | ||
| bool | quiet = false |
||
| ) | const |
Definition at line 316 of file Config.cpp.
References GetValueDefault().
|
private |
Definition at line 246 of file Config.cpp.
References TC_LOG_ERROR, and TC_LOG_WARN.
Referenced by GetBoolDefault(), GetFloatDefault(), GetIntDefault(), and GetStringDefault().
|
static |
| bool ConfigMgr::LoadAdditionalDir | ( | std::string const & | dir, |
| bool | keepOnReload, | ||
| std::vector< std::string > & | loadedFiles, | ||
| std::vector< std::string > & | errors | ||
| ) |
Definition at line 175 of file Config.cpp.
References LoadAdditionalFile().
| bool ConfigMgr::LoadAdditionalFile | ( | std::string | file, |
| bool | keepOnReload, | ||
| std::string & | error | ||
| ) |
Definition at line 158 of file Config.cpp.
Referenced by LoadAdditionalDir(), and Reload().
| bool ConfigMgr::LoadInitial | ( | std::string | file, |
| std::vector< std::string > | args, | ||
| std::string & | error | ||
| ) |
Method used only for loading main configuration files (authserver.conf and worldserver.conf)
Definition at line 140 of file Config.cpp.
Referenced by Reload().
| std::vector< std::string > ConfigMgr::OverrideWithEnvVariablesIfAny | ( | ) |
Overrides configuration with environment variables and returns overridden keys.
Definition at line 201 of file Config.cpp.
Referenced by Reload().
| bool ConfigMgr::Reload | ( | std::vector< std::string > & | errors | ) |
Definition at line 230 of file Config.cpp.
References LoadAdditionalFile(), LoadInitial(), and OverrideWithEnvVariablesIfAny().