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


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

本文整理汇总了C++中TDesC::AllocL方法的典型用法代码示例。如果您正苦于以下问题:C++ TDesC::AllocL方法的具体用法?C++ TDesC::AllocL怎么用?C++ TDesC::AllocL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TDesC的用法示例。


在下文中一共展示了TDesC::AllocL方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ConstructL

void CFolderScanner::ConstructL(  CFolderScanner_if* client
								, const TDesC& folder
								, const TDesC& ext
								, int aScanPeriod)

	{
	iClient = client;
	iTimeout = aScanPeriod;

	iFolder = folder.AllocL();
	iScanExt = ext.AllocL();

	User::LeaveIfError(iFs.Connect());	

	// Check that folder really exist
    TEntry entry;
	TInt err = iFs.Entry(folder, entry);

	// If not found, attempt to create
	if(err == KErrNotFound)
		{
		err = iFs.MkDirAll(*iFolder);
		}
	User::LeaveIfError(err);

	// Create a timer
	iTimer = CSysTimer::NewL(this, 0);

	// we want first callback immediately
	iTimer->MilliSeconds(0);
	}
开发者ID:fedor4ever,项目名称:packaging,代码行数:31,代码来源:FolderScanner.cpp

示例2: ConstructL

void CPostProcessorInfo::ConstructL(const TDesC& aManufacturer,
									const TDesC& aIdentifier,
									const TArray<TUncompressedVideoFormat>& aSupportedFormats,
									const TArray<TUint32>& aSupportedCombinations,
									const TArray<TScaleFactor>& aSupportedScaleFactors,
									const TDesC8& aImplementationSpecificInfo)
	{
	iManufacturer = aManufacturer.AllocL();
	iIdentifier = aIdentifier.AllocL();
	iImplementationSpecificInfo = aImplementationSpecificInfo.AllocL();

	TInt i=0;
	TInt supportedFormatsCount = aSupportedFormats.Count();
	for (i=0; i<supportedFormatsCount; i++)
		{
		User::LeaveIfError(iSupportedFormats.Append(aSupportedFormats[i]));
		}

	TInt supportedCombinationsCount = aSupportedCombinations.Count();
	for (i=0; i<supportedCombinationsCount; i++)
		{
		User::LeaveIfError(iSupportedCombinations.Append(aSupportedCombinations[i]));
		}

	TInt supportedScaleFactors = aSupportedScaleFactors.Count();
	for (i=0; i<supportedScaleFactors; i++)
		{
		User::LeaveIfError(iSupportedScaleFactors.Append(aSupportedScaleFactors[i]));
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:30,代码来源:devvideoplay.cpp

示例3: ConstructL

void CNcdSubscriptionsSourceIdentifier::ConstructL(
    const TDesC& aUri,
    const TDesC& aNamespace )
    {
    iUri = aUri.AllocL();
    iNamespace = aNamespace.AllocL();
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:7,代码来源:ncdsubscriptionssourceidentifier.cpp

示例4: AddCollectionDataL

// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
//
void CPosLmXmlEncoder::AddCollectionDataL(
    TPosLmCollectionDataId aDataId,
    const TDesC& aCollectionData)
    {
    __ASSERT_ALWAYS((iEncoderStatus != EPosUninitialized) &&
        (iEncoderStatus != EPosLmInfoAdded),
        Panic(KPosLandmarksClientPanic, EPosLmProtocolBreak));

    __ASSERT_ALWAYS(aDataId != EPosLmCollDataNone,
        Panic(KPosLandmarksClientPanic, EPosLmInvalidArgument));

    if (aDataId == EPosLmCollDataCollectionName)
        {
        if (iCollectionDataName)
            {
            User::Leave(KErrAlreadyExists);
            }
        iCollectionDataName = aCollectionData.AllocL();
        }
    else if (aDataId == EPosLmCollDataCollectionDescription)
        {
        if (iCollectionDataDescription)
            {
            User::Leave(KErrAlreadyExists);
            }
        iCollectionDataDescription = aCollectionData.AllocL();
        }
    else
        {
        // Silently ignore unknown collection data.
        return;
        }

    iEncoderStatus = EPosCollectionInfoAdded;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:38,代码来源:EPos_CPosLmXmlEncoder.cpp

示例5: SetAttributeDesL

// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
TInt  CSvgStyleElementImpl::SetAttributeDesL( const TInt aNameId,
											   const TDesC& aValue )
	{

	switch (aNameId)
		{
		case KAtrType:
				     delete iType;
                     iType = NULL;
					 iType = aValue.AllocL();
					 break;
		case KAtrMedia:
					 delete iMedia;
					 iMedia = NULL;
				     iMedia = aValue.AllocL();
				     break;
		case KAtrTitle:
					 delete iTitle;
					 iTitle = NULL;
			         iTitle = aValue.AllocL();
						break;

		default:
				return CSvgElementImpl::SetAttributeDesL( aNameId, aValue );

		}
	return KErrNone;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:31,代码来源:SVGStyleElementImpl.cpp

示例6: ConstructL

// ---------------------------------------------------------------------------
// CAknDiscreetPopupDrawer::ConstructL
// ---------------------------------------------------------------------------
//
void CAknDiscreetPopupDrawer::ConstructL( const TDesC& aTitleText, 
                                          const TDesC& aBodyText,
                                          const TAknsItemID& aSkinId,
                                          const TDesC& aBitmapFile,
                                          const TInt& aBitmapId,
                                          const TInt& aMaskId )
    {
    // Body text to title text if title text is empty
    if ( aTitleText == KNullDesC && aBodyText != KNullDesC )
        {
        iTitleText = aBodyText.AllocL();
        }
    else
        {
        iTitleText = aTitleText.AllocL();
        iBodyText = aBodyText.AllocL();
        }

    if ( !iIcon )
        {
        iIcon = CreatePopupIconL( aSkinId, 
                                  aBitmapFile, 
                                  aBitmapId, 
                                  aMaskId );
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:30,代码来源:akndiscreetpopupdrawer.cpp

示例7: ConstructL

// Symbian OS default constructor can leave.
void CBSBrandHandler::ConstructL( const TDesC& aApplicationId,
						 		  const TDesC& aBrandId,
						 		  const TDesC& aDefaultBrandId,
						 		  CBSSession* aSession )
    {
	iApplicationId = aApplicationId.AllocL();
	iBrandId = aBrandId.AllocL();
	iDefaultBrandId = aDefaultBrandId.AllocL();
	iSession = aSession;
	
	User::LeaveIfError( iFs.Connect() );
	
	iHandle = new(ELeave) RFile(); // CSI: 74 # this needs to be like this

	isDefaultBrandUsed = ETrue;
	iStorageManager = CBSStorageManager::NewL( iSession, KNullDesC );
    TInt err = -1;
    TRAP (err, iStorageManager->BrandHandleL( *iApplicationId,
                                   *iBrandId, iLanguage,
                                   *iHandle,
                                   iReserved ));


    if (err != KErrNone)
        {
	iStorageManager->BrandHandleL( *iApplicationId,
                                           *iDefaultBrandId, iLanguage,
								   *iHandle,
								   iReserved );
        }
	VerifyVersionL();
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:33,代码来源:cbsbrandhandler.cpp

示例8: ConstructL

void CMemSpyEngineHelperSysMemTrackerCycleChangeOpenFile::ConstructL( const TDesC& aThreadName, const TDesC& aFileName )
    {
    BaseConstructL();

    // Save the thread name
    iFileName = aFileName.AllocL();
    iThreadName = aThreadName.AllocL();
    }
开发者ID:RomanSaveljev,项目名称:osrndtools,代码行数:8,代码来源:MemSpyEngineHelperSysMemTrackerEntryOpenFile.cpp

示例9: ConstructL

// ---------------------------------------------------------------------------
// ConstructL
// ---------------------------------------------------------------------------
//    
void CNcdKeyValuePair::ConstructL( const TDesC& aKey, const TDesC& aValue )
    {
    if ( !aKey.Length() ) 
        {
        User::Leave( KErrArgument );
        }
        
    iKey = aKey.AllocL();
    iValue = aValue.AllocL();
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:14,代码来源:ncdkeyvaluepair.cpp

示例10: ConstructL

/**
Second phase construtor.
@param aStandardName The standard name of the time zone, for instance "Greenwich Mean
Time", "Pacific Standard Time".
@param aDaylightName The daylight saving time name, for instance "British Summer Time",
"Pacific Daylight Time" of this time zone.
@param aShortStandardName The short standard name, for instance "GMT", "PST" of this
time zone.
@param aShortDaylightName The short daylight saving time name, for instance "BST",
"PDT" of this time zone.
*/
void CTzLocalizedTimeZone::ConstructL(
		const TDesC& aStandardName,
		const TDesC& aDaylightName,
		const TDesC& aShortStandardName,
		const TDesC& aShortDaylightName)
	{
	iStandardName = aStandardName.AllocL();
	iDaylightName = aDaylightName.AllocL();
	iShortStandardName = aShortStandardName.AllocL();
	iShortDaylightName = aShortDaylightName.AllocL();
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:22,代码来源:TzLocalizationDataTypes.cpp

示例11: DLTRACEIN

// ---------------------------------------------------------------------------
// ConstructL
// ---------------------------------------------------------------------------
//        
void CNcdPreviewManager::CNcdPreviewData::ConstructL( 
    const CNcdNodeIdentifier& aId,
    const TDesC& aUri, 
    const TDesC& aPreviewFile,
    const TDesC& aMimeType )
    {
    DLTRACEIN((""));
    iId = CNcdNodeIdentifier::NewL( aId );
    iUri = aUri.AllocL();
    iFilename = aPreviewFile.AllocL();
    iMimeType = aMimeType.AllocL();
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:16,代码来源:ncdpreviewmanager.cpp

示例12: ConstructL

// ----------------------------------------------------------------------------
// CIpsPlgNewChildPartFromFileOperation::ConstructL
// ----------------------------------------------------------------------------
//
void CIpsPlgNewChildPartFromFileOperation::ConstructL(CIpsPlgMsgMapper *aMsgMapper,
    const TDesC& aContentType,
    const TDesC& aFilePath)
    {
    FUNC_LOG;
    iMsgMapper = aMsgMapper;
    iContentType = aContentType.AllocL();
    iFilePath = aFilePath.AllocL();

    // Start from attachment manager initialization
    InitAttachmentManagerL();
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:16,代码来源:ipsplgnewchildpartfromfileoperation.cpp

示例13: ConstructL

void CMemSpyEngineSinkMetaData::ConstructL( const TDesC& aRoot, const TDesC& aContext, const TDesC& aFolder, const TDesC& aExtension, const TTime& aFolderTime )
{
    iRoot = aRoot.AllocL();
    iContext = aContext.AllocL();
    iFolder = aFolder.AllocL();
    iExtension = aExtension.AllocL();

    const TDateTime dt = aFolderTime.DateTime();
    HBufC* spec = HBufC::NewLC( KMaxFileName );
    TPtr pName( spec->Des() );
    pName.Format( KMemSpyDataStreamFolderNameFormatSpec, dt.Year(), dt.Month()+1, dt.Day()+1, dt.Hour(), dt.Minute(), dt.Second());
    iFolderTimeStamp = pName.AllocL();
    CleanupStack::PopAndDestroy( spec );
}
开发者ID:kuailexs,项目名称:symbiandump-os2,代码行数:14,代码来源:MemSpyEngineOutputSink.cpp

示例14: SetFileParamsL

/** Sets file parameters
@publishedPartner
@deprecated
@param aFileName A file name containing full path to be used to start up a component.
@param aArgs A string that will be used as an argument to the component when starting.
*/
EXPORT_C void CStartupProperties::SetFileParamsL(const TDesC& aFileName, const TDesC& aArgs)
	{
	HBufC* fname = aFileName.AllocL();
	delete iFileName;
	iFileName = fname;
	TPtr writeableFilename = iFileName->Des();
	writeableFilename.TrimAll();
	
	HBufC* args = aArgs.AllocL();
	delete iArgs; 
	iArgs = args;	
	TPtr writeableArgs = iArgs->Des();
	writeableArgs.TrimAll();
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:20,代码来源:startupproperties.cpp

示例15: ChangeText

void CCurThreeListBoxItem::ChangeText(const TDesC& aText,const TDesC& aSecondLine,const TDesC& aThirdLine)
{
	ASSERT(iSlideText);
	iSlideText->SetText(aText);

	delete iSecondText;
	iSecondText = NULL;
	iSecondText = aSecondLine.AllocL();

	delete iThirdText;
	iThirdText = NULL;
	iThirdText = aThirdLine.AllocL();
	RequestDraw();
}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:14,代码来源:ListBoxItem.cpp


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