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


C++ TDes::AppendNum方法代码示例

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


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

示例1: GenerateIncNumber

	void CStorageManager::GenerateIncNumber(TInt aIndex, TDes& aDes)
		/**
		Generates number from int to string in range 0 - 999

		@param aIndex - Number
		@param aDes - A Descriptor
		*/

		{
		if (aIndex <= 9)
			{
			aDes.AppendNum(0);
			aDes.AppendNum(0);
			aDes.AppendNum(aIndex);
			}
		else if (aIndex <= 99)
			{
			aDes.AppendNum(0);
			aDes.AppendNum(aIndex);
			}
		else if (aIndex <= 999)
			{
			aDes.AppendNum(aIndex);
			}
		else
			{
			_LIT(KPanic1, "Number greater then 999 ");
			User::Panic(KPanic1, KErrNotSupported);
			}
		}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:30,代码来源:t_storagemanager.cpp

示例2: PrepareLuidQuery

void CSCOMOAdapterDb::PrepareLuidQuery(TInt aLuid, TDes& aSqlQuery)
{
	aSqlQuery.Copy(_L("SELECT * FROM "));
    aSqlQuery.Append(KTableAMMgmtObject);
    aSqlQuery.Append(_L(" WHERE "));
    aSqlQuery.Append(NCol2);
    aSqlQuery.Append(_L(" = "));
    aSqlQuery.AppendNum(aLuid);
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:9,代码来源:omascomoadapterdb.cpp

示例3: GetInfoBufferL

/*
-------------------------------------------------------------------------
-------------------------------------------------------------------------
*/
void CTraceContainer::GetInfoBufferL(TExampleItem& aItem,TDes& aBuffer)
{
	aBuffer.Zero();

	
	aBuffer.Append(_L("\n"));
	aBuffer.Append(_L("Time:\n"));
	aBuffer.AppendNum(aItem.iTime.DateTime().Hour());
	aBuffer.Append(_L(":"));
	if(aItem.iTime.DateTime().Minute() < 10)
	{
		aBuffer.AppendNum(0);	
	}
	aBuffer.AppendNum(aItem.iTime.DateTime().Minute());
	aBuffer.Append(_L(":"));
	if(aItem.iTime.DateTime().Second() < 10)
	{
		aBuffer.AppendNum(0);	
	}
	aBuffer.AppendNum(aItem.iTime.DateTime().Second());
	
	aBuffer.Append(_L(" - "));

	if(aItem.iTime.DateTime().Day() < 9)
	{
		aBuffer.AppendNum(0);	
	}
	aBuffer.AppendNum(aItem.iTime.DateTime().Day() + 1);
	aBuffer.Append(_L("/"));
	
	TMonthNameAbb ThisMonth(aItem.iTime.DateTime().Month());
	aBuffer.Append(ThisMonth);
	aBuffer.Append(_L("/"));
	
	TInt Yearrr = aItem.iTime.DateTime().Year();
	TInt Hudreds = Yearrr / 100;
	
	Yearrr = (Yearrr - (Hudreds * 100));
	if(Yearrr < 10)
	{
		aBuffer.AppendNum(0);	
	}
	
	aBuffer.AppendNum(Yearrr);
	aBuffer.Append(_L("\n"));
}
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:50,代码来源:MainContainer.cpp

示例4: AddrLen

EXPORT_C void TE64Addr::Output(TDes& aBuf) const
{
	TPtrC8 e64Addr(AddrPtrC(), AddrLen());
	TUint i;

	for (i = 0; i < AddrLen(); i++)
	{
		if (i) {
			aBuf.Append(':');
		}

		aBuf.AppendNum(TUint(e64Addr[i]), EHex);
	}
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:14,代码来源:eui_addr.cpp

示例5: BuildCacheFileNameL

void TlsCacheUtil::BuildCacheFileNameL(TDes& aFileName, TUid aSid, RFs& aFs)
	{
	TDriveUnit drive(SystemDrive());
	TDriveName driveName(drive.Name());
	aFileName.Append(driveName);
	
	TPath path;
	User::LeaveIfError(aFs.PrivatePath(path));
	aFileName.Append(path);
	
	_LIT(KCacheExtension, ".cce");
	aFileName.AppendNum(aSid.iUid, EHex);
	aFileName.Append(KCacheExtension);
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:14,代码来源:tlscacheutils.cpp

示例6: CreateScreenSemaphoreName

/**
This global function is used for the creation of the name of the semaphore, which helps
RWindows functionality to detect the moment, when the related Windows OS window can be 
destroyed safely - no more clients (Symbian OS screen devices).
@param aScreenNo Screen number
@param aScreenSemaphoreName An output parameter, where the semaphore name will be constructed
                            in the following format "WindowInUseSemaphore<ScreenNo>".
                            The length of aScreenSemaphoreName should be big enough for
                            the semaphore name.
@internalComponent
*/
void CreateScreenSemaphoreName(TInt aScreenNo, TDes& aScreenSemaphoreName)
    {
    aScreenSemaphoreName.Copy(KWindowInUseSemaphore);
    aScreenSemaphoreName.AppendNum(aScreenNo);
    }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:16,代码来源:WINS.CPP

示例7: GetInfoBufferL

/*
-------------------------------------------------------------------------
-------------------------------------------------------------------------
*/
void CCrashContainer::GetInfoBufferL(CExampleItem& aItem,TDes& aBuffer)
{
	aBuffer.Zero();
	
/*	if(aItem.iProcess)
	{
		aBuffer.Append(_L("Executable:\n"));
		aBuffer.Append(*aItem.iProcess);
	
		aBuffer.Append(_L("\n"));
	}
*/	
	if(aItem.iName)
	{
		aBuffer.Append(_L("Thread name:\n"));
		aBuffer.Append(*aItem.iName);
	
		aBuffer.Append(_L("\n"));
	}
	
	if(aItem.iExitCatogory)
	{
		aBuffer.Append(_L("Exit category:\n"));
		aBuffer.Append(*aItem.iExitCatogory);
	
		aBuffer.Append(_L("\n"));
	}
	
	aBuffer.Append(_L("Exit type:\n"));

	switch(aItem.iExitType)
	{
	case EExitKill:
		aBuffer.Append(_L("Kill"));
		break;
	case EExitTerminate:
		aBuffer.Append(_L("Terminate"));
		break;
	case EExitPanic:
		aBuffer.Append(_L("Panic"));
		break;
	case EExitPending:
		aBuffer.Append(_L("Pend"));
		break;
	}

	aBuffer.Append(_L("\n"));
	aBuffer.Append(_L("Exit reason:\n"));
	aBuffer.AppendNum(aItem.iExitReason);
	
	aBuffer.Append(_L("\n"));
	aBuffer.Append(_L("Time:\n"));
	aBuffer.AppendNum(aItem.iTime.DateTime().Hour());
	aBuffer.Append(_L(":"));
	if(aItem.iTime.DateTime().Minute() < 10)
	{
		aBuffer.AppendNum(0);	
	}
	aBuffer.AppendNum(aItem.iTime.DateTime().Minute());
	aBuffer.Append(_L(":"));
	if(aItem.iTime.DateTime().Second() < 10)
	{
		aBuffer.AppendNum(0);	
	}
	aBuffer.AppendNum(aItem.iTime.DateTime().Second());
	
	aBuffer.Append(_L(" - "));

	if(aItem.iTime.DateTime().Day() < 9)
	{
		aBuffer.AppendNum(0);	
	}
	aBuffer.AppendNum(aItem.iTime.DateTime().Day() + 1);
	aBuffer.Append(_L("/"));
	
	TMonthNameAbb ThisMonth(aItem.iTime.DateTime().Month());
	aBuffer.Append(ThisMonth);
	aBuffer.Append(_L("/"));
	
	TInt Yearrr = aItem.iTime.DateTime().Year();
	TInt Hudreds = Yearrr / 100;
	
	Yearrr = (Yearrr - (Hudreds * 100));
	if(Yearrr < 10)
	{
		aBuffer.AppendNum(0);	
	}
	
	aBuffer.AppendNum(Yearrr);
	aBuffer.Append(_L("\n"));
}
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:95,代码来源:MainContainer.cpp


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