本文整理汇总了C++中CArrayFixFlat::Reset方法的典型用法代码示例。如果您正苦于以下问题:C++ CArrayFixFlat::Reset方法的具体用法?C++ CArrayFixFlat::Reset怎么用?C++ CArrayFixFlat::Reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CArrayFixFlat
的用法示例。
在下文中一共展示了CArrayFixFlat::Reset方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TestSTXLBGetColorUseListL
// -----------------------------------------------------------------------------
// CTestSDKLists::TestSTXLBGetColorUseListL
// -----------------------------------------------------------------------------
//
TInt CTestSDKLists::TestSTXLBGetColorUseListL( CStifItemParser& /*aItem*/ )
{
// Print to UI
_LIT( KTestModule, "EIKTXLBXTestModule" );
_LIT( KTestEIKTXLBX, "In TestSTXLBGetColorUseListL" );
TestModuleIf().Printf( 0, KTestModule, KTestEIKTXLBX );
// Print to log file
iLog->Log( KTestEIKTXLBX );
TInt flags = CEikListBox::EIncrementalMatching | EAknListBoxSelectionList |
EAknListBoxViewerFlags | CEikListBox::ELeftDownInViewRect;
CDesCArray* textArray = iEikonEnvPointer->ReadDesCArrayResourceL(
R_TESTLIST_ITEM_SETTING );
CleanupStack::PushL( textArray );
CEikSnakingTextListBox* list = new( ELeave ) CEikSnakingTextListBox();
CleanupStack::PushL( list );
list->ConstructL( iContainer, flags );
list->Model()->SetItemTextArray( textArray );
list->Model()->SetOwnershipType( ELbmOwnsItemArray );
iContainer->SetControlL( list );
CArrayFixFlat<TCoeColorUse>* colorUseList = new( ELeave )
CArrayFixFlat<TCoeColorUse>( KFour );
CleanupStack::PushL( colorUseList );
list->GetColorUseListL( *colorUseList );
colorUseList->Reset();
CleanupStack::PopAndDestroy( colorUseList );
iContainer->ResetControl();
CleanupStack::Pop( 2 );
return KErrNone;
}
示例2: 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);
}
}
示例3: 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;
}
示例4: FindScheduleL
/**
Searches the scheduler for an existing schedule item with a schedule time that
matches with time supplied.
@see RScheduler::GetScheduleL()
@param aScheduler
Handle to the scheduler.
@param aStartTime
Schedule start time.
@param aRef
On return, the schedule item.
@leave KErrNotFound
No schedule found matching the schedule time.
*/
EXPORT_C void CMsvScheduleSend::FindScheduleL(RScheduler& aScheduler, const TTime& aStartTime, TSchedulerItemRef& aRef)
{
CArrayFixFlat<TScheduleEntryInfo2>* entryInfos = new (ELeave) CArrayFixFlat<TScheduleEntryInfo2>(1);
CleanupStack::PushL(entryInfos);
CArrayFixFlat<TTaskInfo>* taskInfos = new (ELeave) CArrayFixFlat<TTaskInfo>(1);
CleanupStack::PushL(taskInfos);
aRef.iHandle = KErrNotFound;
CArrayFixFlat<TSchedulerItemRef>* refs = new (ELeave) CArrayFixFlat<TSchedulerItemRef>(KMsvSchsendArrayGrowth);
CleanupStack::PushL(refs);
User::LeaveIfError(aScheduler.GetTaskRefsL(*refs, EAllSchedules, EMyTasks));
TInt count = refs->Count();
TScheduleState2 state;
TTsTime nextDue;
while (count-- && aRef.iHandle == KErrNotFound)
{
const TSchedulerItemRef& tempRef = (*refs)[count];
TScheduleType type;
User::LeaveIfError(aScheduler.GetScheduleTypeL(tempRef.iHandle, type));
if( type == ETimeSchedule )
{
entryInfos->Reset();
taskInfos->Reset();
const TInt err = aScheduler.GetScheduleL(tempRef.iHandle, state, *entryInfos, *taskInfos, nextDue);
if( err == KErrNone && nextDue.GetUtcTime() == aStartTime )
aRef = tempRef;
}
}
CleanupStack::PopAndDestroy(3, entryInfos);
if (aRef.iHandle == KErrNotFound)
User::Leave(KErrNotFound);
}
示例5: TestCGGetColorUseListL
// -----------------------------------------------------------------------------
// CTestSDKMiscControls::TestCGGetColorUseListL
// -----------------------------------------------------------------------------
//
TInt CTestSDKMiscControls::TestCGGetColorUseListL( CStifItemParser& /*aItem*/ )
{
// Print to UI
_LIT( Ktestsdkmisccontrols, "testsdkmisccontrols" );
_LIT( KTestCGGetColorUseListL, "In TestCGGetColorUseListL" );
TestModuleIf().Printf( 0, Ktestsdkmisccontrols, KTestCGGetColorUseListL );
// Print to log file
iLog->Log( KTestCGGetColorUseListL );
CArrayFixFlat<TCoeColorUse>* colorUseList = new( ELeave )
CArrayFixFlat<TCoeColorUse>( 4 );
CleanupStack::PushL( colorUseList );
TBool err = KErrNone;
TRAP( err, iControlGroup->GetColorUseListL( *colorUseList ) );
colorUseList->Reset();
CleanupStack::PopAndDestroy( colorUseList );
return err;
}
示例6: 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);
}
}
示例7: DoBuildL
//.........这里部分代码省略.........
// one line may create several wrapped lines
lineCount += linePtrs->Count();
if (aRasterizeFlags != ERasterizeNone)
{
// create new entries..
while (iLines.Count() < lineCount)
{
SRasterizedLine line;
line.iTexture = NULL;
line.iGap = 0;
iLines.AppendL(line);
if (iPictographInterface)
{
SRasterizedLine pictographline;
pictographline.iTexture = NULL;
pictographline.iGap = 0;
iPictographLines.AppendL(pictographline);
}
}
// Do rasterisation if we want to render to texture.
for(TInt i = 0; i < linePtrs->Count(); ++i)
{
TInt currentLine = (lineCount - linePtrs->Count()) + i;
if (aRasterizeFlags & ERasterizeText)
{
// rasterize a single line (updates texture in iLines[i].iTexture)
RasterizeLineL(linePtrs->At(i), iLines[currentLine]);
}
if (aRasterizeFlags & ERasterizePictographs && iPictographInterface)
{
// Rasterize pictographs if needed
RasterizePictographLineL(linePtrs->At(i), font, iPictographLines[currentLine]);
}
// Get extents from the texture we just created
CHuiTexture* tex = iLines[i].iTexture;
extents.iHeight += iLines[i].iGap;
if(tex)
{
extents.iWidth = Max(extents.iWidth, tex->Size().iWidth);
extents.iHeight += tex->Size().iHeight;
}
TBool moreAvailable = (currentLine + 1 < MaxLineCount());
if (!moreAvailable)
{
// Maximum number of lines reached.
break;
}
}
}
else
{
// Don't rasterise or create textures, just get the extents of this text.
for(TInt i = 0; i < linePtrs->Count(); ++i)
{
TSize lineExtents = textStyle->LineExtentsL(linePtrs->At(i));
extents.iWidth = Max(extents.iWidth, lineExtents.iWidth);
extents.iHeight += lineExtents.iHeight;
}
}
linePtrs->Reset();
CleanupStack::PopAndDestroy(buf);
break;
}
default:
break;
}
// If we have reached the maximum number of lines, stop building.
if(IsMaxLineCountReached())
{
break;
}
}
HUI_DEBUG(_L("CHuiRasterizedTextMesh::BuildL() - Finished rasterizing text."));
CleanupStack::PopAndDestroy(linePtrs); linePtrs = 0;
if (iPictographBitmap)
{
iPictographBitmap->Resize(TSize(0, 0));
}
HUI_DEBUG(_L("CHuiRasterizedTextMesh::BuildL() - Updating text extents.."));
// The extents of the mesh depend on how many lines there are.
SetExtents(extents);
HUI_DEBUG(_L("CHuiRasterizedTextMesh::BuildL() - Done!"));
}
示例8: TestLocaleDefaultIconL
/**
@SYMTestCaseID APPFWK-APPARC-0070
@SYMPREQ
@SYMTestCaseDesc Test whether the default app icons change with respect to the locale/language.
This testcase checks whether BaflUtils::NearestLanguageFile is called when the locale has been changed.
@SYMTestPriority High
@SYMTestStatus Implemented
@SYMTestActions Call User::Language() to check that the default locale is English; Call CT_LocaleStep::CheckIcons
to check the size of the current default icons; Call UserSvr::ChangeLocale to change the Locale to French;
Call CT_LocaleStep::CheckIcons to check the size of the new icons; Restore the file system and the locale
and check if the icons are restored.
API Calls:\n
@SYMTestExpectedResults Returns KErrNone
*/
void CT_LocaleStep::TestLocaleDefaultIconL()
{
INFO_PRINTF1(_L("APPFWK-APPARC-0070: TestLocaleDefaultIconL started..."));
TInt ret = 0;
//first checks that language is not currently set to French (any other language except English since English is the default language
TEST(User::Language()!=ELangFrench);
// getappiconsizes must be called to check if the icons are the default ones
// KUidCustomiseDefaultIconApp - uid of CustomiseDefaultIconApp_reg.RSS; this app has a localisable resource file, CustomiseDefaultIconApp_loc.RSS, that does not define any icon
// Hence, the default icons must be picked up when the language changes to French. The default icons for French are defined in default_app_icon.m02
CArrayFixFlat<TSize>* newIconSizes = new(ELeave) CArrayFixFlat<TSize>(3);
CleanupStack::PushL(newIconSizes);
TRAP(ret,iLs.GetAppIconSizes(KUidCustomiseDefaultIconApp, *newIconSizes));
TEST(ret==KErrNone);
TEST(newIconSizes->Count()!=0);
// these are the sizes of the default icons
TSize small(24,24);
TSize medium(32,32);
TSize large(48,48);
TSize fstIcon;
TSize secIcon;
TSize trdIcon;
CheckIcons(newIconSizes, small, medium,large, fstIcon, secIcon, trdIcon);
// Change the locale to French
TRAP(ret,ChangeLocaleL(ELangFrench));
TEST(ret==KErrNone);
TEST(User::Language()==ELangFrench);//checks that the language has been set to French
//Wait for a small period to let apparc receive language change notification
User::After(KDelayForOnDemand);
//call getappiconsizes to see if the new icons have been changed as as expected
// The size of the icons indicates whether the icon corresponding to French Locale has been picked up
newIconSizes->Reset();
TRAP(ret,iLs.GetAppIconSizes(KUidCustomiseDefaultIconApp, *newIconSizes));
TEST(ret==KErrNone);
TEST(newIconSizes->Count()!=0);
small.SetSize(25,25);
medium.SetSize(35,35);
large.SetSize(50,50);
CheckIcons(newIconSizes, small, medium,large, fstIcon, secIcon, trdIcon);
//have to restore the locale before exiting the testcase
TRAP(ret,ChangeLocaleL(ELangEnglish));
TEST(ret==KErrNone);
TEST(User::Language()==ELangEnglish);
//Again wait for a small period to let apparc receive language change notification
User::After(KDelayForOnDemand);
//call getappiconsizes to see if the new icons have been changed as as expected
// The size of the icons indicates whether the icon corresponding to English Locale has been picked up
newIconSizes->Reset();
TRAP(ret,iLs.GetAppIconSizes(KUidCustomiseDefaultIconApp, *newIconSizes));
TEST(ret==KErrNone);
TEST(newIconSizes->Count()!=0);
small.SetSize(24,24);
medium.SetSize(32,32);
large.SetSize(48,48);
CheckIcons(newIconSizes, small, medium,large, fstIcon, secIcon, trdIcon);
// Icon cleanup
CleanupStack::PopAndDestroy(newIconSizes);
newIconSizes=NULL;
INFO_PRINTF1(_L("APPFWK-APPARC-0070: TestLocaleDefaultIconL finished..."));
}