equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2005-2009 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 the License "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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 /** |
|
24 @file |
|
25 @internalTechnology |
|
26 */ |
|
27 |
|
28 #ifndef __EUSEREXT_H__ |
|
29 #define __EUSEREXT_H__ |
|
30 |
|
31 |
|
32 /** An RRArray subclass intended to hold R classes. |
|
33 * |
|
34 * When you call close on an RRArray it will do the sane thing and |
|
35 * call close on all the R Class objects inside it. |
|
36 * |
|
37 * @internalTechnology |
|
38 */ |
|
39 template<class T> class RRArray : public RArray<T> |
|
40 { |
|
41 public: |
|
42 /** Constructor */ |
|
43 inline RRArray(); |
|
44 inline RRArray(TUint aGranularity); |
|
45 /** Free all resources, calling Close() on the each element in the array */ |
|
46 inline void Close(); |
|
47 }; |
|
48 |
|
49 template <class T> |
|
50 inline RRArray<T>::RRArray() |
|
51 { |
|
52 } |
|
53 |
|
54 template <class T> |
|
55 inline RRArray<T>::RRArray(TUint aGranularity) : RArray<T>(aGranularity) |
|
56 { |
|
57 } |
|
58 |
|
59 template <class T> |
|
60 inline void RRArray<T>::Close() |
|
61 { |
|
62 TInt count = RArray<T>::Count(); |
|
63 for(TInt ii = 0; ii < count; ii++) |
|
64 { |
|
65 (*this)[ii].Close(); |
|
66 } |
|
67 RArray<T>::Close(); |
|
68 } |
|
69 |
|
70 #endif |