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


C++ IPropertyTree::getPropBool方法代码示例

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


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

示例1: readAllLogFilters

void CLogContentFilter::readAllLogFilters(IPropertyTree* cfg)
{
    bool groupFilterRead = false;
    VStringBuffer xpath("Filters/Filter[@type='%s']", espLogContentGroupNames[ESPLCGBackEndResp]);
    IPropertyTree* filter = cfg->queryBranch(xpath.str());
    if (filter && filter->hasProp("@value"))
    {
        logBackEndResp = filter->getPropBool("@value");
        groupFilterRead = true;
    }

    xpath.setf("Filters/Filter[@type='%s']", espLogContentGroupNames[ESPLCGBackEndReq]);
    filter = cfg->queryBranch(xpath.str());
    if (filter && filter->hasProp("@value"))
    {
        logBackEndReq = filter->getPropBool("@value");
        groupFilterRead = true;
    }

    for (unsigned i = 0; i < ESPLCGBackEndReq; i++)
    {
        if (readLogFilters(cfg, i))
            groupFilterRead = true;
    }

    if (!groupFilterRead)
    {
        groupFilters.clear();
        readLogFilters(cfg, ESPLCGAll);
    }
}
开发者ID:Michael-Gardner,项目名称:HPCC-Platform,代码行数:31,代码来源:loggingagentbase.cpp

示例2: getIsOpt

bool getIsOpt(const IPropertyTree &graphNode)
{
    if (graphNode.hasProp("att[@name='_isOpt']"))
        return graphNode.getPropBool("att[@name='_isOpt']/@value", false);
    else
        return graphNode.getPropBool("att[@name='_isIndexOpt']/@value", false);
}
开发者ID:atodor,项目名称:HPCC-Platform,代码行数:7,代码来源:referencedfilelist.cpp

示例3:

IPropertyTree *CEspBinding::ensureNavLink(IPropertyTree &folder, const char *name, const char *path, const char *tooltip, const char *menuname, const char *navPath, unsigned relPosition, bool force)
{
    StringBuffer xpath;
    xpath.appendf("Link[@name=\"%s\"]", name);

    bool addNew = true;
    IPropertyTree *ret = folder.queryPropTree(xpath.str());
    if (ret)
    {
        bool forced = ret->getPropBool("@force");
        if (forced || !force)
            return ret;

        addNew = false;
    }

    if (addNew)
        ret=createPTree("Link");

    ret->setProp("@name", name);
    ret->setProp("@tooltip", tooltip);
    ret->setProp("@path", path);
    ret->setProp("@menu", menuname);
    ret->setProp("@navPath", navPath);
    ret->setPropInt("@relPosition", relPosition);
    ret->setPropBool("@force", force);

    if (addNew)
        folder.addPropTree("Link", ret);

    return ret;
}
开发者ID:AlexLuya,项目名称:HPCC-Platform,代码行数:32,代码来源:espprotocol.cpp

示例4: appendSchemaResource

 void appendSchemaResource(IPropertyTree &res, ILoadedDllEntry *dll)
 {
     if (!dll || (flags & WWV_OMIT_SCHEMAS))
         return;
     if (res.getPropInt("@seq", -1)>=0 && res.hasProp("@id"))
     {
         int id = res.getPropInt("@id");
         size32_t len = 0;
         const void *data = NULL;
         if (dll->getResource(len, data, "RESULT_XSD", (unsigned) id) && len>0)
         {
             buffer.append("<XmlSchema name=\"").append(res.queryProp("@name")).append("\">");
             if (res.getPropBool("@compressed"))
             {
                 StringBuffer decompressed;
                 decompressResource(len, data, decompressed);
                 if (flags & WWV_CDATA_SCHEMAS)
                     buffer.append("<![CDATA[");
                 buffer.append(decompressed.str());
                 if (flags & WWV_CDATA_SCHEMAS)
                     buffer.append("]]>");
             }
             else
                 buffer.append(len, (const char *)data);
             buffer.append("</XmlSchema>");
         }
     }
 }
开发者ID:JamesDeFabia,项目名称:HPCC-Platform,代码行数:28,代码来源:wuwebview.cpp

