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


C++ Owned::getClear方法代码示例

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


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

示例1: doCreate

    void doCreate(const char *partname, const char *xml, unsigned updateFlags, StringArray &filesNotFound)
    {
        createPart(partname, xml);

        if (pmExisting)
        {
            if (!checkFlag(PKGADD_MAP_REPLACE))
                throw MakeStringException(PKG_NAME_EXISTS, "PackageMap %s already exists, either delete it or specify overwrite", pmid.str());
        }

        cloneDfsInfo(updateFlags, filesNotFound);

        if (pmExisting)
            packageMaps->removeTree(pmExisting);

        Owned<IPropertyTree> pmTree = createPTree("PackageMap", ipt_ordered);
        pmTree->setProp("@id", pmid);
        pmTree->setPropBool("@multipart", true);
        pmTree->addPropTree("Part", pmPart.getClear());
        packageMaps->addPropTree("PackageMap", pmTree.getClear());

        VStringBuffer xpath("PackageMap[@id='%s'][@querySet='%s']", pmid.str(), target.get());
        Owned<IPropertyTree> pkgSet = getPkgSetRegistry(process, false);
        IPropertyTree *psEntry = pkgSet->queryPropTree(xpath);

        if (!psEntry)
        {
            psEntry = pkgSet->addPropTree("PackageMap", createPTree("PackageMap"));
            psEntry->setProp("@id", pmid);
            psEntry->setProp("@querySet", target);
        }
        makePackageActive(pkgSet, psEntry, target, checkFlag(PKGADD_MAP_ACTIVATE));
    }
开发者ID:Josh-Googler,项目名称:HPCC-Platform,代码行数:33,代码来源:ws_packageprocessService.cpp

示例2: querySDSConnection

IRemoteConnection* CWSESPControlEx::querySDSConnection(const char* xpath, unsigned mode, unsigned timeout)
{
    Owned<IRemoteConnection> globalLock = querySDS().connect(xpath, myProcessSession(), mode, timeout);
    if (!globalLock)
        throw MakeStringException(ECLWATCH_INTERNAL_ERROR, "Unable to connect to ESP Session information in dali %s", xpath);
    return globalLock.getClear();
}
开发者ID:Michael-Gardner,项目名称:HPCC-Platform,代码行数:7,代码来源:ws_espcontrolservice.cpp

示例3: createRoxieQueryCompiler

    IConstWorkUnit *processQuerySetWorkunit(SCMStringBuffer &wuid, 
                                            IRoxieQueryCompileInfo &compileInfo, 
                                            IRoxieQueryProcessingInfo &processingInfo,
                                            SCMStringBuffer &status
                                            )
    {
        Owned<IConstWorkUnit> workunit;
        try
        {
            Owned<IRoxieQueryCompiler> compiler = createRoxieQueryCompiler();
            workunit.setown(compiler->compileEcl(wuid, user, password, compileInfo, processingInfo, status));
            if (!workunit)
            {
                DBGLOG("ERROR compiling query %s", status.str());
                return NULL;
            }
        }
        catch(IException *e)
        {
            // don't try and update a workunit - eclserver already did it
            StringBuffer msg;
            e->errorMessage(msg);
            status.set(msg.str());

            DBGLOG("ERROR compiling query %s", msg.str());
            e->Release();
            
            return NULL;
        }

        Owned<IWorkUnit> wu = &workunit->lock();
        wu->setState(WUStateCompiled);
        return workunit.getClear();
    }
开发者ID:rkc,项目名称:HPCC-Platform,代码行数:34,代码来源:roxiequerymanager.cpp

示例4: MakeStringException

extern DLLSERVER_API ILoadedDllEntry * createDllEntry(const char *path, bool isGlobal, const IFileIO *dllFile)
{
    Owned<HelperDll> result = new HelperDll(path, dllFile);
    if (!result->load(isGlobal, true))
        throw MakeStringException(0, "Failed to create ILoadedDllEntry for dll %s", path);
    return result.getClear();
}
开发者ID:hhy5277,项目名称:HPCC-Platform,代码行数:7,代码来源:thorplugin.cpp

