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


C++ TDesC::Alloc方法代码示例

本文整理汇总了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." );
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:13,代码来源:irbrowsecatagoryitems.cpp

示例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;
}
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:17,代码来源:MainServer.cpp

示例3: SetCachePath

void CResourceManager::SetCachePath(const TDesC& aPath)
{
    if (iCachePath)
        delete iCachePath;

    iCachePath = aPath.Alloc();
}
开发者ID:github188,项目名称:homebrew,代码行数:7,代码来源:ResourceManager.cpp

示例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;
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:12,代码来源:iradvertisement.cpp

示例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." );
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:12,代码来源:irbrowsecatagoryitems.cpp

示例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"));
}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:8,代码来源:Widgets.cpp

示例7: SetCNAPText

void TPhoneCmdParamCallHeaderData::SetCNAPText( 
  const TDesC& aCNAPText,
  TPhoneTextClippingDirection aDirection )
  {
  delete iCNAPText;
  iCNAPText = aCNAPText.Alloc();
  iCNAPTextClippingDirection = aDirection; 
  }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:8,代码来源:phoneuiutils.cpp

示例8: ConstructL

void TPlayerInfo::ConstructL(TDesC& aFileName)
{
    iFileName = aFileName.Alloc();
    InitPlayerInfo();
    //读取存档
    ReadPlayerInfo();
    //排序
    OrderByDesc();
}
开发者ID:jinhuafeng,项目名称:RS-MAN,代码行数:9,代码来源:PlayerInfo.cpp

示例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);
}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:11,代码来源:Widgets.cpp

示例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();
     }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:13,代码来源:epos_comasuplstartver2.cpp

示例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();
     }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:13,代码来源:epos_comasuplstartver2.cpp

示例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;
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:12,代码来源:c_process_pair.cpp

示例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;
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:13,代码来源:afstorageclient.cpp

示例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 ) );
            }
        }
    }
}
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:23,代码来源:ResolvedConnection.cpp

示例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;
        }
    }
}
开发者ID:gvsurenderreddy,项目名称:symbiandump-mw4,代码行数:14,代码来源:HistoryEntry.cpp


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