本文整理汇总了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);
}
}
示例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);
}
示例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"));
}
示例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);
}
}
示例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);
}
示例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);
}
示例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"));
}