示例5: b

void *CJHTreeNode::allocMem(size32_t len)
{
    char *ret = (char *) malloc(len);
    if (!ret)
    {
        Owned<IException> E = MakeStringException(MSGAUD_operator,0, "Out of memory in CJHTreeNode::allocMem, requesting %d bytes", len);
        EXCLOG(E);
        if (flushJHtreeCacheOnOOM)
        {
            clearKeyStoreCache(false);
            ret = (char *) malloc(len);
        }
        if (!ret)
            throw E.getClear();
    }
    unsigned __int64 _totalAllocatedCurrent;
    unsigned __int64 _totalAllocatedEver;
    unsigned _countAllocationsCurrent;
    unsigned _countAllocationsEver;
    {
        SpinBlock b(spin);
        totalAllocatedCurrent += len;
        totalAllocatedEver += len;
        countAllocationsCurrent ++;
        countAllocationsEver ++;
        _totalAllocatedCurrent = totalAllocatedCurrent;
        _totalAllocatedEver = totalAllocatedEver;
        _countAllocationsCurrent = countAllocationsCurrent;
        _countAllocationsEver = countAllocationsEver;
    }
    if (traceJHtreeAllocations)
        DBGLOG("JHTREE memory usage: Allocated %d - %" I64F "d currently allocated in %d allocations", len, _totalAllocatedCurrent, _countAllocationsCurrent);
    return ret;
}
开发者ID:kenrowland,项目名称:HPCC-Platform,代码行数:34,代码来源:ctfile.cpp

示例6: runLocalDaFileSvr

bool CDfuPlusHelper::runLocalDaFileSvr(SocketEndpoint &listenep,bool requireauthenticate, unsigned timeout)
{
    Owned<CDafsThread> thr = new CDafsThread(listenep,requireauthenticate); 
    if (!thr->ok())
        return false;
    thr->start();
    StringBuffer eps;
    if (listenep.isNull())
        progress("Started local Dali file server on port %d\n", listenep.port?listenep.port:DAFILESRV_PORT);
    else
        progress("Started local Dali file server on %s\n", listenep.getUrlStr(eps).str());
    if (timeout==0) {
        setDafsTrace(NULL,0); // disable client tracing
        dafsthread.setown(thr.getClear());
    }
    else {
        loop {
            Sleep(500);
            if (thr->idleTime()>timeout) { 
                thr->stop();
                break;
            }
        }
    }
    return true;
}
开发者ID:EwokVillage,项目名称:HPCC-Platform,代码行数:26,代码来源:dfuplus.cpp

示例7: MakeStringException

IPropertyTree *getPkgSetRegistry(const char *process, bool readonly)
{
    Owned<IRemoteConnection> globalLock = querySDS().connect("/PackageSets/", myProcessSession(), RTM_LOCK_WRITE|RTM_CREATE_QUERY, SDS_LOCK_TIMEOUT);
    if (!globalLock)
        throw MakeStringException(PKG_DALI_LOOKUP_ERROR, "Unable to connect to PackageSet information in dali /PackageSets");
    IPropertyTree *pkgSets = globalLock->queryRoot();
    if (!pkgSets)
        throw MakeStringException(PKG_DALI_LOOKUP_ERROR, "Unable to open PackageSet information in dali /PackageSets");

    if (!process || !*process)
        process = "*";
    StringBuffer id;
    buildPkgSetId(id, process);

    //Only lock the branch for the target we're interested in.
    VStringBuffer xpath("/PackageSets/PackageSet[@id='%s']", id.str());
    Owned<IRemoteConnection> conn = querySDS().connect(xpath.str(), myProcessSession(), readonly ? RTM_LOCK_READ : RTM_LOCK_WRITE, SDS_LOCK_TIMEOUT);
    if (!conn)
    {
        if (readonly)
            return NULL;

        Owned<IPropertyTree> pkgSet = createPTree();
        pkgSet->setProp("@id", id.str());
        pkgSet->setProp("@process", process);
        pkgSets->addPropTree("PackageSet", pkgSet.getClear());
        globalLock->commit();

        conn.setown(querySDS().connect(xpath.str(), myProcessSession(), RTM_LOCK_WRITE, SDS_LOCK_TIMEOUT));
    }

    return (conn) ? conn->getRoot() : NULL;
}
开发者ID:ruidafu,项目名称:HPCC-Platform,代码行数:33,代码来源:ws_packageprocessService.cpp

