本文整理汇总了C++中TPtr::AllocL方法的典型用法代码示例。如果您正苦于以下问题:C++ TPtr::AllocL方法的具体用法?C++ TPtr::AllocL怎么用?C++ TPtr::AllocL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPtr
的用法示例。
在下文中一共展示了TPtr::AllocL方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TransLoadL
void CBkmrkProperties::TransLoadL()
{
TUint32 indexBase = IndexBase();
TInt low = 0;
TInt high = 0;
TInt err = iRepository->Get( indexBase + KBkmrkLastModifiedLoIndex, low );
if ( err == KErrNone )
{
User::LeaveIfError(iRepository->Get(indexBase + KBkmrkLastModifiedHiIndex, high));
TUint32 timeLo = static_cast<TUint32>(low);
TUint32 timeHi = static_cast<TUint32>(high);
TInt64 time = MAKE_TINT64(timeHi, timeLo);
iLastModified = time;
}
else
{
// Set the time as 1st January 1970 midnight.
TDateTime dt ( 1970, EJanuary, 1, 0, 0, 0, 0 );
iLastModified = TTime ( dt );
}
HBufC* descBuffer = HBufC::NewLC(Bookmark::KMaxDescriptorLength);
TPtr descPtr = descBuffer->Des();
User::LeaveIfError(iRepository->Get(indexBase + KCmnDescriptionIndex, descPtr));
delete iDescription;
iDescription = NULL;
iDescription = descPtr.AllocL();
CleanupStack::PopAndDestroy(descBuffer);
TInt retVal;
User::LeaveIfError(iRepository->Get(indexBase + KCmnIconIndex, retVal));
iIconId = static_cast<Bookmark::TAttachmentId>(retVal);
iCustomProperties->TransLoadL();
SetClean();
}