![]() |
AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "Config.h"
Public Member Functions | |
bool | LoadAppConfigs (bool isReload=false) |
bool | LoadModulesConfigs (bool isReload=false, bool isNeedPrintInfo=true) |
void | Configure (std::string const &initFileName, std::vector< std::string > args, std::string_view modulesConfigList={}) |
bool | Reload () |
std::string const | GetFilename () |
std::string const | GetConfigPath () |
std::vector< std::string > const & | GetArguments () const |
std::vector< std::string > | GetKeysByString (std::string const &name) |
template<class T > | |
T | GetOption (std::string const &name, T const &def, bool showLogs=true) const |
std::string | GetStringDefault (std::string const &name, const std::string &def, bool showLogs=true) |
bool | GetBoolDefault (std::string const &name, bool def, bool showLogs=true) |
int | GetIntDefault (std::string const &name, int def, bool showLogs=true) |
float | GetFloatDefault (std::string const &name, float def, bool showLogs=true) |
bool | isDryRun () |
void | setDryRun (bool mode) |
template<> | |
bool | GetOption (std::string const &name, bool const &def, bool showLogs) const |
Static Public Member Functions | |
static ConfigMgr * | instance () |
Private Member Functions | |
ConfigMgr ()=default | |
ConfigMgr (ConfigMgr const &)=delete | |
ConfigMgr & | operator= (ConfigMgr const &)=delete |
~ConfigMgr ()=default | |
bool | LoadInitial (std::string const &file, bool isReload=false) |
Method used only for loading main configuration files (authserver.conf and worldserver.conf) | |
bool | LoadAdditionalFile (std::string file, bool isOptional=false, bool isReload=false) |
template<class T > | |
T | GetValueDefault (std::string const &name, T const &def, bool showLogs=true) const |
Private Attributes | |
bool | dryRun = false |
std::vector< std::string > | _moduleConfigFiles |
|
privatedefault |
|
privatedelete |
|
privatedefault |
void ConfigMgr::Configure | ( | std::string const & | initFileName, |
std::vector< std::string > | args, | ||
std::string_view | modulesConfigList = {} |
||
) |
References Acore::Tokenize().
std::vector< std::string > const & ConfigMgr::GetArguments | ( | ) | const |
bool ConfigMgr::GetBoolDefault | ( | std::string const & | name, |
bool | def, | ||
bool | showLogs = true |
||
) |
std::string const ConfigMgr::GetConfigPath | ( | ) |
Referenced by LoadModulesConfigs().
std::string const ConfigMgr::GetFilename | ( | ) |
float ConfigMgr::GetFloatDefault | ( | std::string const & | name, |
float | def, | ||
bool | showLogs = true |
||
) |
int ConfigMgr::GetIntDefault | ( | std::string const & | name, |
int | def, | ||
bool | showLogs = true |
||
) |
std::vector< std::string > ConfigMgr::GetKeysByString | ( | std::string const & | name | ) |
bool ConfigMgr::GetOption | ( | std::string const & | name, |
bool const & | def, | ||
bool | showLogs | ||
) | const |
References GetValueDefault(), and LOG_ERROR.
T ConfigMgr::GetOption | ( | std::string const & | name, |
T const & | def, | ||
bool | showLogs = true |
||
) | const |
std::string ConfigMgr::GetStringDefault | ( | std::string const & | name, |
const std::string & | def, | ||
bool | showLogs = true |
||
) |
|
private |
References LOG_ERROR, and Acore::ToString().
Referenced by GetOption().
|
static |
|
inline |
References dryRun.
|
private |
Referenced by LoadModulesConfigs().
bool ConfigMgr::LoadAppConfigs | ( | bool | isReload = false | ) |
References LoadInitial().
Referenced by Reload().
|
private |
Method used only for loading main configuration files (authserver.conf and worldserver.conf)
Referenced by LoadAppConfigs().
bool ConfigMgr::LoadModulesConfigs | ( | bool | isReload = false , |
bool | isNeedPrintInfo = true |
||
) |
References _moduleConfigFiles, ABORT, GetConfigPath(), LoadAdditionalFile(), LOG_FATAL, and LOG_INFO.
Referenced by Reload().
bool ConfigMgr::Reload | ( | ) |
References LoadAppConfigs(), and LoadModulesConfigs().
|
private |
Referenced by LoadModulesConfigs().
|
private |
Referenced by isDryRun(), and setDryRun().