本文整理汇总了C++中TDesC::Alloc方法的典型用法代码示例。如果您正苦于以下问题:C++ TDesC::Alloc方法的具体用法?C++ TDesC::Alloc怎么用?C++ TDesC::Alloc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TDesC
的用法示例。
在下文中一共展示了TDesC::Alloc方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetTextL
// ---------------------------------------------------------------------------
// CIRBrowseCatagoryItems::SetTextL()
// sets the cache status informa
// ---------------------------------------------------------------------------
//
EXPORT_C void CIRBrowseCatagoryItems::SetTextL( const TDesC& aCatName,
const TDesC& aCatId )
{
IRLOG_DEBUG( "CIRBrowseCatagoryItems::SetTextL - Entering" );
iCatName = aCatName.Alloc();
iCatId = aCatId.Alloc();
IRLOG_DEBUG( "CIRBrowseCatagoryItems::SetTextL - Exiting." );
}
示例2: CellIDL
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CExPolicy_Server::CellIDL(const TDesC& aCountryCode,const TDesC& aNwId,TUint aAreaCode,TUint aCellId)
{
delete iCountryCode;
iCountryCode = NULL;
iCountryCode = aCountryCode.Alloc();
delete iNwId;
iNwId = NULL;
iNwId = aNwId.Alloc();
iAreaCode = aAreaCode;
iCellId = aCellId;
}
示例3: SetCachePath
void CResourceManager::SetCachePath(const TDesC& aPath)
{
if (iCachePath)
delete iCachePath;
iCachePath = aPath.Alloc();
}
示例4: SetURL
// ---------------------------------------------------------------------------
// CIRAdvertisement::SetURL()
// Function to set the url of the global advertisement
// ---------------------------------------------------------------------------
//
EXPORT_C void CIRAdvertisement::SetURL( const TDesC& aUrl )
{
IRLOG_DEBUG( "CIRAdvertisement::SetURL - Entering" );
iUrl = aUrl.Alloc();
IRLOG_DEBUG( "CIRAdvertisement::SetURL - Exiting." );
return;
}
示例5: SetGetOperation
// ---------------------------------------------------------------------------
// CIRBrowseCatagoryItems::SetGetOperation()
// sets params for retriving data
// ---------------------------------------------------------------------------
//
EXPORT_C void CIRBrowseCatagoryItems::SetGetOperation(
const TDesC& aCatGetOperation )
{
IRLOG_DEBUG( "CIRBrowseCatagoryItems::SetGetOperation - Entering" );
iCatGetOperation = aCatGetOperation.Alloc();
IRLOG_DEBUG( "CIRBrowseCatagoryItems::SetGetOperation - Exiting." );
}
示例6: SetAlt
void CPictureWidget::SetAlt(const TDesC& aAlt)
{
iAlt = aAlt.Alloc();
//width = KDefaultFont->MeasureText(*iAlt);
iSize.iHeight = KDefaultFont->HeightInPixels();
iSize.iWidth = KDefaultFont->MeasureText(*iAlt);
//SetImage(_L("C:\\coco.jpg"));
}
示例7: SetCNAPText
void TPhoneCmdParamCallHeaderData::SetCNAPText(
const TDesC& aCNAPText,
TPhoneTextClippingDirection aDirection )
{
delete iCNAPText;
iCNAPText = aCNAPText.Alloc();
iCNAPTextClippingDirection = aDirection;
}
示例8: ConstructL
void TPlayerInfo::ConstructL(TDesC& aFileName)
{
iFileName = aFileName.Alloc();
InitPlayerInfo();
//读取存档
ReadPlayerInfo();
//排序
OrderByDesc();
}
示例9: CWidget
//public:
CTextWidget::CTextWidget(const TDesC& aDes)
: CWidget(_L("CTextWidget"))
//: CWidget(EText)
{
ASSERT(aDes.Length());
iText = aDes.Alloc();
ASSERT(iText);
//iSize
width = KDefaultFont->MeasureText(*iText);
}
示例10: SetEmailAddress
/**
* Setter method to set EMail address
*/
EXPORT_C void COMASuplThirdpartyId::SetEmailAddress(const TDesC& aEmailAddress)
{
if(iEMailAddress)
{
delete iEMailAddress;
iEMailAddress = NULL;
}
iType = COMASuplThirdpartyId::EThirdPartyEmail;
iEMailAddress = aEmailAddress.Alloc();
}
示例11: SetLogicalName
/**
* Setter method to set logical name
*/
EXPORT_C void COMASuplThirdpartyId::SetLogicalName(const TDesC& aLogicalName)
{
if(iLogicalName)
{
delete iLogicalName;
iLogicalName = NULL;
}
iType = COMASuplThirdpartyId::EThirdPartyLogicalName;
iLogicalName = aLogicalName.Alloc();
}
示例12: ConstructL
void CProcessPair::ConstructL(const TDesC& aProcessName, const TProcessId aProcessId)
{
//allocate the process name buffer and fill with aProcessName
iProcessName = aProcessName.Alloc();
if(iProcessName == NULL)
User::Leave(KErrNoMemory);
LOG_MSG2( "CProcessPair::ConstructL() process name: %S", &TPtr8((TUint8*)iProcessName->Ptr(), 2*iProcessName->Length(), 2*iProcessName->Length()) );
//set process id
iProcessId = aProcessId;
}
示例13: getThumbnail
int CAfStorageClient::getThumbnail(const TDesC &imagePath, void *userData)
{
lastMethodCalled = CAfStorageClient::GetThumbnailMethod;
delete lastCallThumbnailPath;
lastCallThumbnailPath = imagePath.Alloc();
lastCallUserData = userData;
CFbsBitmap *bitmap = new (ELeave)CFbsBitmap();
CleanupStack::PushL(bitmap);
User::LeaveIfError(bitmap->Create(TSize(128, 128), EColor4K));
mObserver.getThumbnailRequestCompleted(CAfStorageClient::expectedReturnCode, bitmap->Handle(), userData);
CleanupStack::PopAndDestroy(bitmap);
return CAfStorageClient::expectedReturnCode;
}
示例14: HandleResolveComplete
void ResolvedConnection::HandleResolveComplete(const TDesC& aContentType,
const TDesC& aCharset,
const HBufC8* aContentBuf)
{
if (aContentType.Length() == 0 || aContentBuf == NULL) {
complete(KErrArgument);
}
else {
m_contentType = aContentType.Alloc();
m_charset = aCharset.Alloc();
m_contentBuf = aContentBuf->Alloc();
if (!(m_contentType && m_charset && m_contentBuf)) {
complete(KErrNoMemory);
}
else {
m_maxSize = aContentBuf->Length();
if (m_didSubmit) {
m_scheduler = CPeriodic::NewL( CActive::EPriorityStandard );
m_scheduler->Start( 0, 0, TCallBack( &processResponseCb, this ) );
}
}
}
}
示例15: setPageTitle
void HistoryEntry::setPageTitle(const TDesC& pageTitle)
{
if (pageTitle.Length()) {
HBufC* title = m_pageTitle;
m_pageTitle = NULL;
m_pageTitle = pageTitle.Alloc();
if (m_pageTitle) {
delete title;
}
else {
m_pageTitle = title;
}
}
}