本文整理汇总了C++中cconfigfile::CVar::asBool方法的典型用法代码示例。如果您正苦于以下问题:C++ CVar::asBool方法的具体用法?C++ CVar::asBool怎么用?C++ CVar::asBool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cconfigfile::CVar
的用法示例。
在下文中一共展示了CVar::asBool方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
//-----------------------------------------------------------------------------
void CBackupService::init()
{
FileManager.init();
setUpdateTimeout(100);
_SaveStall = false;
// set the connection and disconnection callbacks
CUnifiedNetwork::getInstance()->setServiceUpCallback( string("*"), cbConnection, 0);
CUnifiedNetwork::getInstance()->setServiceDownCallback( string("*"), cbDisconnection, 0);
CUnifiedNetwork::getInstance()->setServiceUpCallback( string("BS"), cbConnection, 0);
CUnifiedNetwork::getInstance()->setServiceDownCallback( string("BS"), cbDisconnection, 0);
// Init the sheet Id
CSheetId::init(false);
if (!MasterBSHost.get().empty())
{
IService::getInstance()->addStatusTag("SlaveMode");
IService::getInstance()->setCurrentStatus("WaitingMaster");
BSIsSlave = true;
FileManager.forbidStall();
// I'm a slave, try to contact master
string host = MasterBSHost;
if (host.find (":") == string::npos)
host += ":49990";
CUnifiedNetwork::getInstance()->addService ("BS", CInetAddress(host));
}
// set the initial read state from the config file
CConfigFile::CVar *readState = ConfigFile.getVarPtr("BSReadState");
if (readState != NULL)
BSReadState = readState->asBool();
initWebConnection();
_CallbackServer = new NLNET::CCallbackServer;
_CallbackServer->addCallbackArray(cbSyncArray, sizeofarray(cbSyncArray));
// open the layer 3 callback server if required
if (L3ListeningPort != 0)
_CallbackServer->init(L3ListeningPort);
}