本文整理汇总了C++中reference::getBool方法的典型用法代码示例。如果您正苦于以下问题:C++ reference::getBool方法的具体用法?C++ reference::getBool怎么用?C++ reference::getBool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类reference
的用法示例。
在下文中一共展示了reference::getBool方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetDSN
std::string GetDSN()
{
std::ostringstream conninfo("connect_timeout = '5'");
std::string item;
if (conf->readString("host", item))
conninfo << " host = '" << item << "'";
if (conf->readString("port", item))
conninfo << " port = '" << item << "'";
if (conf->readString("name", item))
conninfo << " dbname = '" << item << "'";
if (conf->readString("user", item))
conninfo << " user = '" << item << "'";
if (conf->readString("pass", item))
conninfo << " password = '" << item << "'";
if (conf->getBool("ssl"))
conninfo << " sslmode = 'require'";
else
conninfo << " sslmode = 'disable'";
return conninfo.str();
}
示例2: ModeHandler
CustomPrefixMode(Module* parent, ConfigTag* Tag)
: ModeHandler(parent, Tag->getString("name"), 0, PARAM_ALWAYS, MODETYPE_CHANNEL), tag(Tag)
{
list = true;
m_paramtype = TR_NICK;
std::string v = tag->getString("prefix");
prefix = v.c_str()[0];
v = tag->getString("letter");
mode = v.c_str()[0];
rank = tag->getInt("rank");
levelrequired = tag->getInt("ranktoset", rank);
depriv = tag->getBool("depriv", true);
}
示例3: PrefixMode
CustomPrefixMode(Module* parent, const std::string& Name, char Letter, char Prefix, ConfigTag* Tag)
: PrefixMode(parent, Name, Letter, 0, Prefix)
, tag(Tag)
{
unsigned long rank = tag->getUInt("rank", 0, 0, UINT_MAX);
unsigned long setrank = tag->getUInt("ranktoset", prefixrank, rank, UINT_MAX);
unsigned long unsetrank = tag->getUInt("ranktounset", setrank, setrank, UINT_MAX);
bool depriv = tag->getBool("depriv", true);
this->Update(rank, setrank, unsetrank, depriv);
ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Created the %s prefix: letter=%c prefix=%c rank=%u ranktoset=%u ranktounset=%i depriv=%d",
name.c_str(), GetModeChar(), GetPrefix(), GetPrefixRank(), GetLevelRequired(true), GetLevelRequired(false), CanSelfRemove());
}