phonebookengines/VirtualPhonebook/VPbkCntModel/inc/CFindView.h
branchRCL_3
changeset 32 2828b4d142c0
parent 0 e686773b3f54
child 64 c1e8ba0c2b16
equal deleted inserted replaced
26:0d28c1c5b6dd 32:2828b4d142c0
    86             RPointerArray<CCntModelViewContact>& aMatchedContacts );
    86             RPointerArray<CCntModelViewContact>& aMatchedContacts );
    87         TBool IsContactsModelMatchL( const CViewContact& aContact,
    87         TBool IsContactsModelMatchL( const CViewContact& aContact,
    88             TInt& aMatchArrayIndex ) const;
    88             TInt& aMatchArrayIndex ) const;
    89         void RemoveFromMatchArrayIfFound( const CViewContact& aContact );
    89         void RemoveFromMatchArrayIfFound( const CViewContact& aContact );
    90         TInt FindFromMatchArray( const CViewContact& aContact ) const;
    90         TInt FindFromMatchArray( const CViewContact& aContact ) const;
       
    91         void HeapSortL(RPointerArray<CCntModelViewContact> aViewContacts);
    91 
    92 
    92     private: // Data
    93     private: // Data
    93         /// Own: the find policy
    94         /// Own: the find policy
    94         CVPbkContactFindPolicy* iFindPolicy;
    95         CVPbkContactFindPolicy* iFindPolicy;
    95         /// Own: always included contacts
    96         /// Own: always included contacts
    96         RArray<TContactItemId> iAlwaysIncluded;
    97         RArray<TContactItemId> iAlwaysIncluded;
    97         /// Own: Matched contacts from Contacts Model
    98         /// Own: Matched contacts from Contacts Model
    98         RPointerArray<CCntModelViewContact> iContactsModelMatchContacts;
    99         RPointerArray<CCntModelViewContact> iContactsModelMatchContacts;
    99     };
   100     };
   100 
   101 
       
   102 // CleanupStack helpers for item owning RPointerArrays
       
   103 template <class T>
       
   104 class CleanupResetAndDestroy
       
   105     {
       
   106 public:
       
   107     inline static void PushL(T& aRef)
       
   108         { CleanupStack::PushL(TCleanupItem(&ResetAndDestroy,&aRef)); }
       
   109 private:
       
   110     inline static void ResetAndDestroy(TAny *aPtr)
       
   111         { static_cast<T*>(aPtr)->ResetAndDestroy(); }
       
   112     };
       
   113 
       
   114 template <class T>
       
   115 inline void CleanupResetAndDestroyPushL(T& aRef)
       
   116     { CleanupResetAndDestroy<T>::PushL(aRef); }
   101 } // namespace VPbkCntModel
   117 } // namespace VPbkCntModel
   102 
   118 
   103 #endif // VPBKCNTMODEL_CFINDVIEW_H
   119 #endif // VPBKCNTMODEL_CFINDVIEW_H
   104 
   120 
   105 // End of File
   121 // End of File