示例5: init

 void init()
 {
     VStringBuffer xpath("PackageMap[@id='%s']", pmid.str());
     globalLock.setown(querySDS().connect("/PackageMaps", myProcessSession(), RTM_LOCK_WRITE|RTM_CREATE_QUERY, SDS_LOCK_TIMEOUT));
     packageMaps = globalLock->queryRoot();
     pmExisting = packageMaps->queryPropTree(xpath);
     if (pmExisting && !pmExisting->getPropBool("@multipart", false))
         convertExisting();
 }
开发者ID:Josh-Googler,项目名称:HPCC-Platform,代码行数:9,代码来源:ws_packageprocessService.cpp

示例6: MakeStringException

 CDaliServixFilter(IPropertyTree &filter)
 {
     const char *subnet = filter.queryProp("@subnet");
     const char *mask = filter.queryProp("@mask");
     if (!ipSubNet.set(subnet, mask))
         throw MakeStringException(0, "Invalid sub net definition: %s, %s", subnet, mask);
     dir.set(filter.queryProp("@directory"));
     trace = filter.getPropBool("@trace");
 }
开发者ID:jastephe,项目名称:HPCC-Platform,代码行数:9,代码来源:rmtfile.cpp

示例7: loadBuiltIns

CEspConfig::CEspConfig(IProperties* inputs, IPropertyTree* envpt, IPropertyTree* procpt, bool isDali)
{
    hsami_=0;
    serverstatus=NULL;
    useDali=false;
    
    if(inputs)
        m_inputs.setown(inputs);

    if(!envpt || !procpt)
        return;

    m_envpt.setown(envpt);
    m_cfg.setown(procpt);

    loadBuiltIns();   
   
    // load options
    const char* level = m_cfg->queryProp("@logLevel");
    m_options.logLevel = level ? atoi(level) : LogMin;
    m_options.logReq = m_cfg->getPropBool("@logRequests", true);
    m_options.logResp = m_cfg->getPropBool("@logResponses", false);
    m_options.frameTitle.set(m_cfg->queryProp("@name"));
    m_options.slowProcessingTime = m_cfg->getPropInt("@slowProcessingTime", 30) * 1000; //in msec

    if (!m_cfg->getProp("@name", m_process))
    {
        ERRLOG("EspProcess name not found");
    }
    else
    {
        DBGLOG("ESP process name [%s]", m_process.str());

        IPropertyTreeIterator *pt_iter = NULL;
        StringBuffer daliservers;
        if (m_cfg->getProp("@daliServers", daliservers))
            initDali(daliservers.str());

#ifndef _DEBUG
        startPerformanceMonitor(m_cfg->getPropInt("@perfReportDelay", 60)*1000);
#endif

        //get the local computer name:              
        m_cfg->getProp("@computer", m_computer);

        //get the local computer information:               
        StringBuffer xpath;
        xpath.appendf("Hardware/Computer[@name=\"%s\"]", m_computer.str());

        IPropertyTree *computer = m_envpt->queryPropTree(xpath.str());
        if (computer)
        {
            StringBuffer address;
            computer->getProp("@netAddress", address);

            int port = m_cfg->getPropInt("@port", 1500);
            if(strcmp(address.str(), ".") == 0)
            {
                GetHostName(address.clear());
            }
            m_address.set(address.str(), (unsigned short) port);
        }
      
        xpath.clear();
        xpath.append("EspService");
 
        pt_iter = m_cfg->getElements(xpath.str());

        if (pt_iter!=NULL)
        {
            IPropertyTree *ptree = NULL;

            pt_iter->first();

            while(pt_iter->isValid())
            {
                ptree = &pt_iter->query();
                if (ptree)
                {
                    srv_cfg *svcfg = new srv_cfg;

                    ptree->getProp("@name", svcfg->name);
                    ptree->getProp("@type", svcfg->type);
                    ptree->getProp("@plugin", svcfg->plugin);
                    fixPlugin(svcfg->plugin);

                    map<string, srv_cfg*>::value_type en(svcfg->name.str(), svcfg);
                    m_services.insert(en);
                }               
                pt_iter->next();
            }
    
            pt_iter->Release();
            pt_iter=NULL;
        }

        xpath.clear();
        xpath.append("EspProtocol");
 
        pt_iter = m_cfg->getElements(xpath.str());
//.........这里部分代码省略.........
开发者ID:Josh-Googler,项目名称:HPCC-Platform,代码行数:101,代码来源:espcfg.cpp

示例8: determineInstallFiles

//---------------------------------------------------------------------------
//  determineInstallFiles
//---------------------------------------------------------------------------
int CConfigGenEngine::determineInstallFiles(IPropertyTree& processNode, CInstallFiles& installFiles) const
{
    try
    {
        m_pCallback->printStatus(STATUS_NORMAL, NULL, NULL, NULL, 
            "Determining files to install for %s", processNode.queryProp("@name"));

        StringBuffer compListPath(CONFIGGEN_COMP_LIST);
        if (m_inDir.length())
            compListPath.clear().append(m_inDir).append(PATHSEPCHAR).append(CONFIGGEN_COMP_LIST);

        Owned<IPropertyTree> deployNode = createPTreeFromXMLFile(compListPath.str(), ipt_caseInsensitive);
        StringBuffer srcFilePath;
        srcFilePath.ensureCapacity(_MAX_PATH);
        const bool bFindStartable = &m_process == &processNode && m_startable == unknown;
        const bool bFindStoppable = &m_process == &processNode && m_stoppable == unknown;

        StringBuffer xpath;
        xpath.appendf("Component[@name=\"%s\"]",processNode.queryProp("@buildSet"));
        IPropertyTree* pComponent = deployNode->queryPropTree(xpath.str());

        if (!pComponent)
        {
            m_pCallback->printStatus(STATUS_NORMAL, NULL, NULL, NULL, 
                "Cannot find files to install for %s", processNode.queryProp("@buildSet"));
            return 0;
        }

        Owned<IPropertyTreeIterator> iter = pComponent->getElements("File");
        ForEach(*iter)
        {
            IPropertyTree* pFile = &iter->query();
            const char* name = pFile->queryProp("@name");

            if (!stricmp(name, "deploy_map.xml"))
                continue;

            if (bFindStartable && !strnicmp(name, "startup", sizeof("startup")-1))
                m_startable = yes;

            if (bFindStoppable && !strnicmp(name, "stop", sizeof("stop")-1))
                m_stoppable = yes;

            const char* method  = pFile->queryProp("@method");
            if (method && !stricmp(method, "schema"))
                continue;

            //if we are not deploying build files and method is copy then ignore this file
            if (!(m_deployFlags & DEFLAGS_BUILDFILES) && (!method || !stricmp(method, "copy")))
                continue;

            const char* srcPath = pFile->queryProp("@srcPath");
            const char* destPath= pFile->queryProp("@destPath");
            const char* destName= pFile->queryProp("@destName");
            bool bCacheable     = pFile->getPropBool("@cache", false);

            // Get source filespec
            if (srcPath && !strcmp(srcPath, "@temp"))
            {
                char tempfile[_MAX_PATH];
                getTempPath(tempfile, sizeof(tempfile), m_name);
                srcFilePath.clear().append(tempfile).append(name);
            }
            else
            {
                srcFilePath.clear().append(m_inDir);

        //adjust source paths
                if (srcPath && 0!=strcmp(srcPath, "."))
                {
                    if (!strncmp(srcPath, "..", 2) && (*(srcPath+2)=='/' || *(srcPath+2)=='\\'))
                    {
                        StringBuffer reldir(srcPath);
                        reldir.replace('/', '\\');

                        while (!strncmp(reldir.str(), "..\\", 3))
                        {
                            srcFilePath.setLength( srcFilePath.length() - 1 ); //remove last char PATHSEPCHAR
                            const char* tail = pathTail(srcFilePath.str());
                            srcFilePath.setLength( tail - srcFilePath.str() );
                            reldir.remove(0, 3);
                        }
                        srcFilePath.append(reldir).append(PATHSEPCHAR);
                    }
                    else
                        srcFilePath.append(srcPath).append(PATHSEPCHAR);
                }
                srcFilePath.append(name);
            }

            std::string sDestName;
            if (method && (!stricmp(method, "esp_service_module") || !stricmp(method, "esp_plugin")))
            {
                //if this is xsl transformation and we are not generating config files then ignore
                //
                if (!(m_deployFlags & DEFLAGS_CONFIGFILES) && !stricmp(method, "esp_service_module"))
                    continue;
//.........这里部分代码省略.........
开发者ID:EwokVillage,项目名称:HPCC-Platform,代码行数:101,代码来源:configgenengine.cpp


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