本文整理汇总了C++中CArrayPtrFlat::ResetAndDestroy方法的典型用法代码示例。如果您正苦于以下问题:C++ CArrayPtrFlat::ResetAndDestroy方法的具体用法?C++ CArrayPtrFlat::ResetAndDestroy怎么用?C++ CArrayPtrFlat::ResetAndDestroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CArrayPtrFlat
的用法示例。
在下文中一共展示了CArrayPtrFlat::ResetAndDestroy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CleanupArray
void CleanupArray(TAny* aArray)
{
CArrayPtrFlat<MEikSrvNotifierBase2>* subjects =
static_cast<CArrayPtrFlat<MEikSrvNotifierBase2>*>(aArray);
subjects->ResetAndDestroy();
delete subjects;
}
示例2: ResetAndDestroy
// -----------------------------------------------------------------------------
// CSIPSettListSIPProfSetTypeListItem::ResetAndDestroy
// For deleting array in case of leave
// -----------------------------------------------------------------------------
//
void CSIPSettListSIPProfSetTypeListItem::ResetAndDestroy( TAny* aPointerArray )
{
__GSLOGSTRING("CSIPSettListSIPProfSetTypeListItem::ResetAndDestroy" )
CArrayPtrFlat<CAknEnumeratedText>* array =
static_cast<CArrayPtrFlat<CAknEnumeratedText>*>( aPointerArray );
array->ResetAndDestroy();
delete array;
}
示例3: CreateXMLProfilesL
//===============================================
// CNSmlDSSettings::CreateXMLProfiles()
//
//
//===============================================
void CNSmlDSSettings::CreateXMLProfilesL(TBool aRestore)
{
TBool status = TRUE;
TInt error = KErrNone;
//file server
RFs wSession;
error = wSession.Connect();
if (error != KErrNone)
{
return;
}
RXMLReader DSProfileParser;
DSProfileParser.CreateL();
CArrayPtrFlat<CNSmlDSProfile>* customProfileArray = new (ELeave) CArrayPtrFlat<CNSmlDSProfile> (5);
CleanupStack::PushL(customProfileArray);
CNSmlProfileContentHandler* cb = CNSmlProfileContentHandler::NewL(this ,customProfileArray);
CleanupStack::PushL(cb);
DSProfileParser.SetContentHandler(cb);
DSProfileParser.SetFeature(EXMLValidation, ETrue);
DSProfileParser.SetFeature(EXMLValidation, EFalse);
DSProfileParser.GetFeature(EXMLBinary, status);
DSProfileParser.GetFeature(EXMLValidation, status);
status = TRUE;
RFile wFile;
TInt err =wFile.Open(wSession, Kinfile, EFileRead | EFileShareReadersOnly);
if (err != KErrNone)
{
CleanupStack::PopAndDestroy(2);
return;
}
CleanupClosePushL(wFile);
//parse file
TRAP(error, DSProfileParser.ParseL(wFile));
if (error != KErrNone)
{
CleanupStack::PopAndDestroy(3);
return;
}
TInt index;
TBuf<150> buf;
if(aRestore)
{
//handling back up-restore for custom profiles
CNSmlDSProfileList* profList = new (ELeave) CArrayPtrFlat<CNSmlDSProfileListItem>(1);
CleanupStack::PushL(profList);
GetAllProfileListL( profList );
for( TInt i = 0 ; i < profList->Count() ; i++ )
{
TInt id = profList->At(i)->IntValue( EDSProfileId );
CNSmlDSProfile* prof = ProfileL(id);
CleanupStack::PushL( prof );
buf = prof->StrValue(EDSProfileServerId);
if (buf.Compare(KEmpty) != 0)
{
for (index = 0; index < customProfileArray->Count(); index++ )
{
if (buf.Compare(customProfileArray->At(index)->StrValue(EDSProfileServerId)) == 0)
{
DeleteProfileL(id);
}
}
}
else
{
buf = prof->StrValue(EDSProfileServerURL);
for (index = 0; index < customProfileArray->Count(); index++ )
{
if (buf.Compare(customProfileArray->At(index)->StrValue(EDSProfileServerURL)) == 0)
{
DeleteProfileL(id);
}
}
}
CleanupStack::PopAndDestroy(); // prof
}
profList->ResetAndDestroy();
CleanupStack::PopAndDestroy();
}
//save profiles
TBool defaultprofilefound = EFalse;
//Set the ProfileID to default
//.........这里部分代码省略.........