本文整理汇总了C++中CArrayFixFlat::AppendL方法的典型用法代码示例。如果您正苦于以下问题:C++ CArrayFixFlat::AppendL方法的具体用法?C++ CArrayFixFlat::AppendL怎么用?C++ CArrayFixFlat::AppendL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CArrayFixFlat
的用法示例。
在下文中一共展示了CArrayFixFlat::AppendL方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TestLqdlgPublishDialogL
// -----------------------------------------------------------------------------
// CTestSDKQueries::TestLqdlgPublishDialogL
// -----------------------------------------------------------------------------
//
TInt CTestSDKQueries::TestLqdlgPublishDialogL( CStifItemParser& /*aItem*/ )
{
TInt selectedOption( KZero );
CDesCArrayFlat* mArray = new (ELeave) CDesCArrayFlat(KTen);
CleanupStack::PushL( mArray );
TBuf< KTen > palabra;
for (TInt num = KZero; num< KTen; num++)
{
palabra.Format(_L("option %d"), num);
mArray->AppendL(palabra);
}
CAknListQueryDialog* dlg = new( ELeave ) CAknListQueryDialog( &selectedOption );
dlg->PrepareLC( R_UPDATE_QUERY_MSG_DIALOG );
dlg->SetItemTextArray( mArray );
dlg->SetOwnershipType( ELbmDoesNotOwnItemArray );
CArrayFixFlat< TInt >* selArray = new( ELeave )CArrayFixFlat< TInt >( KFive );
CleanupStack::PushL( selArray );
selArray->AppendL( KOne );
selArray->AppendL( KThree );
TInt err = KErrNone;
TRAP( err, dlg->PublishDialogL( KOne, KNullUid, selArray ));
CleanupStack::Pop( KOne );
CleanupStack::PopAndDestroy( KTwo );
return KErrNone;
}
示例2: TestLqdlgConstructorLL
// -----------------------------------------------------------------------------
// CTestSDKQueries::TestLqdlgConstructorLL
// -----------------------------------------------------------------------------
//
TInt CTestSDKQueries::TestLqdlgConstructorLL( CStifItemParser& /*aItem*/ )
{
CArrayFixFlat< TInt >* selArray = new( ELeave )CArrayFixFlat< TInt >( KFive );
CleanupStack::PushL( selArray );
selArray->AppendL( KOne );
selArray->AppendL( KThree );
CAknListQueryDialog* dlg = new( ELeave ) CAknListQueryDialog( selArray );
CleanupStack::PushL( dlg );
STIF_ASSERT_NOT_NULL( dlg );
CleanupStack::PopAndDestroy( dlg );
CleanupStack::Pop( selArray );
return KErrNone;
}
示例3: PostEvent
void CContextMediaArrayImpl::PostEvent(CCMPost* aParent, CCMPost* aChild, TEvent aEvent)
{
CALLSTACKITEM_N(_CL("CContextMediaArrayImpl"), _CL("PostEvent"));
if (aParent != iParentPost) return;
if (aEvent==EChildAdded) {
iPostIdArray->AppendL(aChild->iPostId());
iPostArray->AppendL(0);
iObserver.PostEvent(aParent, aChild, aEvent);
}
if (aEvent==EPlaceholderFilled) {
TInt i;
for (i=0; i<iPostIdArray->Count();i++) {
if (iPostIdArray->At(i) == aChild->iPostId()) {
CC_TRAPD(ignore, iStorage.Release(iPostArray->At(i), 0));
iPostArray->At(i) = 0;
iObserver.PostEvent(aParent, aChild, aEvent);
return;
}
}
}
if (aEvent==EPostHidden) {
ReadFromStorage();
iObserver.PostEvent(aParent, aChild, aEvent);
}
if (aEvent==EPostVisible) {
ReadFromStorage();
iObserver.PostEvent(aParent, aChild, aEvent);
}
if (aEvent==EPostUpdated) {
iObserver.PostEvent(aParent, aChild, aEvent);
}
if ((aEvent==EThumbnailLoaded) || (aEvent==EUnreadChanged)) {
iObserver.PostEvent(aParent, aChild, aEvent);
}
if (aEvent==ELastPostChanged) {
iObserver.PostEvent(aParent, aChild, aEvent);
}
//do nothing for:
// EMediaLoaded,
// EErrorUpdated,
}
示例4: new
CArrayFix<TCoeHelpContext>* CMobileOfficeAppUi::HelpContextL() const
{
CArrayFixFlat<TCoeHelpContext>* array = new(ELeave)CArrayFixFlat<TCoeHelpContext>(1);
CleanupStack::PushL(array);
array->AppendL(TCoeHelpContext(KUidMobileOffice, _L("Introduction")));
CleanupStack::Pop(array);
return array;
}
示例5: CreateScheduledReminderL
void CFMSServer::CreateScheduledReminderL()
{
FLOG(_L("CFMSServer::CreateScheduledReminderL ()"));
_LIT(KFotaScheduleExe, "Z:\\sys\\bin\\fotaschedulehandler.exe");
RScheduler scheduler;
TTsTime startTime;
TTime time;
time.HomeTime();
time = time + (TTimeIntervalHours(1));
startTime.SetLocalTime(time);
User::LeaveIfError(scheduler.Connect());
CleanupClosePushL(scheduler);
//Creating a persistent daily schedule
TSchedulerItemRef persistentScheduleItem;
CArrayFixFlat<TScheduleEntryInfo2>* entries = new CArrayFixFlat<TScheduleEntryInfo2> (1);
CleanupStack::PushL(entries);
persistentScheduleItem.iName = TUid::Uid(KFMSServerUid).Name();
//TScheduleEntryInfo2 scentry1(startTime, EDaily, 1, 1);
TScheduleEntryInfo2 scentry1;
scentry1.SetStartTime(startTime);
scentry1.SetInterval(1);
scentry1.SetIntervalType(TIntervalType(EHourly));
scentry1.SetValidityPeriod((TTimeIntervalMinutes) 1440); //1440 min = 24 hrs or 1 day
entries->AppendL(scentry1);
scheduler.Register(TFileName( KFotaScheduleExe ), 0 );
TInt ret = scheduler.CreatePersistentSchedule(persistentScheduleItem, *entries);
FLOG(_L("created schedule %d %d:%d"), persistentScheduleItem.iHandle,
time.DateTime().Hour(), time.DateTime().Minute());
if (ret == KErrNone)
{
TTaskInfo taskInfo;
taskInfo.iName = TUid::Uid(KFMSServerUid).Name();
taskInfo.iRepeat = 1; //Repeat once
taskInfo.iPriority = 1;
TFotaScheduledUpdate fotareminder(-1, -1);
TPckg<TFotaScheduledUpdate> fotareminderpkg(fotareminder);
HBufC* data = HBufC::NewLC(fotareminderpkg.Length());
data->Des().Copy(fotareminderpkg);
TInt err = scheduler.ScheduleTask(taskInfo, *data, persistentScheduleItem.iHandle);
FLOG(_L("Schedule creation error %d"), err);
CleanupStack::PopAndDestroy(data);
}
CleanupStack::PopAndDestroy(entries);
CleanupStack::PopAndDestroy(&scheduler); // xx
}
示例6: ReadFromStorage
void CContextMediaArrayImpl::ReadFromStorage()
{
CALLSTACKITEM_N(_CL("CContextMediaArrayImpl"), _CL("ReadFromStorage"));
iPostIdArray->Reset();
ReleasePosts();
iPostArray->Reset();
TBool ok = iStorage.FirstL(iNode, iSort, CPostStorage::EAscending, EFalse);
while (ok) {
TInt64 id = iStorage.GetCurrentIdL();
iPostIdArray->AppendL(id);
iPostArray->AppendL(0);
ok = iStorage.NextL();
}
if (iStandAlone && iNode==iStorage.RootId()) {
iPostIdArray->AppendL(iStorage.RootId());
iPostArray->AppendL(0);
}
}
示例7: FixupL
/**
This method should only be used by CImapAtomParser.
During parsing, a ReAllocL() may be required on the heap buffer that this atom and its
descendants' string data descriptor points at.
This happens when the heap buffer needs to be expanded.
If this causes the heap buffer's address to change, then this atom and its descendants'
pointer descriptors need updating.
@param The address of the new heap buffer
@param The address of the data within the heap buffer before the ReAllocL took place.
*/
void CImapAtom::FixupL(const HBufC8 *aNewBuffer, const TText8 *aOldBuffer)
{
// Fixup descriptor pointers
CArrayFixFlat<CImapAtom*>* atomStack = new (ELeave) CArrayFixFlat<CImapAtom*>(10);
CleanupStack::PushL(atomStack);
atomStack->AppendL(this);
CImapAtom* currentAtom;
while (atomStack->Count() != 0)
{
// Pop the top atom off of the stack
currentAtom = (*atomStack)[atomStack->Count() - 1];
atomStack->ResizeL(atomStack->Count() - 1);
// Fix up the current atom
if (currentAtom->iAtom.Length()>0)
{
// Find offset from start of old buffer
TInt start=(currentAtom->iAtom.Ptr()-aOldBuffer);
// Make new descriptor & assign it
TPtrC8 bufptr(aNewBuffer->Ptr()+start,currentAtom->iAtom.Length());
currentAtom->iAtom.Set(bufptr); // Note that we are setting the real iAtom not the copy returned by Atom()
}
// Add the first sibling to the stack,
// subsequent siblings are added when this sibling is visited
CImapAtom* siblingAtom = currentAtom->Next();
if (siblingAtom)
{
atomStack->AppendL(siblingAtom);
}
// Add child to the stack
CImapAtom* childAtom = currentAtom->Child();
if (childAtom)
{
atomStack->AppendL(childAtom);
}
}
CleanupStack::PopAndDestroy(atomStack);
}
示例8: GetImageQualityLevelsL
// ---------------------------------------------------------------------------
// Get an array of image quality levels that are in use with the current
// product with given Camera/Display ID. If the ID is zero, then all levels
// dispite of the ID value are returned.
// ---------------------------------------------------------------------------
//
TInt CImagingConfigManager::GetImageQualityLevelsL(
CArrayFixFlat<TUint>& aLevels,
TUint /*aCameraDisplayID*/ )
{
aLevels.Reset();
for( TInt i = 0 ; i < NumberOfImageQualityLevels() ; i++ )
{
aLevels.AppendL(
iImageQualitySets->At( i ).iImageQualitySetLevel );
}
return KErrNone;
}
示例9: new
CArrayFix<TCoeHelpContext>* CPodcastAppUi::HelpContextL() const
{
CArrayFixFlat<TCoeHelpContext>* array =
new(ELeave)CArrayFixFlat<TCoeHelpContext>(1);
CleanupStack::PushL(array);
if (iFeedView->IsVisible()) {
array->AppendL(TCoeHelpContext(KUidPodcast,KContextFeedsView));
} else if (iShowsView->IsVisible()) {
array->AppendL(TCoeHelpContext(KUidPodcast,KContextShowsView));
} else if (iSearchView->IsVisible()) {
array->AppendL(TCoeHelpContext(KUidPodcast,KContextSearch));
} else if (iQueueView->IsVisible()) {
array->AppendL(TCoeHelpContext(KUidPodcast,KContextDownloadQueue));
} else {
array->AppendL(TCoeHelpContext(KUidPodcast,KContextSettings));
}
CleanupStack::Pop(array);
return array;
}
示例10: PopulateSettingsL
//Puts the existing settings and some new settings in the list of settings
//Now both will be deleted on exit.
void CPigeonScheduledSend::PopulateSettingsL()
{
delete iSettings;
iSettings = NULL;
//Make some shiny new settings instead
iSettings = CMsvScheduleSettings::NewL();
iSettings->SetShortInterval(KShortInterval);
iSettings->SetLongInterval(KLongInterval);
CArrayFixFlat<TTimeIntervalSeconds>* intervals = new(ELeave)CArrayFixFlat<TTimeIntervalSeconds>(20);
CleanupStack::PushL(intervals);
intervals->AppendL(KFirstInterval);
intervals->AppendL(KSecondInterval);
intervals->AppendL(KThirdInterval);
iSettings->SetVariableIntervalsL(*intervals); // copies intervals
CleanupStack::PopAndDestroy(); //intervals
// iSettingsList->AppendL(custom);
}
示例11: new
CArrayFix<TCoeHelpContext>* CRhodesAppUi::HelpContextL() const
{
#warning "Please see comment about help and UID3..."
// Note: Help will not work if the application uid3 is not in the
// protected range. The default uid3 range for projects created
// from this template (0xE0000000 - 0xEFFFFFFF) are not in the protected range so that they
// can be self signed and installed on the device during testing.
// Once you get your official uid3 from Symbian Ltd. and find/replace
// all occurrences of uid3 in your project, the context help will
// work.
CArrayFixFlat<TCoeHelpContext>* array = new(ELeave)CArrayFixFlat<TCoeHelpContext>(1);
CleanupStack::PushL(array);
array->AppendL(TCoeHelpContext(KUidRhodesApp, KGeneral_Information));
CleanupStack::Pop(array);
return array;
}
示例12: new
CArrayFix<TCoeHelpContext>* CHelloS60AppUi::HelpContextL() const
{
#warning "Please see comment about help and UID3..."
// Note: Help will not work if the application uid3 is not in the
// protected range. The default uid3 range for projects created
// from this template (0xE0000000 - 0xEFFFFFFF) are not in the protected range so that they
// can be self signed and installed on the device during testing.
// Once you get your official uid3 from Symbian Ltd. and find/replace
// all occurrences of uid3 in your project, the context help will
// work. Alternatively, a patch now exists for the versions of
// HTML help compiler in SDKs and can be found here along with an FAQ:
// http://www3.symbian.com/faq.nsf/AllByDate/E9DF3257FD565A658025733900805EA2?OpenDocument
CArrayFixFlat<TCoeHelpContext>* array = new (ELeave) CArrayFixFlat<
TCoeHelpContext> (1);
CleanupStack::PushL(array);
array->AppendL(TCoeHelpContext(KUidHelloS60App, KGeneral_Information));
CleanupStack::Pop(array);
return array;
}
示例13: arguments
CArrayFixFlat<TPtrC>* CKeytoolFileView::ReadArrayArgumentsLC(TInt cmdIndex)
{
CArrayFixFlat<TPtrC>* currentCmd = new (ELeave) CArrayFixFlat<TPtrC> (10);
CleanupStack::PushL(currentCmd);
TPtr cmd = iArgs[cmdIndex]->Des();
cmd.Trim();
TLex arguments(cmd);
while(!arguments.Eos())
{
TPtrC token = arguments.NextToken();
currentCmd->AppendL(token);
}
TBuf<150> string;
string.Format(_L("Command : %S\noutput :"), &cmd);
KeyToolUtils::PrintInfoL(_L("================================================"));
KeyToolUtils::PrintInfoL(_L("================================================\n"));
DisplayErrorL(string, 0);
return currentCmd;
}
示例14: ret
/*!
* Store contact
*/
CArrayFixFlat<TUid>* CNsmlContactsDataStoreExtensionPrivate::ImportContactsL( const TDesC8 &contactbufbase )
{
_DBG_FILE("CNsmlContactsDataStoreExtensionPrivate::ImportContactsL: BEGIN");
DBG_DUMP((void*)contactbufbase.Ptr(), contactbufbase.Length(),
_S8("CNsmlContactsDataStoreExtensionPrivate::ImportContactsL: To DB :"));
TBool ret( ETrue );
CArrayFixFlat<TUid>* contactItems = new(ELeave) CArrayFixFlat<TUid>(4);
QBuffer contactsbuf;
contactsbuf.open(QBuffer::ReadWrite);
QByteArray bytearray((char*)contactbufbase.Ptr());
contactsbuf.write(bytearray);
contactsbuf.seek(0);
mReader->setDevice(&contactsbuf);
if (mReader->startReading() && mReader->waitForFinished())
{
DBG_ARGS(_S("CNsmlContactsDataStoreExtensionPrivate::Buffer Count: %d"), mReader->results().count() );
QList<QContact> contacts;
if ( mImporter->importDocuments( mReader->results() ) )
{
contacts = mImporter->contacts();
QMap<int, QContactManager::Error> errorMap;
ret = mContactManager->saveContacts( &contacts, &errorMap );
DBG_ARGS(_S("CNsmlContactsDataStoreExtensionPrivate::Import Status: %d"), ret );
}
if( ret )
{
foreach (QContact contact, contacts )
{
TUint contactid = contact.id().localId();
DBG_ARGS(_S("CNsmlContactsDataStoreExtensionPrivate::Contact ID: %d"), contactid );
contactItems->AppendL( TUid::Uid( contactid ) );
}
}
示例15: PopulateScheduleConditionsL
void CMsvScheduleSend::PopulateScheduleConditionsL(CArrayFixFlat<TTaskSchedulerCondition>& aSchConditions)
{
aSchConditions.Reset();
TInt count = iAgentActions->Count();
TTaskSchedulerCondition condition;
// All system agent condition have a UID of KUidSystemCategory.
condition.iCategory = KUidSystemCategory;
for( TInt i = 0; i < count; ++i )
{
TMsvCondition agentCondition = iAgentActions->At(i).iCondition;
condition.iKey = agentCondition.iVariable.iUid;
condition.iState = agentCondition.iState;
switch( agentCondition.iType )
{
case TMsvCondition::EMsvSchSendEquals:
condition.iType = TTaskSchedulerCondition::EEquals;
break;
case TMsvCondition::EMsvSchSendNotEquals:
condition.iType = TTaskSchedulerCondition::ENotEquals;
break;
case TMsvCondition::EMsvSchSendGreaterThan:
condition.iType = TTaskSchedulerCondition::EGreaterThan;
break;
case TMsvCondition::EMsvSchSendLessThan:
condition.iType = TTaskSchedulerCondition::ELessThan;
break;
default:
User::Invariant();
break;
}
aSchConditions.AppendL(condition);
}
}