|
1 /* |
|
2 * Copyright (c) 2005 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef DRMPOINTERARRAY_H |
|
20 #define DRMPOINTERARRAY_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32cmn.h> |
|
24 |
|
25 template < class T > NONSHARABLE_CLASS( RDRMPointerArray ) : public RPointerArray< T > |
|
26 { |
|
27 public: |
|
28 inline explicit RDRMPointerArray( TInt aGranularity ); |
|
29 inline RDRMPointerArray( TInt aMinGrowBy, TInt aFactor ); |
|
30 inline RDRMPointerArray(); |
|
31 virtual ~RDRMPointerArray(); |
|
32 |
|
33 // If set to ETrue, RPointerArray::ResetAndDestroy() is called |
|
34 // automatically in destructor. Otherwise only RPointerArrary::Close() |
|
35 // is called. |
|
36 inline void SetAutoCleanup( const TBool aCleanup ); |
|
37 |
|
38 protected: |
|
39 TBool iDoResetAndDestroy; |
|
40 }; |
|
41 |
|
42 template < class T > NONSHARABLE_CLASS( CDRMPointerArray ) : public CBase, public RDRMPointerArray< class T > |
|
43 { |
|
44 public: |
|
45 static CDRMPointerArray* NewLC( TInt aGranularity ); |
|
46 static CDRMPointerArray* NewL( TInt aGranularity ); |
|
47 static CDRMPointerArray* NewLC( TInt aMinGrowBy, TInt aFactor ); |
|
48 static CDRMPointerArray* NewL( TInt aMinGrowBy, TInt aFactor ); |
|
49 static CDRMPointerArray* NewLC(); |
|
50 static CDRMPointerArray* NewL(); |
|
51 |
|
52 // Note: Does not do ResetAndDestroy() by default. |
|
53 // Use SetAutoCleanup to do reallyclean. |
|
54 ~CDRMPointerArray(); |
|
55 |
|
56 |
|
57 protected: |
|
58 explicit CDRMPointerArray( TInt aGranularity ); |
|
59 CDRMPointerArray( TInt aMinGrowBy, TInt aFactor ); |
|
60 CDRMPointerArray(); |
|
61 |
|
62 private: |
|
63 }; |
|
64 |
|
65 |
|
66 #include "drmpointerarray.inl" |
|
67 |
|
68 #endif // DRMPOINTERARRAY_H |