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


C++ StringVector::End方法代码示例

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


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

示例1: InsertAlpha

void InsertAlpha(StringVector &container, const String &value)
{
    if (container.Find(value) != container.End())
        return;
    for(auto iter = container.Begin(); iter != container.End(); ++iter)
    {
        if (value.Compare((*iter), false) < 0)
        {
            container.Insert(iter, value);
            return;
        }
    }
    container.Push(value);
}
开发者ID:aoighost,项目名称:tundra-urho3d,代码行数:14,代码来源:CoreDebugHuds.cpp

示例2: BuildManaged

bool BuildWindows::BuildManaged(const String& buildPath)
{
    ToolEnvironment* tenv = GetSubsystem<ToolEnvironment>();
    ToolSystem* toolSystem = GetSubsystem<ToolSystem>();
    FileSystem* fileSystem = GetSubsystem<FileSystem>();
    Project* project = toolSystem->GetProject();
    ProjectSettings* settings = project->GetProjectSettings();

    String projectPath = project->GetProjectPath();

#ifdef ATOMIC_DEBUG
    String config = "Debug";
#else
    String config = "Release";
#endif

    String managedBins = projectPath + ToString("AtomicNET/%s/Bin/Desktop/", config.CString());
    String managedExe = managedBins + settings->GetName() + ".exe";

    if (!fileSystem->FileExists(managedExe))
    {
        FailBuild(ToString("Error building managed project, please compile the %s binary %s before building", config.CString(), managedExe.CString()));
        return false;
    }

    StringVector results;
    StringVector filtered;

    fileSystem->ScanDir(results, managedBins, "", SCAN_FILES, false);

    StringVector filterList;

    StringVector::Iterator itr = results.Begin();
    while (itr != results.End())
    {
        unsigned i;
        for (i = 0; i < filterList.Size(); i++)
        {
            if (itr->Contains(filterList[i]))
                break;
        }

        if (i == filterList.Size())
            filtered.Push(*itr);

        itr++;
    }

    for (unsigned i = 0; i < filtered.Size(); i++)
    {
        String filename = filtered[i];

        if (!BuildCopyFile(managedBins + filename, buildPath_ + "/" + filename))
            return false;

    }

    return true;

}
开发者ID:LumaDigital,项目名称:AtomicGameEngine,代码行数:60,代码来源:BuildWindows.cpp

示例3: SetStringVector

bool XMLElement::SetStringVector(const StringVector& value)
{
    if (!RemoveChildren("string"))
        return false;

    for (StringVector::ConstIterator i = value.Begin(); i != value.End(); ++i)
    {
        XMLElement stringElem = CreateChild("string");
        if (!stringElem)
            return false;
        stringElem.SetAttribute("value", *i);
    }

    return true;
}
开发者ID:newbthenewbd,项目名称:Urho3D,代码行数:15,代码来源:XMLElement.cpp

示例4: ParseCommand

void ParseCommand(String input, String &command, StringVector &parameters)
{
    input = input.Trimmed();
    if (input.Empty())
        return;

    uint parenPos = input.Find('(', 0);
    uint spacePos = input.Find(' ', 0);
    if (parenPos == String::NPOS && spacePos == String::NPOS)
    {
        command = input;
        return;
    }
    StringVector parts;
    if (parenPos != String::NPOS && parenPos < spacePos)
    {
        uint parenEndPos = input.FindLast(')');
        String insideParens = (parenEndPos != String::NPOS ? 
            input.Substring(parenPos+1, parenEndPos-parenPos-1).Trimmed() : input.Substring(parenPos+1).Trimmed());
        command = input.Substring(0, parenPos).Trimmed();
        // "one, two, three", "one,two,three" and "one two three"
        parts = insideParens.Contains(',') ? insideParens.Split(',') : insideParens.Split(' ');
    }
    else
    {
        command = input.Substring(0, spacePos).Trimmed();
        String remaining = input.Substring(spacePos+1).Trimmed();
        // "one, two, three", "one,two,three" and "one two three"
        parts = remaining.Contains(',') ? remaining.Split(',') : remaining.Split(' ');
    }
    for(StringVector::Iterator iter=parts.Begin(); iter!=parts.End(); ++iter)
    {
        String part = (*iter).Trimmed();
        if (part.EndsWith(","))
            part = part.Substring(0, part.Length()-1);
        if (!part.Empty())
            parameters.Push(part);
    }
}
开发者ID:aoighost,项目名称:tundra-urho3d,代码行数:39,代码来源:CoreStringUtils.cpp


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