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


C++ CDesCArray::AppendL方法代码示例

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


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

示例1: SplitText

CDesCArray* CCommonUtils::SplitText(const TDesC& aText,const char& aSplitChar)
{
	CDesCArray* tmpArray = new(ELeave) CDesCArrayFlat(5);
	CleanupStack::PushL(tmpArray);

	TInt len = aText.Length();
	TBuf<100> tmp;
	for ( TInt i = 0; i < len ; i ++)
	{
		if(aText[i] == aSplitChar)
		{
			tmp.TrimAll();
			tmpArray->AppendL(tmp);
			tmp.Zero();
		}
		else
			tmp.Append(aText[i]);		
	}
	if (tmp.Length() > 0 )
	{
		tmp.TrimAll();
		tmpArray->AppendL(tmp);
	}	

	CleanupStack::Pop(tmpArray);
	return tmpArray;
}
开发者ID:flaithbheartaigh,项目名称:lemonplayer,代码行数:27,代码来源:CommonUtils.cpp

示例2: ShowSpreadWayfinderOptionsDialogL

void CSpreadWFDialogs::ShowSpreadWayfinderOptionsDialogL()
{
   //Dialog that lets the user chose between contact bk search
   //and entering a number manually.
   CDesCArray* optionArray = new (ELeave) CDesCArrayFlat(2);
   HBufC* option = CCoeEnv::Static()->AllocReadResourceLC(R_WF_OPTION_CONTACTS);
   optionArray->AppendL(*option);
   CleanupStack::PopAndDestroy(option);
   option = CCoeEnv::Static()->AllocReadResourceLC(R_WF_OPTION_MANUALLY);
   optionArray->AppendL(*option);
   CleanupStack::PopAndDestroy(option);
   TInt preSelIndex = iOptionsIndex;

   typedef TCallBackEvent<CSpreadWFDialogs, TSpreadWFEvent> cb_t;
   typedef CCallBackListDialog<cb_t> cbd_t;
   cbd_t::RunDlgLD(cb_t(this,
                        ESpreadWFEventOptionsOk,
                        ESpreadWFEventOptionsCancel),
                   iOptionsIndex,
                   R_WF_SHARE_WAYFINDER,
                   optionArray,
                   R_WAYFINDER_CALLBACK_SINGLE_LIST_QUERY_OK_BACK,
                   EFalse, 
                   preSelIndex);
}
开发者ID:VLjs,项目名称:Wayfinder-S60-Navigator,代码行数:25,代码来源:SpreadWFDialogs.cpp

示例3: AddItemL

void CMainMenuGridContainer::AddItemL(TInt aBitmapId, TInt aMaskId, 
                                      TInt aIndex) 
{
   CArrayPtr<CGulIcon>* icons = 
      iGrid->ItemDrawer()->FormattedCellData()->IconArray();
   if (!icons) {
      icons = new ( ELeave ) CAknIconArray(9);
      iGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL(icons);
   }
   CleanupStack::PushL(icons);

   CFbsBitmap* bitmap;
   CFbsBitmap* mask;

#ifdef NAV2_CLIENT_SERIES60_V3
   AknIconUtils::CreateIconL(bitmap, mask, iView->GetMbmName(), 
                             aBitmapId, aMaskId);
   AknIconUtils::SetSize(bitmap, iIconRect.Size(),
                         EAspectRatioPreservedAndUnusedSpaceRemoved);
#else
   bitmap = iEikonEnv->CreateBitmapL(iView->GetMbmName(), aBitmapId);
   mask = iEikonEnv->CreateBitmapL(iView->GetMbmName(), aMaskId);
#endif

   CleanupStack::PushL(bitmap);
   CleanupStack::PushL(mask);

   if (aIndex >= 0 && aIndex < icons->Count()) {
      icons->InsertL(aIndex, CGulIcon::NewL(bitmap, mask));
   } else {
      icons->AppendL(CGulIcon::NewL(bitmap, mask));
   }
   CleanupStack::Pop(mask);
   CleanupStack::Pop(bitmap);
   CleanupStack::Pop(icons);

   _LIT(KItem, "%d\t\t0");
   TBuf<8> buf;
   MDesCArray* array = iGrid->Model()->ItemTextArray();
   CDesCArray* cArray = (CDesCArray*)array;
   if (aIndex >= 0 && aIndex < icons->Count()) {
      buf.Format(KItem, aIndex);
      cArray->InsertL(aIndex, buf);
      aIndex++;
      //We need to delete and re-index the array since we inserted
      //a new icon in the icon array.
      cArray->Delete(aIndex, icons->Count() - aIndex);
      for (TInt i = aIndex; i < icons->Count(); i++) {
         buf.Format(KItem, i);
         cArray->AppendL(buf);
      }
   } else {
      buf.Format(KItem, (icons->Count() - 1));
      cArray->AppendL(buf);
   }
   //Inform list box that data was added.
   iGrid->HandleItemAdditionL();
}
开发者ID:VLjs,项目名称:Wayfinder-S60-Navigator,代码行数:58,代码来源:MainMenuGridContainer.cpp

