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


C++ TFileName::AppendNumUC方法代码示例

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


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

示例1: SaveDataOwnerL

	void CStorageManager::SaveDataOwnerL(CDataOwnerInfo& aDataOwner)
		/**
		Saves data for DataOwner

		@param aDataOwner - DataOwner to be saved

		*/

		{
		CDir* dir = NULL;
		TFileName filename;
		filename.Append(iBackupDirName);
		filename.Append(KDataOwnerDir);
		iTestStep->Fs().MkDirAll(filename);
		_LIT(KPid, "pid");
		_LIT(KSid, "sid");
		_LIT(KJid, "jid");


		TSBDerivedType type;
		type = aDataOwner.Identifier().DerivedTypeL();

		if (type == ESIDDerivedType)
			{
			CSBSecureId* sid = CSBSecureId::NewL(&(aDataOwner.Identifier()));
			CleanupStack::PushL(sid);
			filename.Append(KSid);
			filename.AppendNumUC(sid->SecureIdL(), EHex);
			CleanupStack::PopAndDestroy(sid);
			}
		else if (type == EPackageDerivedType)
			{
			CSBPackageId* pid = CSBPackageId::NewL(&(aDataOwner.Identifier()));
			CleanupStack::PushL(pid);
			filename.Append(KPid);
			filename.AppendNumUC(pid->PackageIdL().iUid, EHex);
			CleanupStack::PopAndDestroy(pid);
			}
		else if (type == EJavaDerivedType)
			{
			CSBJavaId* jid = CSBJavaId::NewL(&(aDataOwner.Identifier()));
			CleanupStack::PushL(jid);
			filename.Append(KJid);
			filename.Append(jid->SuiteHashL());
			CleanupStack::PopAndDestroy(jid);
			}

		filename.Append(KBackupExtn);
		//HBufC8* data = HBufC8::NewLC(aDataOwner.Size());

		HBufC8* data = aDataOwner.ExternaliseLC();
		WriteToDiskL(filename, *data);
		CleanupStack::PopAndDestroy(data);
		delete dir;
		dir = NULL;
		}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:56,代码来源:t_storagemanager.cpp

示例2: GetSIDPrivateDirName

	void CStorageManager::GetSIDPrivateDirName(TChar aDrive, TSecureId aSID, TFileName& aFileName) const
		/**
		Gets the name of the directory where the private data is to stored:\n
		\<backup directory>\\KPrivateDirName\\<aSID>\\

		@internalComponent
		@released

		@param aDrive - The drive letter of the drive where data resides.
		@param aSID - SID the data belonds to.

		@param aFileName - Directory name of the given SID's private directory, generated in
				line with the implemented naming scheme.
		*/
		{
		aFileName = iBackupDirName;
		aFileName.AppendNumUC(aSID, EHex);
		aFileName.Append(KSlash);
		aFileName.Append(aDrive);
		aFileName.Append(KSlash);
		}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:21,代码来源:t_storagemanager.cpp

示例3: TestChineseInputL

