|
1 /* |
|
2 * Copyright (c) 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: A list of CVCommandUiEntry-objects |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CVCOMMANDUIENTRYARRAY_H |
|
20 #define CVCOMMANDUIENTRYARRAY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <vcommandapi.h> |
|
24 #include "vcommanduientry.h" |
|
25 |
|
26 /** Array of pointers to CVCommandUiEntrys */ |
|
27 typedef RPointerArray<CVCommandUiEntry> RVCommandUiEntryArray; |
|
28 |
|
29 /** |
|
30 * Non-modifiable list of CVCommandUiEntrys |
|
31 */ |
|
32 class CVCommandUiEntryArray : public CBase |
|
33 { |
|
34 public: |
|
35 /** |
|
36 * Constructs the non-modifiable CVCommandUiEntryArray |
|
37 * @param aSource Commands to store. CVCommandUiEntryArray makes |
|
38 * copies of them. Ownership is passed to this class. |
|
39 */ |
|
40 static CVCommandUiEntryArray* NewL( CVCommandArray* aArray ); |
|
41 |
|
42 /** |
|
43 * Destructor |
|
44 */ |
|
45 virtual ~CVCommandUiEntryArray(); |
|
46 |
|
47 /** |
|
48 * Returns the reference to the command stored in this |
|
49 * CVCommandUiEntryArray |
|
50 * @param The position of the object pointer within the array. This |
|
51 * value must not be negative and must not be greater than the |
|
52 * number of objects currently in the array, otherwise the |
|
53 * operator raises a USER-130 panic. |
|
54 * @return Unmodifiable reference to CVCommandUiEntry |
|
55 */ |
|
56 const CVCommandUiEntry& At( TInt aIndex ) const; |
|
57 |
|
58 /** |
|
59 * Equivalent to the operator At |
|
60 * @see At() |
|
61 */ |
|
62 const CVCommandUiEntry& operator[]( TInt aIndex ) const; |
|
63 |
|
64 /** |
|
65 * Returns the number of commands |
|
66 * @return TInt The number of voice commands |
|
67 */ |
|
68 TInt Count() const; |
|
69 |
|
70 /* |
|
71 * Creates a copy of this object. Ownership is passed to the caller. |
|
72 * @return CVCommandUiEntryArray* Pointer to a CVCommandUiEntryArray |
|
73 * object |
|
74 */ |
|
75 CVCommandUiEntryArray* CloneL(); |
|
76 |
|
77 private: |
|
78 |
|
79 /** |
|
80 * Constructor |
|
81 */ |
|
82 CVCommandUiEntryArray( CVCommandArray* aArray ); |
|
83 |
|
84 /** |
|
85 * Symbian C++ default constructor. |
|
86 */ |
|
87 void ConstructL(); |
|
88 |
|
89 private: |
|
90 |
|
91 CVCommandArray* iCommands; |
|
92 |
|
93 RVCommandUiEntryArray iListBoxCommands; |
|
94 }; |
|
95 |
|
96 #endif // CVCOMMANDUIENTRYARRAY_H |
|
97 |
|
98 // End of File |
|
99 |
|
100 |