equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2002 - 2007 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: RRefArray |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef RREFARRAY_H |
|
19 #define RREFARRAY_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32std.h> |
|
23 |
|
24 // CLASS DECLARATION |
|
25 /** |
|
26 * Array class for references. |
|
27 */ |
|
28 template <class T> |
|
29 class RRefArray |
|
30 :public RPointerArrayBase |
|
31 { |
|
32 public: |
|
33 inline RRefArray():RPointerArrayBase(){}; |
|
34 inline void Close(){ RPointerArrayBase::Close(); }; |
|
35 inline TInt Count() const{ return RPointerArrayBase::Count(); }; |
|
36 inline T const& operator[](TInt anIndex) const |
|
37 { return *( ( T* ) At(anIndex)); }; |
|
38 inline T& operator[](TInt anIndex) |
|
39 { return *( ( T* ) At(anIndex)); }; |
|
40 inline TInt Append( T const& anEntry ) |
|
41 { return RPointerArrayBase::Append(( TAny*) &anEntry); }; |
|
42 inline TInt Insert( T const& anEntry, TInt aPos ) |
|
43 { return RPointerArrayBase::Insert(( TAny*) &anEntry, aPos ); }; |
|
44 inline void Remove( TInt anIndex ) |
|
45 { RPointerArrayBase::Remove( anIndex ); }; |
|
46 inline void Reset(){ RPointerArrayBase::Reset(); }; |
|
47 private: |
|
48 RArray<TAny*> iArray; |
|
49 }; |
|
50 |
|
51 |
|
52 #endif // RREFARRAY_H |
|
53 |
|
54 // End of File |