predictivesearch/PcsAlgorithm/Algorithm2/inc/CPcsAlgorithm2Utils.h
branchRCL_3
changeset 21 b3431bff8c19
parent 0 e686773b3f54
child 58 d4f567ce2e7c
equal deleted inserted replaced
15:e8e3147d53eb 21:b3431bff8c19
    62      * Check if the input URI is of contact search in a group template form
    62      * Check if the input URI is of contact search in a group template form
    63      */
    63      */
    64     static TBool IsGroupUri(TDesC& aURI);
    64     static TBool IsGroupUri(TDesC& aURI);
    65 
    65 
    66     };
    66     };
       
    67 
       
    68 // CleanupStack helpers for item owning RPointerArrays
       
    69 template <class T>
       
    70 class CleanupResetAndDestroy
       
    71     {
       
    72 public:
       
    73     inline static void PushL(T& aRef)
       
    74         { CleanupStack::PushL(TCleanupItem(&ResetAndDestroy,&aRef)); }
       
    75 private:
       
    76     inline static void ResetAndDestroy(TAny *aPtr)
       
    77         { static_cast<T*>(aPtr)->ResetAndDestroy(); }
       
    78     };
       
    79 
       
    80 template <class T>
       
    81 inline void CleanupResetAndDestroyPushL(T& aRef)
       
    82     { CleanupResetAndDestroy<T>::PushL(aRef); }
       
    83 
    67 #endif // C_PCS_ALGORITHM_2_UTILS
    84 #endif // C_PCS_ALGORITHM_2_UTILS