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


C++ ArgvIterator::matchFlag方法代码示例

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


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

示例1: parseCommandLineOptions

    virtual bool parseCommandLineOptions(ArgvIterator &iter)
    {
        if (iter.done())
        {
            usage();
            return false;
        }

        for (; !iter.done(); iter.next())
        {
            const char *arg = iter.query();
            if (*arg!='-')
            {
                optFileName.set(arg);
                return true;
            }
            if (iter.matchOption(optQuerySet, ECLOPT_QUERYSET))
                continue;
            if (iter.matchFlag(optActivate, ECLOPT_ACTIVATE))
                continue;
            if (iter.matchFlag(optOverWrite, ECLOPT_OVERWRITE))
                continue;
            if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch)
                return false;
        }
        return true;
    }
开发者ID:smeda,项目名称:HPCC-Platform,代码行数:27,代码来源:ecl-package.cpp

示例2: parseCommandLineOptions

bool EclCMDShell::parseCommandLineOptions(ArgvIterator &iter)
{
    if (iter.done())
    {
        usage();
        return false;
    }

    bool boolValue;
    for (; !iter.done(); iter.next())
    {
        const char * arg = iter.query();
        if (iter.matchFlag(optHelp, "help"))
            continue;
        else if (*arg!='-')
        {
            cmd.set(arg);
            iter.next();
            break;
        }
        else if (iter.matchFlag(boolValue, "--version"))
        {
            fprintf(stdout, "%s\n", BUILD_TAG);
            return false;
        }
    }
    return true;
}
开发者ID:thildebrant,项目名称:HPCC-Platform,代码行数:28,代码来源:eclcmd_shell.cpp

示例3: matchCommandLineOption

eclCmdOptionMatchIndicator EclCmdCommon::matchCommandLineOption(ArgvIterator &iter, bool finalAttempt)
{
    bool boolValue;
    if (iter.matchFlag(boolValue, ECLOPT_VERSION))
    {
        fprintf(stdout, "%s\n", BUILD_TAG);
        return EclCmdOptionCompletion;
    }
    if (iter.matchOption(optServer, ECLOPT_SERVER)||iter.matchOption(optServer, ECLOPT_SERVER_S))
        return EclCmdOptionMatch;
    if (iter.matchOption(optPort, ECLOPT_PORT))
        return EclCmdOptionMatch;
    if (iter.matchOption(optUsername, ECLOPT_USERNAME)||iter.matchOption(optUsername, ECLOPT_USERNAME_S))
        return EclCmdOptionMatch;
    if (iter.matchOption(optPassword, ECLOPT_PASSWORD)||iter.matchOption(optPassword, ECLOPT_PASSWORD_S))
        return EclCmdOptionMatch;
    if (iter.matchFlag(optVerbose, ECLOPT_VERBOSE) || iter.matchFlag(optVerbose, ECLOPT_VERBOSE_S))
        return EclCmdOptionMatch;

    StringAttr tempArg;
    if (iter.matchOption(tempArg, "-brk"))
    {
#if defined(_WIN32) && defined(_DEBUG)
        unsigned id = atoi(tempArg.sget());
        if (id == 0)
            DebugBreak();
        else
            _CrtSetBreakAlloc(id);
#endif
        return EclCmdOptionMatch;
    }
    if (finalAttempt)
        fprintf(stderr, "\n%s option not recognized\n", iter.query());
    return EclCmdOptionNoMatch;
}
开发者ID:Goon83,项目名称:HPCC-Platform,代码行数:35,代码来源:eclcmd_common.cpp

示例4: parseCommandLineOption

        bool parseCommandLineOption(ArgvIterator &iter)
        {
            if (iter.matchFlag(optTargetAddress, ESDL_OPTION_TARGET_ESP_ADDRESS))
                return true;
            if (iter.matchFlag(optTargetPort, ESDL_OPTION_TARGET_ESP_PORT) )
                return true;

            if (EsdlPublishCmdCommon::parseCommandLineOption(iter))
                return true;

            return false;
        }
开发者ID:SAB2012,项目名称:HPCC-Platform,代码行数:12,代码来源:esdl-publish.cpp

示例5: parseCommandLineOptions

    virtual bool parseCommandLineOptions(ArgvIterator &iter)
    {
        if (iter.done())
        {
            usage();
            return false;
        }

        for (; !iter.done(); iter.next())
        {
            const char *arg = iter.query();
            if (*arg!='-')
            {
                if (optTarget.isEmpty())
                    optTarget.set(arg);
                else if (optQueryId.isEmpty())
                    optQueryId.set(arg);
                else
                {
                    fprintf(stderr, "\nunrecognized argument %s\n", arg);
                    return false;
                }
                continue;
            }
            if (iter.matchOption(optPMID, ECLOPT_PMID) || iter.matchOption(optPMID, ECLOPT_PMID_S))
                continue;
            if (iter.matchFlag(optGlobalScope, ECLOPT_GLOBAL_SCOPE))
                continue;
            if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch)
                return false;
        }
        return true;
    }
