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


C++ PtrList::insert方法代码示例

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


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

示例1: main

int main(int argc, char **argv)
{
    setvbuf(stdout, NULL, _IOLBF, 0);
#ifdef XP_UNIX
    unlimit();
#endif
    fprintf(stdout, "\n");

    unsigned long limit = 0; // no thread limit by default
    char *addr = NULL;
    PRBool log = PR_FALSE;
    LogLevel logLevel = LOGINFO;
    PLOptState *options;
    PRBool secure = PR_FALSE;
    PRBool NSTests = PR_FALSE; // don't execute Netscape tests by default
    PtrList<char> protlist; // list of security protocols
    PtrList<char> configlist; // list of configurations
    RegexList regexlist; // list of Sun tests/regex to load
    RegexList regexcludelist; // list of Sun tests/regex to exclude
    char* suitename = "suite1";
    PRInt32 concurrent = 0; // number of concurrent threads for each test. 0 means sequential, single-threaded
    PRInt32 delay = 0;
    PRInt32 split = 0;
    PRInt32 timeout = 0; // leave timeout unchanged by default
    char* cert=NULL;
    char* certpwd=NULL;
    char* cipherString = NULL;
    char* version = "ENTERPRISE";
    PRInt32 release = 41;
    PRInt32 hsp = 0; // SSL handshake period
    PRBool performance = PR_FALSE;
    PRInt32 maxtm = 0;
    PRUint16 af = PR_AF_INET;
    PRInt32 displayperiod=0;
    PRBool loop = PR_FALSE;

    Logger::logInitialize(logLevel);

    options = PL_CreateOptState(argc, argv, "X:C:h:H:l:c:d:n:w46r:sx:p:o:t:a:e:k:Ng:v:R:QPE:T:L:");
    long repeat = 1;
    while ( PL_GetNextOpt(options) == PL_OPT_OK)
    {
        switch(options->option)
        {
            case 'L':
                loop = PR_TRUE;
                if (options->value)
                    displayperiod  = (PRInt32) atoi(options->value);
                break;

            case 'E':
                if (options->value)
                    protlist.insert(strdup(options->value));
                break;

            case 'T':
                if (options->value)
                    maxtm  = (PRInt32) atoi(options->value);
                break;

            case 'H':
                if (options->value)
                    hsp  = (PRInt32) atoi(options->value);
                break;

            case 'v':
                if (options->value)
                    version = uppercase(strdup(options->value));
                break;

            case 'g':
                if (options->value)
                    configlist.insert(strdup(options->value));
                break;

            case 'x':
                if (options->value)
                    regexlist.add(options->value);
                break;

            case 'X':
                if (options->value)
                    regexcludelist.add(options->value);
                break;

            case 'w':
                log = PR_TRUE;
                break;

            case 'r':
                if (options->value)
                    repeat = atol(options->value);
                break;

            case 'e':
                if (options->value)
                    timeout = atol(options->value);
                break;

            case 'o':
//.........这里部分代码省略.........
开发者ID:OldsSourcesBackups,项目名称:Heliod-Web-Server,代码行数:101,代码来源:main.cpp


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