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


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

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


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

示例1: querySDS

static unsigned fn2(unsigned n, unsigned m, unsigned seed, unsigned depth, StringBuffer &parentname)
{
    if (!Rconn)
        return 0;
    if ((n+m+seed)%25==0) {
        Rconn->commit();
        Rconn->Release();
        Rconn = querySDS().connect("/DAREGRESS",myProcessSession(), 0, 1000000);
        if (!Rconn) {
            ERROR("Failed to connect to /DAREGRESS");
            return 0;
        }
    }
    IPropertyTree *parent = parentname.length()?Rconn->queryRoot()->queryPropTree(parentname.str()):Rconn->queryRoot();
    if (!parent) {
        ERROR1("Failed to connect to %s",parentname.str());
        Rconn->Release();
        Rconn = NULL;
        return 0;
    }
    __int64 val = parent->getPropInt64("val",0);
    parent->setPropInt64("val",n+val);
    val = parent->getPropInt64("@val",0);
    parent->setPropInt64("@val",m+val);
    val = parent->getPropInt64(NULL,0);
    parent->setPropInt64(NULL,seed+val);
    if (!seed)
        return m+n;
    if (n==m)
        return seed;
    if (depth>10)
        return seed+n+m;
    if (seed%7==n%7)
        return n;
    if (seed%7==m%7)
        return m;
    char name[64];
    unsigned v = seed;
    name[0] = 's';
    name[1] = 'u';
    name[2] = 'b';
    unsigned i = 3;
    while (v) {
        name[i++] = ('A'+v%26 );
        v /= 26;
    }
    name[i] = 0;
    unsigned l = parentname.length();
    if (parentname.length())
        parentname.append('/');
    parentname.append(name);
    IPropertyTree *child = parent->queryPropTree(name);
    if (!child) 
        child = parent->addPropTree(name, createPTree(name));
    unsigned ret = fn2(fn2(n,seed,seed*17+11,depth+1,parentname),fn2(seed,m,seed*11+17,depth+1,parentname),seed*19+7,depth+1,parentname);
    parentname.setLength(l);
    return ret;
}
开发者ID:EwokVillage,项目名称:HPCC-Platform,代码行数:58,代码来源:daregress.cpp

示例2: done

    virtual void done()
    {
        StringBuffer scopedName;
        OwnedRoxieString outputName(helper->getOutputName());
        queryThorFileManager().addScope(container.queryJob(), outputName, scopedName);
        Owned<IWorkUnit> wu = &container.queryJob().queryWorkUnit().lock();
        Owned<IWUResult> r = wu->updateResultBySequence(helper->getSequence());
        r->setResultStatus(ResultStatusCalculated);
        r->setResultLogicalName(scopedName.str());
        r.clear();
        wu.clear();

        IPropertyTree &patchProps = patchDesc->queryProperties();
        if (0 != (helper->getFlags() & KDPexpires))
            setExpiryTime(patchProps, helper->getExpiryDays());
        IPropertyTree &originalProps = originalDesc->queryProperties();;
        if (originalProps.queryProp("ECL"))
            patchProps.setProp("ECL", originalProps.queryProp("ECL"));
        if (originalProps.getPropBool("@local"))
            patchProps.setPropBool("@local", true);
        container.queryTempHandler()->registerFile(outputName, container.queryOwner().queryGraphId(), 0, false, WUFileStandard, &clusters);
        Owned<IDistributedFile> patchFile;
        // set part sizes etc
        queryThorFileManager().publish(container.queryJob(), outputName, false, *patchDesc, &patchFile, 0, false);
        try { // set file size
            if (patchFile) {
                __int64 fs = patchFile->getFileSize(true,false);
                if (fs!=-1)
                    patchFile->queryAttributes().setPropInt64("@size",fs);
            }
        }
        catch (IException *e) {
            EXCLOG(e,"keydiff setting file size");
            e->Release();
        }
        // Add a new 'Patch' description to the secondary key.
        DistributedFilePropertyLock lock(newIndexFile);
        IPropertyTree &fileProps = lock.queryAttributes();
        StringBuffer path("Patch[@name=\"");
        path.append(scopedName.str()).append("\"]");
        IPropertyTree *patch = fileProps.queryPropTree(path.str());
        if (!patch) patch = fileProps.addPropTree("Patch", createPTree());
        patch->setProp("@name", scopedName.str());
        unsigned checkSum;
        if (patchFile->getFileCheckSum(checkSum))
            patch->setPropInt64("@checkSum", checkSum);

        IPropertyTree *index = patch->setPropTree("Index", createPTree());
        index->setProp("@name", originalIndexFile->queryLogicalName());
        if (originalIndexFile->getFileCheckSum(checkSum))
            index->setPropInt64("@checkSum", checkSum);
        originalIndexFile->setAccessed();
        newIndexFile->setAccessed();
    }
开发者ID:eagle518,项目名称:HPCC-Platform,代码行数:54,代码来源:thkeydiff.cpp

示例3: beginSubGraph

