|
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: Encapsulates name and value |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CPROPERTYMAP_H |
|
20 #define C_CPROPERTYMAP_H |
|
21 |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 |
|
26 namespace hspswrapper{ |
|
27 |
|
28 |
|
29 |
|
30 /** |
|
31 * Presents property as name and value pair |
|
32 * |
|
33 * @code |
|
34 * @endcode |
|
35 * |
|
36 * @lib xnlayoutengine.lib |
|
37 * @since S60 v5.0 |
|
38 */ |
|
39 class CPropertyMap : public CBase |
|
40 { |
|
41 public: |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 IMPORT_C static CPropertyMap* NewL(); |
|
46 IMPORT_C static CPropertyMap* NewLC(); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 IMPORT_C virtual ~CPropertyMap(); |
|
52 |
|
53 /** |
|
54 * Set property name |
|
55 * |
|
56 * @param aName Property nane |
|
57 * @return Reference to this object |
|
58 */ |
|
59 IMPORT_C CPropertyMap& SetNameL( const TDesC8& aName ); |
|
60 |
|
61 /** |
|
62 * Get property name |
|
63 * |
|
64 * @return Reference to name or KNullDesC8 |
|
65 */ |
|
66 IMPORT_C const TDesC8& Name()const; |
|
67 |
|
68 /** |
|
69 * Set property value |
|
70 * |
|
71 * @param aValue Property value |
|
72 * @return Reference to this object |
|
73 */ |
|
74 IMPORT_C CPropertyMap& SetValueL( const TDesC8& aValue ); |
|
75 |
|
76 /** |
|
77 * Get property value |
|
78 * |
|
79 * @return Reference to value or KNullDesC8 |
|
80 */ |
|
81 IMPORT_C const TDesC8& Value()const; |
|
82 |
|
83 private: |
|
84 |
|
85 CPropertyMap(); |
|
86 |
|
87 void ConstructL(); |
|
88 |
|
89 |
|
90 private: // data |
|
91 |
|
92 /** |
|
93 * Own. Property name |
|
94 */ |
|
95 HBufC8* iName; |
|
96 /** |
|
97 * Own. Property value |
|
98 */ |
|
99 HBufC8* iValue; |
|
100 }; |
|
101 |
|
102 } |
|
103 |
|
104 #endif // C_CPROPERTYMAP_H |