本文整理汇总了C++中IRegistry::HasEntry方法的典型用法代码示例。如果您正苦于以下问题:C++ IRegistry::HasEntry方法的具体用法?C++ IRegistry::HasEntry怎么用?C++ IRegistry::HasEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IRegistry
的用法示例。
在下文中一共展示了IRegistry::HasEntry方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
static void
s_ReadSpecificParams(const IRegistry& reg,
const string& section,
SNCSpecificParams* params)
{
if (reg.HasEntry(section, kNCReg_DisableClient, IRegistry::fCountCleared)) {
params->disable = reg.GetBool(section, kNCReg_DisableClient, false);
}
if (reg.HasEntry(section, kNCReg_BlobTTL, IRegistry::fCountCleared)) {
params->blob_ttl = reg.GetInt(section, kNCReg_BlobTTL, 3600);
}
if (reg.HasEntry(section, kNCReg_VerTTL, IRegistry::fCountCleared)) {
params->ver_ttl = reg.GetInt(section, kNCReg_VerTTL, 3600);
}
if (reg.HasEntry(section, kNCReg_TTLUnit, IRegistry::fCountCleared)) {
params->ttl_unit = reg.GetInt(section, kNCReg_TTLUnit, 300);
}
if (reg.HasEntry(section, kNCReg_ProlongOnRead, IRegistry::fCountCleared)) {
params->prolong_on_read = reg.GetBool(section, kNCReg_ProlongOnRead, true);
}
if (reg.HasEntry(section, kNCReg_SearchOnRead, IRegistry::fCountCleared)) {
params->srch_on_read = reg.GetBool(section, kNCReg_SearchOnRead, true);
}
if (reg.HasEntry(section, kNCReg_Quorum, IRegistry::fCountCleared)) {
params->quorum = reg.GetInt(section, kNCReg_Quorum, 2);
}
if (reg.HasEntry(section, kNCReg_FastOnMain, IRegistry::fCountCleared)) {
params->fast_on_main = reg.GetBool(section, kNCReg_FastOnMain, true);
}
if (reg.HasEntry(section, kNCReg_PassPolicy, IRegistry::fCountCleared)) {
string pass_policy = reg.GetString(section, kNCReg_PassPolicy, "any");
if (pass_policy == "no_password") {
params->pass_policy = eNCOnlyWithoutPass;
}
else if (pass_policy == "with_password") {
params->pass_policy = eNCOnlyWithPass;
}
else {
if (pass_policy != "any") {
SRV_LOG(Error, "Incorrect value of '" << kNCReg_PassPolicy
<< "' parameter: '" << pass_policy
<< "', assuming 'any'");
}
params->pass_policy = eNCBlobPassAny;
}
}
}