void CBCTestPtiEngine::TestChineseInputL()
    {
    TeardownL();

    if((iEngine = CreateEngineL(ELangPrcChinese, EPtiEngineStroke))!=NULL)
        {
        AssertNotNullL(iEngine, _L("Chinese Pinyin activated"));
        SimuInput(iEngine, _L("wei"));

        int page=0;
        iEngine->SetCandidatePageLength(20);
        AssertTrueL(ETrue, _L("page length set to 20"));
        for(TPtrC str=iEngine->CandidatePage();
                iEngine->MoreCandidatePages();
                iEngine->NextCandidatePage())
            {
            TFileName res;
            res.Format(_L("page[%d]: "), page++);
            for(int j=0; j<str.Length(); ++j)
                {
                res.Append(_L("<"));
                res.AppendNumUC(str[j], EHex);
                res.Append(_L(">"));
                }
            res.ZeroTerminate();
            AssertTrueL(ETrue, res);

            if(page>10)
                {
                break;
                }
            }//end of for

        //predict
        iEngine->PreviousCandidatePage();
        TPtrC aChar=iEngine->CandidatePage();
        iEngine->SetPredictiveChineseChar(aChar);
        AssertTrueL(ETrue, _L("next chinese char predicted"));

        //test next candidate list
        iEngine->CommitCurrentWord();
        CDesCArray* cands = new (ELeave) CDesCArrayFlat(16);
        CleanupStack::PushL(cands);

        TRAPD(err, iEngine->GetNextWordCandidateListL(*cands));
        if(err == KErrNotSupported)
            {
            AssertTrueL(ETrue, _L("predict next candidate not supported"));
            }
        else{
            TFileName msg=_L("candidates: ");
            for (int i = 0; i < cands->Count(); ++i)
            {
                msg.Append(cands->MdcaPoint(i));
                msg.Append(_L(", "));
            }
            msg.ZeroTerminate();
            AssertTrueL(ETrue, msg);
            }
        CleanupStack::PopAndDestroy();  // cands

        //test conversion
        TInt convCap=iEngine->AvailableCharConversions();
        if((convCap & EPtiSimplifiedToComplex)!=0)
            {
            AssertTrueL(ETrue, _L("can convert from simplified chinese to traditional"));
            }
        else
            {
            AssertIntL(0, convCap, _L("conv capability:"));
            }
        char inbuf[]={0x76, 0x84};
        char outbuf[]={0,0};
        iEngine->CharConversion(EPtiSimplifiedToComplex, inbuf, 2, outbuf);
        AssertTrueL(ETrue, _L("tried char conversion"));

        //Chinese Varient
        RArray<TInt> modes;
        iEngine->GetModeNameIndexL(EPtiChineseVariantPrc, modes);
        AssertTrueL(ETrue, _L("Chinese varient index table got"));
        modes.Close();

        //phrase list
        iEngine->ClearCurrentWord();
        SimuInput(iEngine, _L("wei"));
        cands = new (ELeave) CDesCArrayFlat(16);
        CleanupStack::PushL(cands);
        iEngine->GetChinesePhraseCandidatesL(*cands);
        AssertTrueL(ETrue, _L("Chinese phrase candidate list got"));
        CleanupStack::PopAndDestroy();  //cands

        TestSpellL();
        TestDictL();// test Pinyin dict.
        }
    else
        {
        AssertTrueL(ETrue, _L("unable to activate Chinese Pinyin"));
        if ( iEngine == NULL )
            {
            SetupL();
//.........这里部分代码省略.........
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:101,代码来源:bctestptiengine.cpp

示例4: GetSIDFileNameL

	void CStorageManager::GetSIDFileNameL(CSBSIDTransferType* aTransferType, TFileName& aFileName)
		/**
		Concatenates the name of the backup file from the information found in aTransferType.

		@internalComponent
		@released

		@param 	aTransferType - A CSBSIDTransferType* containing information about the
				type of file name that needs be returned.

		@param TFilename of the backup file generated in line with the
				implemented naming scheme

		*/
		{
		__ASSERT_DEBUG(aTransferType != NULL, User::Panic(KBURTestPanicText, ENullTargetPointer));
		TSecureId sid;
		TChar drive;
		TDriveNumber driveNumber;
		TTransferDataType dataType;

		sid = aTransferType->SecureIdL();
		dataType = aTransferType->DataTypeL();
		driveNumber = aTransferType->DriveNumberL();

		// Get the drive letter
		iTestStep->Fs().DriveToChar(driveNumber, drive);

		switch(dataType)
			{
			case ERegistrationData:
				{
				GetSIDPrivateDirName(drive, sid, aFileName);
				aFileName.Append(KRegFilesDir);
				aFileName.AppendNumUC(sid, EHex);
				aFileName.Append(KBackupExtn);
				break;
				}
				// No need to create this directory, as it's done in SetupDirs():
			case EPassiveSnapshotData:
				{
				GetSIDPrivateDirName(drive, sid, aFileName);
				aFileName.Append(KPassiveDataDir);
				aFileName.Append(KSnapshotDataDir);
				aFileName.Append(KSnapshot);
				aFileName.Append(KBackupExtn);
				break;
				}
			case EPassiveBaseData:
				{
				GetSIDPrivateDirName(drive, sid, aFileName);
				aFileName.Append(KPassiveDataDir);
				aFileName.Append(KBaseDataDir);
				aFileName.Append(KData);
				aFileName.Append(KBackupExtn);
				break;
				}
			case EPassiveIncrementalData :
				{
				GetSIDPrivateDirName(drive, sid, aFileName);
				aFileName.Append(KPassiveDataDir);
				aFileName.Append(KIncrementalDataDir);
				break;
				}
			case EActiveSnapshotData:
				{
				GetSIDPrivateDirName(drive, sid, aFileName);
				aFileName.Append(KActiveDataDir);
				aFileName.Append(KSnapshotDataDir);
				aFileName.Append(KSnapshot);
				aFileName.Append(KBackupExtn);
				break;
				}
			case EActiveBaseData:
				{
				GetSIDPrivateDirName(drive, sid, aFileName);
				aFileName.Append(KActiveDataDir);
				aFileName.Append(KBaseDataDir);
				aFileName.Append(KData);
				aFileName.Append(KBackupExtn);
				break;
				}
			case EActiveIncrementalData:
				{
				GetSIDPrivateDirName(drive, sid, aFileName);
				aFileName.Append(KActiveDataDir);
				aFileName.Append(KIncrementalDataDir);
				break;
				}
			default:
				{
				User::Leave(KErrArgument);
				break;
				}
			}

		}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:97,代码来源:t_storagemanager.cpp


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