phonebookengines/VirtualPhonebook/inc/VPbkSendEventUtility.h
branchRCL_3
changeset 23 5586b4d2ec3e
parent 0 e686773b3f54
child 64 c1e8ba0c2b16
equal deleted inserted replaced
21:b3431bff8c19 23:5586b4d2ec3e
    66                     aRefParam3 );
    66                     aRefParam3 );
    67             }
    67             }
    68         }
    68         }
    69     }
    69     }
    70 
    70 
       
    71 template<typename RefParam1, typename ValParam2, typename RefParam3,
       
    72     typename Observer, typename NotifyFunc>
       
    73 void SendEventToObserversWhenNotDestroyed( RefParam1& aRefParam1, ValParam2 aValParam2,
       
    74         RefParam3& aRefParam3, RPointerArray<Observer>& aObservers,
       
    75         NotifyFunc aNotifyFunc, TBool& aDestroy )
       
    76     {
       
    77     Observer* obs = NULL;
       
    78     for ( TInt i = aObservers.Count() - 1; !aDestroy && i >= 0; --i )
       
    79         {
       
    80         if ( i < aObservers.Count() && obs != aObservers[i] )
       
    81             {
       
    82             obs = aObservers[i];
       
    83             (obs->*aNotifyFunc)( aRefParam1, aValParam2,
       
    84                     aRefParam3 );
       
    85             }
       
    86         }
       
    87     }
    71 
    88 
    72 // -----------------------------------------------------------------------------
    89 // -----------------------------------------------------------------------------
    73 // CopyPointerArrayL
    90 // CopyPointerArrayL
    74 // -----------------------------------------------------------------------------
    91 // -----------------------------------------------------------------------------
    75 //
    92 //