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


C++ TResourceReader::ReadDesCArrayL方法代码示例

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


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

示例1: ReadDesCArrayLC

// ----------------------------------------------------------------------------
// Read array of descriptors, leave on cleanup stack
// ----------------------------------------------------------------------------
//
EXPORT_C CDesCArrayFlat* CMPXResource::ReadDesCArrayLC(TInt aResourceId)
    {
    //MPX_DEBUG1("CMPXResource::ReadDesCArrayLC");
    TResourceReader resReader;
    HBufC8* readBuffer = iResourceFile.AllocReadLC(aResourceId);
    resReader.SetBuffer(readBuffer);
    CDesCArrayFlat* descArray = resReader.ReadDesCArrayL();
    CleanupStack::PopAndDestroy(readBuffer);
    //MPX_DEBUG1("CMPXResource::ReadDesCArrayLC End");
    CleanupStack::PushL(descArray);
    return descArray;
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:16,代码来源:mpxresource.cpp

示例2: TestArrayL

/**
@SYMTestCaseID          SYSLIB-BAFL-CT-0434
@SYMTestCaseDesc        Tests for TResourceReader::ReadDesCArrayL() function
@SYMTestPriority        Medium
@SYMTestActions         Attempt to read an array resource
@SYMTestExpectedResults Tests must not fail
@SYMREQ                 REQ0000
*/
void TRsReadTester::TestArrayL()
	{
	test.Next(_L(" @SYMTestCaseID:SYSLIB-BAFL-CT-0434 Test reading ARRAY resource "));
    TResourceReader reader;
    CreateResourceReaderLC(reader,SYS_ARRAY_ONE);
    CDesCArray* desArray=reader.ReadDesCArrayL();
    CleanupStack::PopAndDestroy();
    test(desArray->Count()==5);

    test((*desArray)[0]==_L("Esc"));
    test((*desArray)[1]==_L("Enter"));
    test((*desArray)[2]==_L("Tab"));
    test((*desArray)[3]==_L("Del"));
    test((*desArray)[4]==_L("Space"));

    delete(desArray);
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:25,代码来源:T_RSREAD.CPP

示例3: ConstructL

// Second-phase constructor
void CPalettes::ConstructL(TInt aNameResource, TInt aDataResource) {

    // Read palette names
    TResourceReader reader;
    CCoeEnv::Static()->CreateResourceReaderLC(reader, aNameResource);
    iPaletteNames = reader.ReadDesCArrayL();
    iNumPalettes = iPaletteNames->Count();
    CleanupStack::PopAndDestroy(); // reader

    // Read palette data
    iPaletteData = new (ELeave) TUint8[KPaletteBytes*iNumPalettes];
    CCoeEnv::Static()->CreateResourceReaderLC(reader, aDataResource);
    TInt count = reader.ReadInt16();
    if ( count != iNumPalettes ) {
        User::Panic(KPanic, EPalettePanicBadResource);
    }
    reader.Read(iPaletteData, KPaletteBytes*iNumPalettes);
    CleanupStack::PopAndDestroy(); // reader
}
开发者ID:0x0all,项目名称:s2putty,代码行数:20,代码来源:palettes.cpp

示例4: ConstructL

void CMTPProxyDpConfigMgr::ConstructL()
	{
	OstTraceFunctionEntry0( CMTPPROXYDPCONFIGMGR_CONSTRUCTL_ENTRY );
	TUint32 resourceId = iFramework.DataProviderConfig().UintValue(MMTPDataProviderConfig::EOpaqueResource);
	// Reading from resource file mtpproxydp_config.rss 
	RResourceFile resourceFile;
	CleanupClosePushL(resourceFile);
	resourceFile.OpenL(iFramework.Fs(), iFramework.DataProviderConfig().DesCValue(MMTPDataProviderConfig::EResourceFileName));
	TResourceReader resourceReader;
	HBufC8* buffer = resourceFile.AllocReadLC(resourceId); 
	resourceReader.SetBuffer(buffer);
	FileMappingStruct st;
	const TInt numberOfEntries=resourceReader.ReadInt16();
	for(TInt count =0;count<numberOfEntries ; count++)
		{
		st.iDpUid=resourceReader.ReadInt32();
		st.iFileArray = resourceReader.ReadDesCArrayL();
		InsertToMappingStruct(st);	
		}	
		
	CleanupStack::PopAndDestroy(2, &resourceFile);
	
	OstTraceFunctionExit0( CMTPPROXYDPCONFIGMGR_CONSTRUCTL_EXIT );
	}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:24,代码来源:cmtpproxydpconfigmgr.cpp


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