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


C++ StringVectorPtr::push_back方法代码示例

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


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

示例1: find

    //-----------------------------------------------------------------------
    StringVectorPtr ZipArchive::find(const String& pattern, bool recursive)
    {
        StringVectorPtr ret = StringVectorPtr(new StringVector());

        FileInfoList::iterator i, iend;
        iend = mFileList.end();
        for (i = mFileList.begin(); i != iend; ++i)
        {
			if (recursive || i->path.empty())
            {
                // Check basename matches pattern (zip is case insensitive)
                if (StringUtil::match(i->basename, pattern, false))
                {
                    ret->push_back(i->filename);
                }
            }
            else
            {
                // Check full name
                if (StringUtil::match(i->filename, pattern, false))
                {
                    ret->push_back(i->filename);
                }

            }
        }
        return ret;
    }
开发者ID:brock7,项目名称:TianLong,代码行数:29,代码来源:OgreZip.cpp

示例2: list

    //-----------------------------------------------------------------------
    StringVectorPtr ZipArchive::list(bool recursive, bool dirs) const
    {
        OGRE_LOCK_AUTO_MUTEX;
        StringVectorPtr ret = StringVectorPtr(OGRE_NEW_T(StringVector, MEMCATEGORY_GENERAL)(), SPFM_DELETE_T);

        FileInfoList::const_iterator i, iend;
        iend = mFileList.end();
        for (i = mFileList.begin(); i != iend; ++i)
            if ((dirs == (i->compressedSize == size_t (-1))) &&
                (recursive || i->path.empty()))
                ret->push_back(i->filename);

        return ret;
    }
开发者ID:wjwwood,项目名称:ogre,代码行数:15,代码来源:OgreZip.cpp

示例3: list

    //-----------------------------------------------------------------------
    StringVectorPtr ZipArchive::list(bool recursive)
    {
        StringVectorPtr ret = StringVectorPtr(new StringVector());

        FileInfoList::iterator i, iend;
        iend = mFileList.end();
        for (i = mFileList.begin(); i != iend; ++i)
        {
			if (recursive || i->path.empty())
            {
                ret->push_back(i->filename);
            }
        }
        return ret;

    }
开发者ID:brock7,项目名称:TianLong,代码行数:17,代码来源:OgreZip.cpp

示例4: find

    //-----------------------------------------------------------------------
    StringVectorPtr ZipArchive::find(const String& pattern, bool recursive, bool dirs) const
    {
        OGRE_LOCK_AUTO_MUTEX;
        StringVectorPtr ret = StringVectorPtr(OGRE_NEW_T(StringVector, MEMCATEGORY_GENERAL)(), SPFM_DELETE_T);
        // If pattern contains a directory name, do a full match
        bool full_match = (pattern.find ('/') != String::npos) ||
                          (pattern.find ('\\') != String::npos);
        bool wildCard = pattern.find("*") != String::npos;
            
        FileInfoList::const_iterator i, iend;
        iend = mFileList.end();
        for (i = mFileList.begin(); i != iend; ++i)
            if ((dirs == (i->compressedSize == size_t (-1))) &&
                (recursive || full_match || wildCard))
                // Check basename matches pattern (zip is case insensitive)
                if (StringUtil::match(full_match ? i->filename : i->basename, pattern, false))
                    ret->push_back(i->filename);

        return ret;
    }
开发者ID:wjwwood,项目名称:ogre,代码行数:21,代码来源:OgreZip.cpp


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