示例8: main

 void main()
 {
     for (;;)
     {
         Owned<PrefetchInfo> fetchRow = pullRecord();
         CriticalBlock b(crit);
         if (!eoi)
             prefetchQueue.enqueue(fetchRow.getClear());
         if (blocked)
         {
             blocked = false;
             blockedSem.signal();
         }
         if (eoi)
             break;
         if (prefetchQueue.ordinality() >= parent.preload)
         {
             full = true;
             CriticalUnblock b(crit);
             fullSem.wait();
             if (stopped)
                 break;
         }
     }
 }
开发者ID:fnisswandt,项目名称:HPCC-Platform,代码行数:25,代码来源:thprojectslave.cpp

示例9: expandManifestDirectory

void expandManifestDirectory(IPropertyTree *manifestSrc, IPropertyTree &res, StringBuffer &dir, IDirectoryIterator *it, const char*mask, bool recursive)
{
    if (!it)
        return;
    ForEach(*it)
    {
        if (it->isDir())
        {
            if (recursive)
                expandManifestDirectory(manifestSrc, res, dir, it->query().directoryFiles(mask, false, true), mask, recursive);
            continue;
        }
        StringBuffer reldir;
        Owned<IPropertyTree> newRes = createPTreeFromIPT(&res);
        reldir.append(splitRelativePath(it->query().queryFilename(), dir, reldir));
        VStringBuffer xpath("Resource[@filename='%s']", reldir.str());
        if (manifestSrc->hasProp(xpath))
            continue;
        newRes->setProp("@filename", reldir.str());
        updateManifestResourcePaths(*newRes, dir.str());
        if (manifestSrc->hasProp(xpath.setf("resource[@resourcePath='%s']", newRes->queryProp("@resourcePath"))))
            continue;
        manifestSrc->addPropTree("Resource", newRes.getClear());
    }
}
开发者ID:hhy5277,项目名称:HPCC-Platform,代码行数:25,代码来源:hqlres.cpp

示例10: listPkgInfo

void listPkgInfo(double version, const char *target, const char *process, const IPropertyTree* packageMaps, IPropertyTree* pkgSetRegistry, IArrayOf<IConstPackageListMapData>* results)
{
    StringBuffer xpath("PackageMap");
    if (target && *target)
        xpath.appendf("[@querySet='%s']", target);
    Owned<IPropertyTreeIterator> iter = pkgSetRegistry->getElements(xpath.str());
    ForEach(*iter)
    {
        IPropertyTree &item = iter->query();
        const char *id = item.queryProp("@id");
        if (!id || !*id)
            continue;

        StringBuffer xpath;
        xpath.append("PackageMap[@id='").append(id).append("']");
        IPropertyTree *mapTree = packageMaps->queryPropTree(xpath);
        if (!mapTree)
            continue;

        Owned<IEspPackageListMapData> res = createPackageListMapData("", "");
        res->setActive(item.getPropBool("@active"));
        if (process && *process && (version >= 1.01))
            res->setProcess(process);
        getPackageListInfo(mapTree, res);
        if (target && *target)
            res->setTarget(target);
        else
            res->setTarget(item.queryProp("@querySet"));
        results->append(*res.getClear());
    }
}
开发者ID:ruidafu,项目名称:HPCC-Platform,代码行数:31,代码来源:ws_packageprocessService.cpp