开发者ID:AlexLuya,项目名称:HPCC-Platform,代码行数:33,代码来源:ecl-package.cpp

示例6: parseCommandLineOption

    bool parseCommandLineOption(ArgvIterator &iter)
    {
        if (iter.matchFlag(optInput, ESDL_OPTION_CONFIG) )
            return true;

        if (EsdlPublishCmdCommon::parseCommandLineOption(iter))
            return true;

        return false;
    }
开发者ID:jamienoss,项目名称:HPCC-Platform,代码行数:10,代码来源:esdl-publish.cpp

示例7: parseCommandLineOptions

    virtual bool parseCommandLineOptions(ArgvIterator &iter)
    {
        if (iter.done())
        {
            usage();
            return false;
        }

        for (; !iter.done(); iter.next())
        {
            const char *arg = iter.query();
            if (*arg!='-')
            {
                if (optTarget.isEmpty())
                    optTarget.set(arg);
                else if (optFileName.isEmpty())
                    optFileName.set(arg);
                else
                {
                    fprintf(stderr, "\nunrecognized argument %s\n", arg);
                    return false;
                }
                continue;
            }
            if (iter.matchFlag(optValidateActive, ECLOPT_ACTIVE))
                continue;
            if (iter.matchFlag(optCheckDFS, ECLOPT_CHECK_DFS))
                continue;
            if (iter.matchOption(optPMID, ECLOPT_PMID) || iter.matchOption(optPMID, ECLOPT_PMID_S))
                continue;
            if (iter.matchFlag(optGlobalScope, ECLOPT_GLOBAL_SCOPE))
                continue;
            StringAttr queryIds;
            if (iter.matchOption(queryIds, ECLOPT_QUERYID))
            {
                optQueryIds.appendList(queryIds.get(), ",");
                continue;
            }
            if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch)
                return false;
        }
        return true;
    }
开发者ID:AsherBond,项目名称:HPCC-Platform,代码行数:43,代码来源:ecl-package.cpp

示例8: matchCommandLineOption

esdlCmdOptionMatchIndicator EsdlCmdCommon::matchCommandLineOption(ArgvIterator &iter, bool finalAttempt)
{
    bool boolValue;
    if (iter.matchFlag(boolValue, ESDLOPT_HELP))
    {
        usage();
        return EsdlCmdOptionCompletion;
    }
    if (iter.matchFlag(boolValue, ESDLOPT_VERSION))
    {
        fprintf(stdout, "%s\n", BUILD_TAG);
        return EsdlCmdOptionCompletion;
    }

    if (iter.matchFlag(optVerbose, ESDL_OPTION_VERBOSE) || iter.matchFlag(optVerbose, ESDL_OPT_VERBOSE))
    {
        return EsdlCmdOptionMatch;
    }

    StringAttr tempArg;
    if (iter.matchOption(tempArg, "-brk"))
    {
#if defined(_WIN32) && defined(_DEBUG)
        unsigned id = atoi(tempArg.str());
        if (id == 0)
            DebugBreak();
        else
            _CrtSetBreakAlloc(id);
#endif
        return EsdlCmdOptionMatch;
    }
    if (finalAttempt)
    {
        fprintf(stderr, "\n%s option not recognized\n", iter.query());
        usage();
    }
    return EsdlCmdOptionNoMatch;
}
开发者ID:RogerDev,项目名称:HPCC-Platform,代码行数:38,代码来源:esdlcmd_common.cpp

示例9: parseCommandLineOptions

    virtual bool parseCommandLineOptions(ArgvIterator &iter)
    {
        if (iter.done())
        {
            usage();
            return false;
        }

        for (; !iter.done(); iter.next())
        {
            const char *arg = iter.query();
            if (streq(arg, "-"))
            {
                optObj.set("stdin");
                continue;
            }
            if (*arg!='-')
            {
                if (optObj.value.length())
                {
                    fprintf(stderr, "\nmultiple targets (%s and %s) not currently supported\n", optObj.value.sget(), arg);
                    return false;
                }
                optObj.set(arg);
                continue;
            }
            if (iter.matchOption(optObj.value, ECLOPT_WUID))
                continue;
            if (iter.matchOption(optName, ECLOPT_NAME))
                continue;
            if (iter.matchOption(optCluster, ECLOPT_CLUSTER))
                continue;
            if (iter.matchFlag(optActivate, ECLOPT_ACTIVATE))
            {
                activateSet=true;
                continue;
            }
            if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch)
                return false;
        }
        return true;
    }
开发者ID:Mandar-Shinde,项目名称:HPCC-Platform,代码行数:42,代码来源:eclcmd_core.cpp


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