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


C++ OovStringVec::size方法代码示例

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


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

示例1: StringJoin

OovString StringJoin(OovStringVec const &tokens, char delimiter)
    {
    OovString str;
    for(size_t i=0; i<tokens.size(); i++)
        {
        str += tokens[i];
        if(i < tokens.size()-1)
            {
            str += delimiter;
            }
        }
    return str;
    }
开发者ID:sguzwf,项目名称:oovaide,代码行数:13,代码来源:OovString.cpp

示例2: parseProjRefs

void ComponentsFile::parseProjRefs(OovStringRef const arg, OovString &rootDir,
        OovStringVec &excludes)
    {
    excludes.clear();
    OovStringVec tokens = StringSplit(arg, '!');
    if(rootDir.size() == 0)
        rootDir = tokens[0];
    if(tokens.size() > 1)
        {
        excludes.resize(tokens.size()-1);
        std::copy(tokens.begin()+1, tokens.end(), excludes.begin());
        }
    }
开发者ID:Purplenigma,项目名称:oovaide,代码行数:13,代码来源:Components.cpp

示例3: addFilterList

void BuildVarSettingsDialog::addFilterList()
    {
    GuiTreeItem parent;
    OovString filterTag;
    int index = getComboId("FilterNameComboboxtext", mFilterNames);
    if(index != BAD_INDEX)
        {
        switch(index)
            {
            case FT_BuildConfig:
                filterTag = OptFilterNameBuildConfig;
                break;

            case FT_BuildMode:
                filterTag = OptFilterNameBuildMode;
                break;

            case FT_Component:
                filterTag = OptFilterNameComponent;
                break;

            case FT_Platform:
                filterTag = OptFilterNamePlatform;
                break;
            }
        }
    OovStringVec filterVals = mFilterValuesTreeView.getSelected();
    if(filterVals.size() > 0)
        {
        VariableFilter filter(filterTag, filterVals[0]);
        mFiltersTreeView.appendText(parent, filter.getFilterAsString());
        }
    updateSettingText();
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:34,代码来源:BuildVariablesDialog.cpp

示例4: updateDebugDataValue

void Editor::updateDebugDataValue()
    {
    OovStringVec strs = mVarView.getSelected();
    if(strs.size() > 0)
        {
        mEditFiles.getDebugger().startGetVariable(strs[0]);
        }
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:8,代码来源:oovEdit.cpp

示例5: removeVariableSetting

void BuildVariablesDialog::removeVariableSetting()
    {
    OovStringVec vars = mVarListTreeView.getSelected();
    if(vars.size() > 0)
        {
        BuildVariable origBuildVar;
        origBuildVar.initVarFromString(vars[0]);
        mVarListTreeView.removeSelected();
        mProject.removeName(origBuildVar.getVarFilterName());
        }
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:11,代码来源:BuildVariablesDialog.cpp

示例6: getAsString

OovString CompoundValueRef::getAsString(const OovStringVec &vec,
        char delimiter)
    {
    OovString str;
    for(size_t i=0; i<vec.size(); i++)
        {
        str += vec[i];
        str += delimiter;
        }
    return str;
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:11,代码来源:NameValueFile.cpp

示例7: addLibsAndIncs

void CMaker::addLibsAndIncs(OovStringRef const compName, OovString &str)
    {
    OovStringVec extraIncs;
    OovStringVec libs = getCompLibrariesAndIncs(compName, extraIncs);
    addCommandAndNames(CT_TargLinkLibs, compName, libs, str);

    if(extraIncs.size())
        {
        str += "include_directories(";
        appendNames(extraIncs, ',', str);
        str += ")\n\n";
        }
    }
开发者ID:8l,项目名称:oovcde,代码行数:13,代码来源:oovCMaker.cpp

示例8: deleteSelected

 void deleteSelected()
     {
     OovString selStr = mPathMapList.getSelected();
     if(selStr.length() > 0)
         {
         OovStringVec vec = selStr.split(" > ");
         if(vec.size() == 2)
             {
             mPathMapList.removeSelected();
             mDiagramPathMap->remove(ZonePathReplaceItem(vec[0], vec[1]));
             }
         }
     }
开发者ID:8l,项目名称:oovcde,代码行数:13,代码来源:ZoneDiagramView.cpp

示例9: getComponentIndex

size_t ComponentGraph::getComponentIndex(OovStringVec const &compPaths,
        OovStringRef const dir)
    {
    size_t compIndex = NO_INDEX;
    for(size_t i=0; i<compPaths.size(); i++)
        {
        std::string const &compPath = compPaths[i];
        if(compPath.compare(dir) == 0)
            {
            compIndex = i;
            break;
            }
        }
    return compIndex;
    }
开发者ID:Purplenigma,项目名称:oovaide,代码行数:15,代码来源:ComponentGraph.cpp

示例10: isOutputOld

bool FileStat::isOutputOld(OovStringRef const outputFn,
                           OovStringVec const &inputs, size_t *oldIndex)
{
    bool old = false;
    for(size_t i=0; i<inputs.size(); i++)
    {
        if(isOutputOld(outputFn, inputs[i]))
        {
            old = true;
            if(oldIndex)
                *oldIndex = i;
            break;
        }
    }
    return old;
}
开发者ID:8l,项目名称:oovcde,代码行数:16,代码来源:FilePath.cpp

示例11: getArg

// First arg at index 0 is the command.
OovString OovIpcMsg::getArg(size_t argNum) const
    {
    OovStringVec args = split(',');
    OovString arg;
#if(DEBUG_IPC)
    if(argNum == 0)
        {
        FILE *fp = fopen("IPC.txt", "a");
        fprintf(fp, "RCV: %s\n", cmdStr.getStr());
        fclose(fp);
        }
#endif
    if(argNum < args.size())
        {
        arg = args[argNum];
        }
    return arg;
    }
开发者ID:8l,项目名称:oovcde,代码行数:19,代码来源:OovIpc.cpp

示例12: getErrorPosition

static int getErrorPosition(OovStringRef const line, int &charOffset)
    {
    int lineNum = -1;
    OovStringVec tokens = StringSplit(line, ':');
    auto iter = std::find_if(tokens.begin(), tokens.end(),
        [](OovStringRef const tok)
        { return(isdigit(tok[0])); }
        );
    int starti = iter-tokens.begin();
    if(tokens[starti].getInt(0, INT_MAX, lineNum))
        {
        if(static_cast<unsigned int>(starti+1) < tokens.size())
            {
            tokens[starti+1].getInt(0, INT_MAX, charOffset);
            }
        }
    return lineNum;
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:18,代码来源:Highlighter.cpp

示例13: drawClass

GraphSize OperationDrawer::drawClass(DiagramDrawer &drawer, const OperationClass &node,
        const OperationDrawOptions & /*options*/, bool draw)
    {
    GraphPoint startpos = node.getPosition();
    const ModelType *type = node.getType();
    OovStringRef const typeName = type->getName();
    int rectx = 0;
    int recty = 0;
    const ModelClassifier *classifier = type->getClass();
    if(classifier)
        {
        if(draw)
            {
            drawer.groupText(true, false);
            }
        OovStringVec strs;
        std::vector<GraphPoint> positions;
        strs.push_back(typeName);
        splitStrings(strs, 30, 40);

        for(auto const &str : strs)
            {
            recty += mCharHeight + (mPad * 2);
            positions.push_back(GraphPoint(startpos.x+mPad, startpos.y + recty - mPad));
            int curx = static_cast<int>(drawer.getTextExtentWidth(str)) + mPad*2;
            if(curx > rectx)
                rectx = curx;
            }

        if(draw)
            {
            drawer.groupShapes(true, Color(0,0,0), Color(245,245,255));
            drawer.drawRect(GraphRect(startpos.x, startpos.y, rectx, recty));
            drawer.groupShapes(false, Color(0,0,0), Color(245,245,255));

            for(size_t i=0; i<strs.size(); i++)
                {
                drawer.drawText(positions[i], strs[i]);
                }
            drawer.groupText(false, false);
            }
        }
    return GraphSize(rectx, recty);
    }
开发者ID:Purplenigma,项目名称:oovaide,代码行数:44,代码来源:OperationDrawer.cpp

示例14: getDiagResults

OovStringVec Tokenizer::getDiagResults()
    {
    OovStringVec diagResults;
    if(mTransUnit)
        {
        int numDiags = clang_getNumDiagnostics(mTransUnit);
        for (int i = 0; i<numDiags && diagResults.size() < 10; i++)
            {
            CXDiagnostic diag = clang_getDiagnostic(mTransUnit, i);
//          CXDiagnosticSeverity sev = clang_getDiagnosticSeverity(diag);
//          if(sev >= CXDiagnostic_Error)
            OovString diagStr = getDisposedString(clang_formatDiagnostic(diag,
                clang_defaultDiagnosticDisplayOptions()));
            if(diagStr.find(mSourceFilename) != std::string::npos)
                {
                diagResults.push_back(diagStr);
                }
            }
        }
    return diagResults;
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:21,代码来源:Highlighter.cpp

示例15: editVariable

void BuildVariablesDialog::editVariable()
    {
    OovStringVec vars = mVarListTreeView.getSelected();
    if(vars.size() > 0)
        {
        OovString var = vars[0];
        if(sBuildVarSettingsDialog->editVariable(var))
            {
            mVarListTreeView.removeSelected();
            GuiTreeItem parent;
            mVarListTreeView.appendText(parent, var);

            BuildVariable origBuildVar;
            origBuildVar.initVarFromString(vars[0]);
            mProject.removeName(origBuildVar.getVarFilterName());

            BuildVariable newBuildVar;
            newBuildVar.initVarFromString(var);
            mProject.setNameValue(newBuildVar.getVarFilterName(), newBuildVar.getVarValue());
            }
        }
    }
开发者ID:animatedb,项目名称:oovaide,代码行数:22,代码来源:BuildVariablesDialog.cpp


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