示例4: ConstructL

void CCalendarSettingsQuery::ConstructL()
{				
	CALLSTACKITEM_N(_CL("CCalendarSettingsQuery"), _CL("ConstructL"));
	iSelections = new (ELeave) CDesCArrayFlat(10);
	

	auto_ptr<HBufC> text1( StringLoader::LoadL( R_TEXT_WELCOME_SHOW_TITLE_OF_EVENT ) );
	auto_ptr<HBufC> text2( StringLoader::LoadL( R_TEXT_WELCOME_SHOW_BUSY_INSTEAD ) );
	auto_ptr<HBufC> text3( StringLoader::LoadL( R_TEXT_WELCOME_DONT_SHARE_EVENTS ) );

	
	iSelections->AppendL( *text1 );
	iSelections->AppendL( *text2 );
	iSelections->AppendL( *text3 );
}
开发者ID:flaithbheartaigh,项目名称:jaikuengine-mobile-client,代码行数:15,代码来源:cwu_welcomeaction.cpp

示例5: doCreateDefaultCDesCArrayL

CDesCArray* CPackagerCntFactory::doCreateDefaultCDesCArrayL() const
/** Implementation method for constructing a new default CDesCArray object. 

@return a Pointer to the CDesCArray object. */
	{
	CDesCArray* theTestArray = new(ELeave) CDesCArrayFlat(5);
	CleanupStack::PushL(theTestArray);
	theTestArray->AppendL(KContactItemCompanyName);
	theTestArray->AppendL(KContactItemFamilyName);
	theTestArray->AppendL(KContactItemGivenName);
	theTestArray->AppendL(KContactItemFirstPhoneNumber);
	theTestArray->AppendL(KContactItemSecondPhoneNumber);
	CleanupStack::Pop(theTestArray);
	return theTestArray;
	}					
开发者ID:bavanisp,项目名称:qtmobility-1.1.0,代码行数:15,代码来源:t_packagertesthelper.cpp

示例6: AddFormattedListBoxItemL

void CSearchableListBoxContainer::AddFormattedListBoxItemL( const TDesC& aString )
{
   CTextListBoxModel* model = iListBox->Model();
   CDesCArray* itemArray = static_cast< CDesCArray* > ( model->ItemTextArray() );
   itemArray->AppendL( aString );
   iListBox->HandleItemAdditionL();
}
开发者ID:VLjs,项目名称:Wayfinder-S60-Navigator,代码行数:7,代码来源:SearchableListBoxContainer.cpp

示例7: GetFreeTextForObjectL

