当前位置: 首页>>代码示例>>C++>>正文


C++ ConfigFile::getBool方法代码示例

本文整理汇总了C++中ConfigFile::getBool方法的典型用法代码示例。如果您正苦于以下问题:C++ ConfigFile::getBool方法的具体用法?C++ ConfigFile::getBool怎么用?C++ ConfigFile::getBool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ConfigFile的用法示例。


在下文中一共展示了ConfigFile::getBool方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: comm

CommConfigurable::CommConfigurable(ConfigFile & configFile, Log & log)
  : comm() {
  // Should we use CommPlayer?
  if (configFile.getBool("configurable/comm/useCommPlayer", true)) {
    comm.push_back(new CommPlayer(configFile, log));
  }
  // Should we use CommRemote?
  if (configFile.getBool("configurable/comm/useCommRemote", true)) {
    comm.push_back(new CommRemote(configFile, log));
  }
}
开发者ID:rcahoon,项目名称:2010CMRoboBitsGroup3,代码行数:11,代码来源:CommConfigurable.cpp

示例2: Log

LogConfigurable::LogConfigurable(ConfigFile & configFile)
  : Log(configFile),
    log() {
  // Should we use LogToRemote?
  if (configFile.getBool("configurable/log/useLogToRemote", true)) {
    log.push_back(new LogToRemote(configFile));
  }
  // Should we use LogToText?
  if (configFile.getBool("configurable/log/useLogToText", true)) {
    log.push_back(new LogToText(configFile));
  }
  // Should we use LogToFile?
  if (configFile.getBool("configurable/log/useLogToFile", true)) {
    log.push_back(new LogToFile(configFile));
  }
}
开发者ID:rcahoon,项目名称:2010CMRoboBitsGroup3,代码行数:16,代码来源:LogConfigurable.cpp

示例3: OpenLastFiles

void SubMainFrame::OpenLastFiles()
{
    ConfigFile *clientConfig = Globals::Instance()->GetConfig();

    //Open the last file in the history
    if(clientConfig->getBool("AutoOpenLastSession", true))
    {
        std::vector<std::string> listFileSession =  clientConfig->getArray("RecentFileSession");
        for(std::vector<std::string>::iterator iter = listFileSession.begin(); iter != listFileSession.end(); iter++)
        {
            OpenFile(wxString((*iter).c_str(), wxConvLocal));
            wxLogDebug(wxT("Auto Opened: %s"), wxString(*iter));
        }
    }
}
开发者ID:murdockq,项目名称:OpenPaint,代码行数:15,代码来源:SubMainFrame.cpp

示例4: initSection

bool Annotation::initSection(const std::string &entry, const std::string &cfgname)
{
    AnnotationCfgEntry e, *ne;

    ConfigFile *cfg = s2e()->getConfig();
    llvm::raw_ostream &os  = s2e()->getWarningsStream();
    std::vector<std::string> cfgkeys = s2e()->getConfig()->getListKeys(entry);

    e.cfgname = cfgname;

    bool ok;


    e.isActive = cfg->getBool(entry + ".active", false, &ok);
    if (!ok) {
        os << "You must specify whether the entry is active in " << entry << ".active!" << '\n';
        return false;
    }

    e.module = cfg->getString(entry + ".module", "", &ok);
    if (!ok) {
        os << "You must specify a valid module for " << entry << ".module!" << '\n';
        return false;
    }else {
        if (!m_moduleExecutionDetector->isModuleConfigured(e.module)) {
            os << "The module " << e.module << " is not configured in ModuleExecutionDetector!" << '\n';
            return false;
        }
    }


    e.address = cfg->getInt(entry + ".address", 0, &ok);
    if (!ok) {
        os << "You must specify a valid address for " << entry << ".address!" << '\n';
        return false;
    }

    if (!m_functionMonitor || !m_moduleExecutionDetector || !m_osMonitor) {
        os << "You must enable FunctionMonitor, ModuleExecutionDetector, and an OS monitor plugin\n";
        return false;
    }

    // Check if this is a call or an instruction annotation
    e.annotation = "";
    if (std::find(cfgkeys.begin(), cfgkeys.end(), "callAnnotation") != cfgkeys.end())	{
        e.annotation = cfg->getString(entry + ".callAnnotation", e.annotation, &ok);
        e.isCallAnnotation = true;
    } else if (std::find(cfgkeys.begin(), cfgkeys.end(), "instructionAnnotation") != cfgkeys.end())	{
        e.annotation = cfg->getString(entry + ".instructionAnnotation", e.annotation, &ok);
        e.isCallAnnotation = false;
    }

    // Assert that this is a properly attached annotation
    if (!ok || e.annotation=="") {
        os << "You must specify either " << entry << ".callAnnotation or .instructionAnnotation!" << '\n';
        return false;
    }

    // Get additional annotation-specific options
    e.paramCount = 0;
    e.beforeInstruction = false;
    e.switchInstructionToSymbolic = false;
    if (e.isCallAnnotation) {
        // Get the number of arguments of the annotated subroutine
        e.paramCount = cfg->getInt(entry + ".paramcount", e.paramCount, &ok);
        if (!ok) {
            os << "You must specify a valid number of function parameters for " << entry << ".paramcount!" << '\n';
            return false;
        }
    } else {
        // Whether to call the annotation before or after the instruction
        e.beforeInstruction = cfg->getBool(entry + ".beforeInstruction", e.beforeInstruction, &ok);
        e.switchInstructionToSymbolic = cfg->getBool(entry + ".switchInstructionToSymbolic", e.switchInstructionToSymbolic, &ok);
    }

    ne = new AnnotationCfgEntry(e);
    m_entries.insert(ne);

    return true;
}
开发者ID:0bliv10n,项目名称:s2e,代码行数:80,代码来源:Annotation.cpp

示例5: isBlueTeam

GameControllerAlwaysPlaying::GameControllerAlwaysPlaying(ConfigFile & configFile, Log & _log)
 : isBlueTeam(configFile.getBool("gameController/isBlueTeam", 1)),
   log(_log)
{
}
开发者ID:rcahoon,项目名称:2010CMRoboBitsGroup3,代码行数:5,代码来源:GameControllerAlwaysPlaying.cpp


注:本文中的ConfigFile::getBool方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。