47 // CApListItemList::~CApListItemList |
47 // CApListItemList::~CApListItemList |
48 // --------------------------------------------------------- |
48 // --------------------------------------------------------- |
49 // |
49 // |
50 EXPORT_C CApListItemList::~CApListItemList() |
50 EXPORT_C CApListItemList::~CApListItemList() |
51 { |
51 { |
52 CLOG( ( EApList, 0, _L( "-> CApListItemList::~CApListItemList" ) ) ); |
|
53 |
|
54 ResetAndDestroy(); |
|
55 |
|
56 CLOG( ( EApList, 1, _L( "<- CApListItemList::~CApListItemList" ) ) ); |
|
57 } |
52 } |
58 |
53 |
59 // --------------------------------------------------------- |
54 // --------------------------------------------------------- |
60 // CApListItemList::ItemByUid |
55 // CApListItemList::ItemByUid |
61 // --------------------------------------------------------- |
56 // --------------------------------------------------------- |
62 // |
57 // |
63 EXPORT_C CApListItem* CApListItemList::ItemForUid( TUint32 aUid ) const |
58 EXPORT_C CApListItem* CApListItemList::ItemForUid( TUint32 aUid ) const |
64 { |
59 { |
65 CLOG( ( EApList, 0, _L( "-> CApListItemList::ItemForUid" ) ) ); |
|
66 |
|
67 // This method cannot return "const CApListItem*", because all methods |
|
68 // of CApListItem are non-const -> if the returned item was const, it |
|
69 // would be unusable. |
|
70 TInt i; |
|
71 TInt count = Count(); |
|
72 for ( i = 0; i < count; i++ ) |
|
73 { |
|
74 if ( At( i )->Uid() == aUid ) |
|
75 { |
|
76 return At( i ); |
|
77 } |
|
78 } |
|
79 |
|
80 CLOG( ( EApList, 0, _L( "-> CApListItemList::ItemForUid" ) ) ); |
|
81 return NULL; |
60 return NULL; |
82 } |
61 } |
83 |
62 |
84 // End of File |
63 // End of File |