![]() |
TrinityCore
|
#include <Config.h>
Public Member Functions | |
| ConfigMgr (ConfigMgr const &)=delete | |
| ConfigMgr (ConfigMgr &&)=delete | |
| ConfigMgr & | operator= (ConfigMgr const &)=delete |
| ConfigMgr & | operator= (ConfigMgr &&)=delete |
| bool | LoadInitial (std::string file, std::vector< std::string > args, std::string &error) |
| Method used only for loading main configuration files (bnetserver.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_view name, std::string_view def, bool quiet=false) const |
| bool | GetBoolDefault (std::string_view name, bool def, bool quiet=false) const |
| int32 | GetIntDefault (std::string_view name, int32 def, bool quiet=false) const |
| int64 | GetInt64Default (std::string_view name, int64 def, bool quiet=false) const |
| float | GetFloatDefault (std::string_view 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 ()=default | |
| template<class T , class R = T> | |
| R | GetValueDefault (std::string_view const &name, T def, bool quiet) const |
|
privatedefault |
|
privatedefault |
|
delete |
|
delete |
| std::vector< std::string > const & ConfigMgr::GetArguments | ( | ) | const |
Definition at line 353 of file Config.cpp.
| bool ConfigMgr::GetBoolDefault | ( | std::string_view | name, |
| bool | def, | ||
| bool | quiet = false |
||
| ) | const |
Definition at line 318 of file Config.cpp.
References TC_LOG_ERROR.
| std::string const & ConfigMgr::GetFilename | ( | ) |
Definition at line 347 of file Config.cpp.
| float ConfigMgr::GetFloatDefault | ( | std::string_view | name, |
| float | def, | ||
| bool | quiet = false |
||
| ) | const |
Definition at line 342 of file Config.cpp.
References GetValueDefault().
Definition at line 337 of file Config.cpp.
References GetValueDefault().
Definition at line 332 of file Config.cpp.
References GetValueDefault().
| std::vector< std::string > ConfigMgr::GetKeysByString | ( | std::string const & | name | ) |
Definition at line 358 of file Config.cpp.
| std::string ConfigMgr::GetStringDefault | ( | std::string_view | name, |
| std::string_view | def, | ||
| bool | quiet = false |
||
| ) | const |
Definition at line 311 of file Config.cpp.
|
private |
Definition at line 243 of file Config.cpp.
References TC_LOG_ERROR, and TC_LOG_WARN.
Referenced by GetFloatDefault(), GetInt64Default(), and GetIntDefault().
|
static |
| bool ConfigMgr::LoadAdditionalDir | ( | std::string const & | dir, |
| bool | keepOnReload, | ||
| std::vector< std::string > & | loadedFiles, | ||
| std::vector< std::string > & | errors | ||
| ) |
Definition at line 172 of file Config.cpp.
References LoadAdditionalFile().
| bool ConfigMgr::LoadAdditionalFile | ( | std::string | file, |
| bool | keepOnReload, | ||
| std::string & | error | ||
| ) |
Definition at line 155 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 (bnetserver.conf and worldserver.conf)
Definition at line 137 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 198 of file Config.cpp.
Referenced by Reload().
| bool ConfigMgr::Reload | ( | std::vector< std::string > & | errors | ) |
Definition at line 227 of file Config.cpp.
References LoadAdditionalFile(), LoadInitial(), and OverrideWithEnvVariablesIfAny().