本文整理汇总了C++中TDes8::AppendNum方法的典型用法代码示例。如果您正苦于以下问题:C++ TDes8::AppendNum方法的具体用法?C++ TDes8::AppendNum怎么用?C++ TDes8::AppendNum使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TDes8
的用法示例。
在下文中一共展示了TDes8::AppendNum方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TimeFormat
void CRuleManager::TimeFormat(const TTime& aTime,TDes8& aDes)
{
TDateTime time = aTime.DateTime();
TInt hour,minute;
hour = time.Hour() ;
minute = time.Minute() ;
aDes.AppendNum(hour);
aDes.Append(':');
aDes.AppendNum(minute);
}
示例2: GenerateRandomCid
// --------------------------------------------------------------------------------------
// Generates random CID
// --------------------------------------------------------------------------------------
//
void CXmlEngSerializerXOP::GenerateRandomCid(TDes8& aCid)
{
_LIT8(KAt, "@");
//generate random CID as <randomNumber>@<homeTime>
TTime now;
now.HomeTime();
TInt64 homeTime = now.Int64();
TUint32 randomNumber = Math::Random();
aCid.AppendNum(randomNumber);
aCid.Append(KAt);
aCid.AppendNum(now.Int64());
}
示例3: FormatSqlStmt
static void FormatSqlStmt(TDes8& aSqlBuf, const char aSql[], TInt aRecIds[], TInt aRecCnt)
{
aSqlBuf.Copy(TPtrC8((const TUint8*)aSql));
aSqlBuf.Append(_L8("("));
for(TInt i=0;i<aRecCnt;++i)
{
aSqlBuf.AppendNum((TInt64)aRecIds[i]);
aSqlBuf.Append(_L8(","));
}
aSqlBuf.SetLength(aSqlBuf.Length() - 1);
aSqlBuf.Append(_L8(")"));
}
示例4: AppendTimeDifference
void AppendTimeDifference(TDes8& aInto, TTime from, TTime now)
{
CALLSTACKITEM_N(_CL("CLocaLogicImpl"), _CL("~CLocaLogicImpl"));
if (from > now) {
TTime s=from;
from=now;
now=s;
}
for(;;) {
TTimeIntervalMinutes mins;
if (now.MinutesFrom(from, mins)!=KErrNone) {
mins=61;
}
TTimeIntervalHours hours;
if (now.HoursFrom(from, hours)!=KErrNone) {
hours=25;
}
TTimeIntervalDays days;
days=now.DaysFrom(from);
if (mins < TTimeIntervalMinutes(60)) {
aInto.AppendNum(mins.Int());
aInto.Append(_L8(" minutes "));
break;
} else if ( hours < TTimeIntervalDays(24)) {
aInto.AppendNum(hours.Int());
aInto.Append(_L8(" hours "));
from+=TTimeIntervalHours(hours);
} else {
aInto.AppendNum(days.Int());
aInto.Append(_L8(" days "));
from+=TTimeIntervalDays(days);
}
}
}