本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}