iaupdate/IAD/ui/src/iaupdatenodefilter.cpp
changeset 52 92f864ef0288
parent 25 98b66e4fb0be
child 53 ae54820ef82c
equal deleted inserted replaced
42:d17dc5398051 52:92f864ef0288
    70 CIAUpdateNodeFilter::~CIAUpdateNodeFilter()
    70 CIAUpdateNodeFilter::~CIAUpdateNodeFilter()
    71     {
    71     {
    72     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::~CIAUpdateNodeFilter() begin");
    72     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::~CIAUpdateNodeFilter() begin");
    73 
    73 
    74     delete iFilterParams;
    74     delete iFilterParams;
       
    75     iStoredNodes.Reset();
    75 
    76 
    76     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::~CIAUpdateNodeFilter() end");
    77     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::~CIAUpdateNodeFilter() end");
    77     }
    78     }
    78 
    79 
    79 
    80 
   419     CleanupStack::PopAndDestroy( &deps );
   420     CleanupStack::PopAndDestroy( &deps );
   420 
   421 
   421     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::SetDependenciesSelectedL() end");
   422     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::SetDependenciesSelectedL() end");
   422     }
   423     }
   423 
   424 
   424 
   425 // -----------------------------------------------------------------------------
       
   426 // CIAUpdateNodeFilter::StoreNodeListL
       
   427 // 
       
   428 // -----------------------------------------------------------------------------
       
   429 //
       
   430 void CIAUpdateNodeFilter::StoreNodeListL( const RPointerArray< MIAUpdateNode >& aNodes )
       
   431     {
       
   432     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::StoreNodeListL() begin");
       
   433     iStoredNodes.Reset();
       
   434     for( TInt i = 0; i < aNodes.Count(); ++i )
       
   435         {
       
   436         iStoredNodes.AppendL( aNodes[i] ); 
       
   437         }
       
   438     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::StoreNodeListL() end");
       
   439     }
       
   440 
       
   441 // -----------------------------------------------------------------------------
       
   442 // CIAUpdateNodeFilter::RestoreNodeListL
       
   443 // 
       
   444 // -----------------------------------------------------------------------------
       
   445 //
       
   446 void CIAUpdateNodeFilter::RestoreNodeListL( RPointerArray< MIAUpdateNode >& aNodes) const
       
   447     {
       
   448     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::RestoreNodeListL() begin");   
       
   449     aNodes.Reset();
       
   450     for( TInt i = 0; i < iStoredNodes.Count(); ++i )
       
   451         {
       
   452         aNodes.AppendL( iStoredNodes[i] ); 
       
   453         }
       
   454     IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::RestoreNodeListL() end");   
       
   455     }
       
   456 
       
   457 // -----------------------------------------------------------------------------
       
   458 // CIAUpdateNodeFilter::SortSelectedNodesFirstL
       
   459 // 
       
   460 // -----------------------------------------------------------------------------
       
   461 //
       
   462 void CIAUpdateNodeFilter::SortSelectedNodesFirstL( 
       
   463                           const RPointerArray<MIAUpdateNode>& aSelectedNodes, 
       
   464                           RPointerArray< MIAUpdateNode >& aNodes )
       
   465     {
       
   466     for ( TInt i = aNodes.Count() - 1 ; i >= 0 ; --i )
       
   467         {
       
   468         MIAUpdateNode* node( aNodes[ i ] );
       
   469         if ( node->Base().IsSelected() )
       
   470             {
       
   471             aNodes.Remove( i );        
       
   472             }
       
   473         }
       
   474     for ( TInt j = aSelectedNodes.Count() -1 ; j >= 0 ; --j )
       
   475         {
       
   476         aNodes.InsertL( aSelectedNodes[j], 0 ); 
       
   477         }
       
   478     }
       
   479  
       
   480 // -----------------------------------------------------------------------------
       
   481 // CIAUpdateNodeFilter::SortThisNodeFirstL
       
   482 // 
       
   483 // -----------------------------------------------------------------------------
       
   484 //
       
   485 void CIAUpdateNodeFilter::SortThisNodeFirstL( const MIAUpdateNode* aFirstNode, 
       
   486                                               RPointerArray< MIAUpdateNode >& aNodes)
       
   487     {
       
   488     TBool removed = EFalse; 
       
   489     for ( TInt i = aNodes.Count() - 1 ; i >= 0 && !removed ; --i )
       
   490         {
       
   491         if ( aNodes[ i ] == aFirstNode )
       
   492             {
       
   493             aNodes.Remove( i );      
       
   494             removed = ETrue;
       
   495             }
       
   496         }
       
   497     aNodes.InsertL( aFirstNode, 0 );
       
   498     }
   425 
   499 
   426 
   500 
   427 // -----------------------------------------------------------------------------
   501 // -----------------------------------------------------------------------------
   428 // CIAUpdateNodeFilter::CompareAndMarkFilterNodesL
   502 // CIAUpdateNodeFilter::CompareAndMarkFilterNodesL
   429 // 
   503 //