|
|
|
@ -819,21 +819,19 @@ bool CConfigure::isDefined(ErrorLevel level, const std::string §ion, const s
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CConfigure::checkAutoLink(const std::string §ion, const std::string &pname, const std::string &key, bool &rval)
|
|
|
|
void CConfigure::checkAutoLink(const std::string §ion, const std::string &pname, const std::string &key, bool &rval) const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (data.contains(key))
|
|
|
|
const auto autolinkModule = GetAutolinkModule(key);
|
|
|
|
|
|
|
|
if (' ' != autolinkModule)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auto ismods = data.contains(g_Keys.modules.modules);
|
|
|
|
auto ismods = data.contains(g_Keys.modules.modules);
|
|
|
|
const auto mods(ismods ? data[g_Keys.modules.modules].get<std::string>() : "");
|
|
|
|
const auto mods(ismods ? data[g_Keys.modules.modules].get<std::string>() : "");
|
|
|
|
const auto c = data[key].get<std::string>().at(0);
|
|
|
|
if (std::string::npos == mods.find(autolinkModule))
|
|
|
|
if (std::string::npos == mods.find(c))
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::cerr << "ERROR: [" << section << ']' << pname << " module '" << c << "' not a configured module" << std::endl;
|
|
|
|
std::cerr << "ERROR: [" << section << ']' << pname << " module '" << autolinkModule << "' not a configured module" << std::endl;
|
|
|
|
rval = true;
|
|
|
|
rval = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
|
|
|
|
data[key] = nullptr;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
std::string CConfigure::getDataRefreshType(ERefreshType type) const
|
|
|
|
std::string CConfigure::getDataRefreshType(ERefreshType type) const
|
|
|
|
@ -865,7 +863,7 @@ void CConfigure::badParam(const std::string &key) const
|
|
|
|
bool CConfigure::checkModules(std::string &m) const
|
|
|
|
bool CConfigure::checkModules(std::string &m) const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool rval = false; // return true on error
|
|
|
|
bool rval = false; // return true on error
|
|
|
|
for(unsigned i=0; i<m.size(); i++)
|
|
|
|
for (unsigned i=0; i<m.size(); i++)
|
|
|
|
if (islower(m[i]))
|
|
|
|
if (islower(m[i]))
|
|
|
|
m[i] = toupper(m[i]);
|
|
|
|
m[i] = toupper(m[i]);
|
|
|
|
|
|
|
|
|
|
|
|
@ -988,7 +986,7 @@ bool CConfigure::GetBoolean(const std::string &key) const
|
|
|
|
|
|
|
|
|
|
|
|
char CConfigure::GetAutolinkModule(const std::string &key) const
|
|
|
|
char CConfigure::GetAutolinkModule(const std::string &key) const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char c = 0;
|
|
|
|
char c = ' ';
|
|
|
|
if (data.contains(key))
|
|
|
|
if (data.contains(key))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (data[key].is_string())
|
|
|
|
if (data[key].is_string())
|
|
|
|
|