本文整理汇总了C++中StringVectorPtr::at方法的典型用法代码示例。如果您正苦于以下问题:C++ StringVectorPtr::at方法的具体用法?C++ StringVectorPtr::at怎么用?C++ StringVectorPtr::at使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringVectorPtr
的用法示例。
在下文中一共展示了StringVectorPtr::at方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testFindNonRecursive
void ZipArchiveTests::testFindNonRecursive()
{
ZipArchive arch(testPath, "Zip");
arch.load();
StringVectorPtr vec = arch.find("*.txt", false);
CPPUNIT_ASSERT_EQUAL((size_t)2, vec->size());
CPPUNIT_ASSERT_EQUAL(String("rootfile.txt"), vec->at(0));
CPPUNIT_ASSERT_EQUAL(String("rootfile2.txt"), vec->at(1));
}
示例2: testFindRecursive
void ZipArchiveTests::testFindRecursive()
{
ZipArchive arch(testPath, "Zip");
arch.load();
StringVectorPtr vec = arch.find("*.material", true);
CPPUNIT_ASSERT_EQUAL((size_t)4, vec->size());
CPPUNIT_ASSERT_EQUAL(String("level1/materials/scripts/file.material"), vec->at(0));
CPPUNIT_ASSERT_EQUAL(String("level1/materials/scripts/file2.material"), vec->at(1));
CPPUNIT_ASSERT_EQUAL(String("level2/materials/scripts/file3.material"), vec->at(2));
CPPUNIT_ASSERT_EQUAL(String("level2/materials/scripts/file4.material"), vec->at(3));
}
示例3: testListRecursive
void ZipArchiveTests::testListRecursive()
{
ZipArchive arch(testPath, "Zip");
arch.load();
StringVectorPtr vec = arch.list(true);
CPPUNIT_ASSERT_EQUAL((size_t)6, vec->size());
CPPUNIT_ASSERT_EQUAL(String("level1/materials/scripts/file.material"), vec->at(0));
CPPUNIT_ASSERT_EQUAL(String("level1/materials/scripts/file2.material"), vec->at(1));
CPPUNIT_ASSERT_EQUAL(String("level2/materials/scripts/file3.material"), vec->at(2));
CPPUNIT_ASSERT_EQUAL(String("level2/materials/scripts/file4.material"), vec->at(3));
CPPUNIT_ASSERT_EQUAL(String("rootfile.txt"), vec->at(4));
CPPUNIT_ASSERT_EQUAL(String("rootfile2.txt"), vec->at(5));
}
示例4: testListRecursive
void FileSystemArchiveTests::testListRecursive()
{
FileSystemArchive arch(testPath, "FileSystem");
arch.load();
StringVectorPtr vec = arch.list(true);
CPPUNIT_ASSERT_EQUAL((size_t)48, vec->size()); // 48 including CVS folders!
CPPUNIT_ASSERT_EQUAL(String("rootfile.txt"), vec->at(0));
CPPUNIT_ASSERT_EQUAL(String("rootfile2.txt"), vec->at(1));
CPPUNIT_ASSERT_EQUAL(String("level1/materials/scripts/file.material"), vec->at(2));
CPPUNIT_ASSERT_EQUAL(String("level1/materials/scripts/file2.material"), vec->at(3));
CPPUNIT_ASSERT_EQUAL(String("level2/materials/scripts/file3.material"), vec->at(22));
CPPUNIT_ASSERT_EQUAL(String("level2/materials/scripts/file4.material"), vec->at(23));
}
示例5: testListNonRecursive
void FileSystemArchiveTests::testListNonRecursive()
{
try {
FileSystemArchive arch(testPath, "FileSystem");
arch.load();
StringVectorPtr vec = arch.list(false);
CPPUNIT_ASSERT_EQUAL((unsigned int)2, (unsigned int)vec->size());
CPPUNIT_ASSERT_EQUAL(String("rootfile.txt"), vec->at(0));
CPPUNIT_ASSERT_EQUAL(String("rootfile2.txt"), vec->at(1));
}
catch (Exception& e)
{
std::cout << e.getFullDescription();
}
}
示例6: loadScriptLibrary
void loadScriptLibrary()
{
StringVectorPtr names = ResourceGroupManager::getSingleton().listResourceNames("DefaultLuaScripts");
for(int i = 0; i < names->size(); ++i)
{
loadScript(names->at(i));
}
names.setNull();
}