void CMdSFindSequence::GetFreeTextForObjectL( CDesCArray& aResultWordBuffer,
		TDefId aNamespaceDefId, TItemId aObjectId )
	{
	_LIT( KMdSFindSeqWords, "SELECT Word FROM TextSearch%u AS ts, TextSearchDictionary%u AS tsd ON tsd.WordId = ts.WordId WHERE ObjectId = ? ORDER BY Position ASC;" );

	CMdsClauseBuffer* buffer = CMdsClauseBuffer::NewLC( KMdSFindSeqWords.iTypeLength + 20 ); // two int
	buffer->BufferL().Format( KMdSFindSeqWords, aNamespaceDefId, aNamespaceDefId );
	
	CMdSSqLiteConnection& connection = MMdSDbConnectionPool::GetDefaultDBL();
	
	RRowData data;
    CleanupClosePushL( data );
	data.AppendL( TColumn( aObjectId ) );
	RMdsStatement query;
    CleanupClosePushL( query );
	connection.ExecuteQueryL( buffer->ConstBufferL(), query, data );
	TPtrC16 word;
	data.Column(0).Set( word );
	while (connection.NextRowL(query, data))
		{
		data.Column(0).Get( word );
		aResultWordBuffer.AppendL( word );
		data.Free();
		}

	CleanupStack::PopAndDestroy( 3, buffer ); // query, data, buffer
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:27,代码来源:mdsfindsequence.cpp

示例8: GetTestCaseNames

// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
//
TInt CSymbianUnitTestLddCtl::GetTestCaseNames(CDesCArray& aTestCaseNames)
    {
    TInt ret = iLddconn.Open(*iDriverName);
    if (ret != KErrNone)
        {
        return ret;
        }
    SUT_LOG_DEBUG("open ldd");

    TInt count;
    ret = iLddconn.GetTestCaseCount(&count);
    SUT_LOG_DEBUGF(_L("user space, test case count:%d"), count);
    if (ret != KErrNone)
        {
        return ret;
        }
    
    for (TInt i = 0; i < count; i++)
        {
        TBuf8<KTestCaseNameLength> testCaseName;
        ret = iLddconn.GetTestCaseName(&i, (TAny*) &testCaseName);
        if (ret != KErrNone)
            {
            return ret;
            }
        TBuf<KTestCaseNameLength> testCaseName16;
        testCaseName16.Copy(testCaseName);
        aTestCaseNames.AppendL(testCaseName16);
        }
    iLddconn.Close();
    SUT_LOG_DEBUG("close ldd");
    return KErrNone;
    }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:37,代码来源:symbianunittestlddctl.cpp

示例9: GetAllRulesL

// ---------------------------------------------------------------------------
// CPresenceXDM::GetAllRulesL()
// ---------------------------------------------------------------------------
//
EXPORT_C void CPresenceXDM::GetAllRulesL(CDesCArray& aRuleIds)
	{
    OPENG_DP(D_OPENG_LIT( "CPresenceXDM::GetAllRulesL" ) );
    CXdmDocumentNode* myRootNode = iPresDocument->DocumentRoot();
    if (!myRootNode)
        return;
    
    RPointerArray<CXdmDocumentNode> nodes;
    CXdmNodeAttribute* idAttribute(NULL);
    
    // Find all rules under root
    if ((myRootNode->Find(KXdmRule, nodes)) == KErrNone)
        { // go through all found rules
        TInt ruleCountInNode = nodes.Count();
        OPENG_DP(D_OPENG_LIT( "     ruleCountInNode = %d" ),ruleCountInNode );
        for (TInt i=0;i<ruleCountInNode;i++)
            { // get the id attribute
            idAttribute = (nodes[i])->Attribute(KXdmId);
            // push it to given discriptor array
            aRuleIds.AppendL(idAttribute->AttributeValue());
            }
        }
    nodes.Close();
    return;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:29,代码来源:cpresencexdm.cpp

示例10: AddToTheListL

/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CCrashContainer::AddToTheListL(const TDesC& aName,const TExitType&  aExitType,const TInt& aExitReason,const TDesC& aExitCategory,CDesCArray& aItemArray)
{
	TBuf<500> AddBuffer(_L("\t"));
	AddBuffer.Append(aName);
	AddBuffer.Append(_L("\t"));

	switch(aExitType)
	{
	case EExitKill:
		AddBuffer.Append(_L("Kill: "));
		break;
	case EExitTerminate:
		AddBuffer.Append(_L("Terminate: "));
		break;
	case EExitPanic:
		AddBuffer.Append(_L("Panic: "));
		break;
	case EExitPending:
		AddBuffer.Append(_L("Pend: "));
		break;
	}
	
	AddBuffer.AppendNum(aExitReason);
	AddBuffer.Append(_L(","));
	AddBuffer.Append(aExitCategory);
	
	aItemArray.AppendL(AddBuffer); 
}
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:32,代码来源:MainContainer.cpp

示例11: Show

TInt CFileSelectDialog::Show()
	{
	_LOG(_L("CFileSelectDialog::Show()"));
	TInt sel=0;
	CDesCArray* itemList = new (ELeave) CDesCArrayFlat(3);
	if (iCurrentPath.Compare(_L(""))!=0){if (iType==EFolder){iArray->InsertL(0,_L("Select folder"));}iArray->InsertL(0,_L("..."));}
	_LOGDATA(_L("Length of array: %d"),iArray->Count());
	
	for (TInt i=0;i<iArray->Count();i++)
		{
		TBuf<255> ItemTxt;
		ItemTxt.Copy(_L("0\t"));
		ItemTxt.Append(iArray->MdcaPoint(i));
		ItemTxt.Append(_L("\t\t"));
		itemList->AppendL(ItemTxt);
		_LOGDATA(_L("Item: %S"),&iArray->MdcaPoint(i));
		}
	_LOG(_L("Will create dialog"));
	SetItemTextArray(itemList);
    ListBox()->HandleItemAdditionL();
    Layout();
    ListBox()->SetCurrentItemIndex(0);
    ListBox()->DrawNow();
    DrawDeferred();
	}
开发者ID:kolayuk,项目名称:ActiveJack,代码行数:25,代码来源:FileSelectDialog.cpp

示例12: GetManyIdentityElementsL

// ---------------------------------------------------------------------------
// TPresCondIdentityMany::GetManyIdentityElementsL()
// ---------------------------------------------------------------------------
//
EXPORT_C TInt TPresCondIdentityMany::GetManyIdentityElementsL(const TDesC& aRuleID,
        CDesCArray& aDomains)
{
    OPENG_DP(D_OPENG_LIT( "TPresCondIdentityMany::GetManyIdentityElementsL()" ) );
    OPENG_DP(D_OPENG_LIT( "     aRuleID = %S" ),&aRuleID);

    __ASSERT_ALWAYS(iPresXDM, User::Leave(KErrNotReady));

    CXdmDocumentNode* identityNode = iPresXDM->GetConditionChildNodeL(aRuleID,
                                     KXdmIdentity, EFalse);
    if(identityNode==NULL)
        return 0;

    RPointerArray<CXdmDocumentNode> nodes;
    CXdmNodeAttribute* domainAttr(NULL);

    // finding 'many' nodes
    TInt err = identityNode->Find(KXdmMany, nodes);

    // extracting entities from id nodes
    TInt manyCountInNode = nodes.Count();

    OPENG_DP(D_OPENG_LIT( "     manyCountInNode = %d" ),manyCountInNode);

    for (TInt i=0; i<manyCountInNode; i++)
    {   // get the domain attribute
        domainAttr = (nodes[i])->Attribute(KXdmDomain);
        if(domainAttr)
            // push it to given discriptor array
            aDomains.AppendL(domainAttr->AttributeValue());
    }

    nodes.Close();
    return manyCountInNode;
}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:39,代码来源:prescondidentitymany.cpp

示例13: GetAvailableHeightsInTwipsAndPointsL

EXPORT_C TInt FontUtils::GetAvailableHeightsInTwipsAndPointsL(const CGraphicsDevice& aDevice,const TDesC& aTypefaceName,CArrayFix<TInt>& aTwipsList,CDesCArray& aPointsList)
/** Gets a list of all heights in twips, available for the named typeface and the 
graphics device specified.

Also gets a list of heights in points, represented as character strings.

@param aDevice The graphics device.
@param aTypefaceName The name of the typeface.
@param aTwipsList On return, contains all available heights for the typeface, 
in twips.
@param aPointsList On return, the heights in points, represented as character 
strings.
@return KErrNotSupported if the named typeface is not supported by the graphics 
device, otherwise KErrNone. */
	{ // static
	aTwipsList.Reset();
	aPointsList.Reset();
	TInt err=GetAvailableHeightsInTwipsL(aDevice,aTypefaceName,aTwipsList);
	if (err==KErrNotSupported)
		return err;
	const TInt count=aTwipsList.Count();
	for (TInt ii=0;ii<count;ii++)
		{
		const TInt points=PointsFromTwips(aTwipsList[ii]);
		if (points<EMinFontHeight)
			continue;
		TBuf<8> num;
		num.Num(points);
		aPointsList.AppendL(num);
		}
	return KErrNone;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:32,代码来源:GULUTIL.CPP

示例14: ListDatabasesLC

// ---------------------------------------------------------
// CPosLmDatabaseManagerImpl::ListDatabasesLC
//
// (other items were commented in a header).
// ---------------------------------------------------------
//
CDesCArray* CPosLmDatabaseManagerImpl::ListDatabasesLC(
    const TDesC& aProtocol)
    {
    CDesCArray* resultList = NULL;

    if (aProtocol == KNullDesC)
        {
        TInt pluginCount = iPlugins->NumberOfInstances();
        for (TInt i = 0; i < pluginCount; i++)
            {
            if (i == 0)
                {
                resultList = iPlugins->GetInstanceAt(i)->ListDatabasesLC();
                }
            else
                {
                CDesCArray* dbList =
                    iPlugins->GetInstanceAt(i)->ListDatabasesLC();
                TInt dbCount = dbList->Count();
                for (TInt j = 0; j < dbCount; j++)
                    {
                    resultList->AppendL((*dbList)[j]);
                    }
                CleanupStack::PopAndDestroy(dbList);
                }
            }
        }
    else
        {
        CPosLmDatabaseManagerPluginBase* plugin =
            iPlugins->GetInstanceL(aProtocol);
        resultList = plugin->ListDatabasesLC();
        }
    return resultList;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:41,代码来源:EPos_CPosLmDatabaseManagerImpl.cpp

示例15: GetAvailableFontsL

EXPORT_C void FontUtils::GetAvailableFontsL(const CGraphicsDevice& aDevice, CDesCArray& aFontNameList,TInt aFonts)
/** Gets the list of typeface names available for the graphics device.

@param aDevice The graphics device.
@param aFontNameList On return, contains the list of typeface names.
@param aFonts Can be used to specify which sorts of typefaces are required. 
For possible values, see the flags defined in gulftflg.hrh 
beginning with EGulAllFonts. */
	{ // static
	aFontNameList.Reset();
	const TInt numTypefaces=aDevice.NumTypefaces();
	TTypefaceSupport typefaceInfo;
	for (TInt ii=0;ii<numTypefaces;ii++)
		{
		aDevice.TypefaceSupport(typefaceInfo,ii);
		if (typefaceInfo.iTypeface.IsProportional())
			{
			if (aFonts==EGulMonospaceFontsOnly)
				continue;
			}
		else if (aFonts==EGulNoMonospaceFonts || aFonts==EGulNoMonospaceOrSymbolFonts)
			continue;
		if (typefaceInfo.iTypeface.IsSymbol())
			{
			if (aFonts==EGulNoSymbolFonts || aFonts==EGulNoMonospaceOrSymbolFonts || aFonts==EGulMonospaceFontsOnly)
				continue;
			}
		else if (aFonts==EGulSymbolFontsOnly)
			continue;
		aFontNameList.AppendL(typefaceInfo.iTypeface.iName);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:32,代码来源:GULUTIL.CPP


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