|
1 /* |
|
2 * Copyright (c) 2008 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: Item id, name and properties |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_CITEMMAP_H |
|
21 #define C_CITEMMAP_H |
|
22 |
|
23 |
|
24 |
|
25 #include <e32base.h> |
|
26 |
|
27 |
|
28 namespace hspswrapper{ |
|
29 |
|
30 class CPropertyMap; |
|
31 |
|
32 /** |
|
33 * Item id, name and properties |
|
34 * |
|
35 * |
|
36 * @code |
|
37 * |
|
38 * @endcode |
|
39 * |
|
40 * @lib xnlayoutengine.lib |
|
41 * @since S60 v5.0 |
|
42 */ |
|
43 class CItemMap : public CBase |
|
44 { |
|
45 |
|
46 public: |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 */ |
|
51 IMPORT_C static CItemMap* NewL(); |
|
52 IMPORT_C static CItemMap* NewLC(); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 IMPORT_C virtual ~CItemMap(); |
|
58 |
|
59 /** |
|
60 * Set item id |
|
61 * |
|
62 * @param aItemId Item id |
|
63 * @return Reference to this object |
|
64 */ |
|
65 IMPORT_C CItemMap& SetItemIdL(const TDesC8& aItemId ); |
|
66 |
|
67 /** |
|
68 * Get item id |
|
69 * |
|
70 * @return Reference to item id or KNullDesC8 |
|
71 */ |
|
72 IMPORT_C const TDesC8& ItemId()const; |
|
73 |
|
74 /** |
|
75 * Set item name |
|
76 * |
|
77 * @param aItemName Item name |
|
78 * @return Reference to this object |
|
79 */ |
|
80 IMPORT_C CItemMap& SetItemNameL(const TDesC8& aItemName ); |
|
81 |
|
82 /** |
|
83 * Get item name |
|
84 * |
|
85 * @return Reference to item name or KNullDesC8 |
|
86 */ |
|
87 IMPORT_C const TDesC8& ItemName()const; |
|
88 |
|
89 /** |
|
90 * Add item property map into properties array |
|
91 * |
|
92 * @param aPropertyMap Property map. Takes ownership |
|
93 * @return Reference to this object |
|
94 */ |
|
95 IMPORT_C CItemMap& AddPropertyMapL(CPropertyMap* aPropertyMap ); |
|
96 |
|
97 /** |
|
98 * Get property map array. |
|
99 * |
|
100 * @return Reference to proprty map array |
|
101 */ |
|
102 IMPORT_C RPointerArray<CPropertyMap>& Properties()const; |
|
103 |
|
104 private: |
|
105 |
|
106 CItemMap(); |
|
107 |
|
108 void ConstructL(); |
|
109 |
|
110 |
|
111 private: // data |
|
112 |
|
113 /** |
|
114 * Own. Item id |
|
115 */ |
|
116 HBufC8* iItemId; |
|
117 |
|
118 /** |
|
119 * Own. Item name |
|
120 */ |
|
121 HBufC8* iItemName; |
|
122 |
|
123 /** |
|
124 * Own. Array of property maps |
|
125 */ |
|
126 mutable RPointerArray<CPropertyMap> iProperties; |
|
127 }; |
|
128 |
|
129 } |
|
130 |
|
131 |
|
132 #endif // C_CITEMMAP_H |