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


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

本文整理汇总了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));
}
开发者ID:bill9889,项目名称:OGRE,代码行数:10,代码来源:ZipArchiveTests.cpp

示例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));
}
开发者ID:bill9889,项目名称:OGRE,代码行数:12,代码来源:ZipArchiveTests.cpp

示例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));
}
开发者ID:bill9889,项目名称:OGRE,代码行数:14,代码来源:ZipArchiveTests.cpp

示例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));
}
开发者ID:MrLobo,项目名称:El-Rayo-de-Zeus,代码行数:14,代码来源:FileSystemArchiveTests.cpp

示例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();
	}

}
开发者ID:MrLobo,项目名称:El-Rayo-de-Zeus,代码行数:17,代码来源:FileSystemArchiveTests.cpp

示例6: loadScriptLibrary

void loadScriptLibrary()
{
    StringVectorPtr names = ResourceGroupManager::getSingleton().listResourceNames("DefaultLuaScripts");
    for(int i = 0; i < names->size(); ++i)
    {
        loadScript(names->at(i));
    }
    names.setNull();
}
开发者ID:ChadMcKinney,项目名称:Entropy,代码行数:9,代码来源:script.cpp


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