|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Contains definition of Catalogs interface pointer array |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef R_CATALOGS_ARRAY_H |
|
20 #define R_CATALOGS_ARRAY_H |
|
21 |
|
22 #include <e32cmn.h> |
|
23 |
|
24 /** |
|
25 * Array class for MCatalogsBase-derived interface pointers. Can be operated |
|
26 * like ordinary RPointerArray array. |
|
27 * |
|
28 * |
|
29 */ |
|
30 template< class T > |
|
31 class RCatalogsArray : public RPointerArray< T > |
|
32 { |
|
33 public: |
|
34 |
|
35 RCatalogsArray(); |
|
36 |
|
37 RCatalogsArray( TInt aGranularity ); |
|
38 |
|
39 /** |
|
40 * Empties the array and releases the referenced objects. |
|
41 * |
|
42 * It frees all memory allocated to the array and resets the internal state so |
|
43 * that it is ready to be reused. The function also calls Release() on all of |
|
44 * the objects whose pointers are contained by the array. |
|
45 * This array object can be allowed to go out of scope after a call to this |
|
46 * function. |
|
47 * |
|
48 * |
|
49 * @see ResetAndRelease() |
|
50 */ |
|
51 void ResetAndDestroy(); |
|
52 |
|
53 |
|
54 /** |
|
55 * Empties the array and releases the referenced objects. |
|
56 * |
|
57 * It frees all memory allocated to the array and resets the internal state so |
|
58 * that it is ready to be reused. The function also calls Release() on all of |
|
59 * the objects whose pointers are contained by the array. |
|
60 * This array object can be allowed to go out of scope after a call to this |
|
61 * function. |
|
62 * |
|
63 * @note Same as ResetAndDestroy(), can be used instead if a more descriptive |
|
64 * terminology for the operation is desired (contained objects will not |
|
65 * necessarily be destroyed, but their Release() method is called). |
|
66 * |
|
67 * |
|
68 * @see ResetAndDestroy() |
|
69 */ |
|
70 inline void ResetAndRelease() |
|
71 { |
|
72 ResetAndDestroy(); |
|
73 } |
|
74 |
|
75 }; |
|
76 |
|
77 #include "catalogsarray.inl" |
|
78 |
|
79 #endif // R_CATALOGS_ARRAY_H |