示例11: processCMD

    virtual int processCMD()
    {
        StringBuffer s;
        Owned<IClientWsWorkunits> client = createWsWorkunitsClient();
        VStringBuffer url("http://%s:%s/WsWorkunits", optServer.sget(), optPort.sget());
        client->addServiceUrl(url.str());
        if (optUsername.length())
            client->setUsernameToken(optUsername.get(), optPassword.sget(), NULL);

        Owned<IClientWUQuerySetAliasActionRequest> req = client->createWUQuerysetAliasActionRequest();
        IArrayOf<IEspQuerySetAliasActionItem> aliases;
        Owned<IEspQuerySetAliasActionItem> item = createQuerySetAliasActionItem();
        item->setName(optAlias.get());
        aliases.append(*item.getClear());
        req->setAliases(aliases);

        req->setAction("Deactivate");
        req->setQuerySetName(optQuerySet.get());

        Owned<IClientWUQuerySetAliasActionResponse> resp = client->WUQuerysetAliasAction(req);
        IArrayOf<IConstQuerySetAliasActionResult> &results = resp->getResults();
        if (resp->getExceptions().ordinality())
            outputMultiExceptions(resp->getExceptions());
        else if (results.empty())
            fprintf(stderr, "\nError Empty Result!\n");
        else
        {
            IConstQuerySetAliasActionResult &item = results.item(0);
            if (item.getSuccess())
                fprintf(stdout, "Deactivated alias %s/%s\n", optQuerySet.sget(), optAlias.sget());
            else if (item.getCode()|| item.getMessage())
                fprintf(stderr, "Error (%d) %s\n", item.getCode(), item.getMessage());
        }
        return 0;
    }
开发者ID:Mandar-Shinde,项目名称:HPCC-Platform,代码行数:35,代码来源:eclcmd_core.cpp

示例12: IndexDataSource

IFvDataSource * IndexDataSource::cloneForFilter()
{
    Owned<IndexDataSource> ret = new IndexDataSource(this);
    if (ret->init())
        return ret.getClear();
    return NULL;
}
开发者ID:Josh-Googler,项目名称:HPCC-Platform,代码行数:7,代码来源:fvidxsource.cpp

示例13: addManifest

void ResourceManager::addManifest(const char *filename)
{
    StringBuffer path;
    Owned<IPropertyTree> t = createPTree();
    t->setProp("@originalFilename", makeAbsolutePath(filename, path).str());
    ensureManifestInfo()->addPropTree("Include", t.getClear());
    addManifestFile(filename);
}
开发者ID:hhy5277,项目名称:HPCC-Platform,代码行数:8,代码来源:hqlres.cpp

示例14: createKeyManager

static IKeyManager *getKeyManager(IKeyIndex *keyIndex, IHThorIndexReadBaseArg *helper, size32_t fixedDiskRecordSize)
{
    Owned<IKeyManager> klManager = createKeyManager(keyIndex, fixedDiskRecordSize, NULL);
    helper->createSegmentMonitors(klManager);
    klManager->finishSegmentMonitors();
    klManager->reset();
    return klManager.getClear();
}
开发者ID:eagle518,项目名称:HPCC-Platform,代码行数:8,代码来源:thindexreadslave.cpp

示例15: load

void PackageMapAndSet::load(unsigned flags)
{
    Owned<IPropertyTree> t = createPTreeFromIPT(tree);
    if (flags & PMAS_RELOAD_PACKAGE_SET)
        load("PackageSets", t);
    if (flags & PMAS_RELOAD_PACKAGE_MAP)
        load("PackageMaps", t);
    tree.setown(t.getClear());
}
开发者ID:ruidafu,项目名称:HPCC-Platform,代码行数:9,代码来源:ws_packageprocessService.cpp


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