void LogicalGraphCreator::beginSubGraph(const char * label, bool nested)
{
    savedGraphId.append(subGraphId);
    if (!nested)
        saveSubGraphs();

    if ((subGraphs.ordinality() == 0) && rootSubGraph)
    {
        subGraphs.append(*LINK(rootSubGraph));
        subGraphId = rootGraphId;
        return;
    }

    subGraphId = ++seq;
    IPropertyTree * node = createPTree("node");
    node = curSubGraph()->addPropTree("node", node);
    node->setPropInt64("@id", subGraphId);

    IPropertyTree * graphAttr = node->addPropTree("att", createPTree("att"));
    IPropertyTree * subGraph = graphAttr->addPropTree("graph", createPTree("graph"));
    subGraphs.append(*LINK(subGraph));
    if (!rootSubGraph)
    {
        rootSubGraph.set(subGraph);
        rootGraphId = subGraphId;
    }
}
开发者ID:AlexLuya,项目名称:HPCC-Platform,代码行数:27,代码来源:hqlgraph.cpp

示例4: setSessionTimeout

void CWSESPControlEx::setSessionTimeout(int timeoutMinutes, IPropertyTree& session)
{
    CDateTime timeNow;
    timeNow.setNow();
    time_t simple = timeNow.getSimple() + timeoutMinutes*60;
    session.setPropInt64(PropSessionTimeoutAt, simple);
    session.setPropBool(PropSessionTimeoutByAdmin, true);
}
开发者ID:Michael-Gardner,项目名称:HPCC-Platform,代码行数:8,代码来源:ws_espcontrolservice.cpp

示例5: addIntraGraphEdge

IPropertyTree * addIntraGraphEdge(IPropertyTree * subGraph, unsigned __int64 source, unsigned __int64 target, unsigned outputIndex)
{
    IPropertyTree *edge = createPTree();
    edge->setPropInt64("@target", target);
    edge->setPropInt64("@source", source);

    StringBuffer s;
    edge->setProp("@id", s.append(source).append('_').append(outputIndex).str());
    return subGraph->addPropTree("edge", edge);
}
开发者ID:biddyweb,项目名称:HPCC-Platform,代码行数:10,代码来源:hqlgraph.cpp

示例6: addInterGraphEdge

IPropertyTree * addInterGraphEdge(IPropertyTree * graph, unsigned __int64 sourceGraph, unsigned __int64 targetGraph, unsigned __int64 sourceActivity, unsigned __int64 targetActivity, unsigned outputIndex)
{
    StringBuffer idText;
    IPropertyTree *edge = createPTree();
    edge->setProp("@id", idText.clear().append(sourceGraph).append('_').append(targetGraph).append("_").append(outputIndex).str());
    edge->setPropInt64("@target", sourceGraph);
    edge->setPropInt64("@source", targetGraph);

    addGraphAttributeInt(edge, "_sourceActivity", sourceActivity);
    addGraphAttributeInt(edge, "_targetActivity", targetActivity);
    return graph->addPropTree("edge", edge);
}
开发者ID:biddyweb,项目名称:HPCC-Platform,代码行数:12,代码来源:hqlgraph.cpp

示例7: addComplexGraphEdge

void addComplexGraphEdge(IPropertyTree * graph, unsigned __int64 sourceGraph, unsigned __int64 targetGraph, unsigned __int64 sourceActivity, unsigned __int64 targetActivity, unsigned outputIndex, IAtom * kind, const char * label)
{
    StringBuffer idText;
    IPropertyTree *edge = createPTree();
    edge->setProp("@id", idText.clear().append(sourceGraph).append('_').append(targetGraph).append("_").append(outputIndex).str());
    edge->setPropInt64("@target", sourceGraph);
    edge->setPropInt64("@source", targetGraph);
    if (label)
        edge->setProp("@label", label);
    if (outputIndex)
        addGraphAttributeInt(edge, "_sourceIndex", outputIndex);

    if (kind == dependencyAtom)
        addGraphAttributeBool(edge, "_dependsOn", true);

    addGraphAttributeInt(edge, "_sourceActivity", sourceActivity);
    addGraphAttributeInt(edge, "_targetActivity", targetActivity);
    graph->addPropTree("edge", edge);
}
开发者ID:AlexLuya,项目名称:HPCC-Platform,代码行数:19,代码来源:hqlgraph.cpp

示例8: addSimpleGraphEdge

void addSimpleGraphEdge(IPropertyTree * subGraph, unsigned __int64 source, unsigned __int64 target, unsigned outputIndex, unsigned inputIndex, IAtom * kind, const char * label, bool nWay)
{
    IPropertyTree *edge = createPTree();
    edge->setPropInt64("@target", target);
    edge->setPropInt64("@source", source);
    if (outputIndex != 0)
        addGraphAttributeInt(edge, "_sourceIndex", outputIndex);
    if (inputIndex != 0)
        addGraphAttributeInt(edge, "_targetIndex", inputIndex);
    if (label)
        edge->setProp("@label", label);

    if (kind == dependencyAtom)
        addGraphAttributeBool(edge, "_dependsOn", true);

    if (nWay)
        edge->setPropBool("@nWay", true);

    StringBuffer s;
    edge->setProp("@id", s.append(source).append('_').append(outputIndex).str());
    subGraph->addPropTree("edge", edge);
}
开发者ID:AlexLuya,项目名称:HPCC-Platform,代码行数:22,代码来源:hqlgraph.cpp


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