|
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 |
|
20 // ----------------------------------------------------------------------------- |
|
21 // CMceKeyTValuePair::CMceKeyTValuePair |
|
22 // ----------------------------------------------------------------------------- |
|
23 // |
|
24 template <class T> |
|
25 CMceKeyTValuePair<T>::CMceKeyTValuePair( TInt aKey, T aValue ): |
|
26 CMceDictionaryItem( aKey ), iValue( aValue ) |
|
27 { |
|
28 } |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // CMceKeyTValuePair::Value |
|
32 // ----------------------------------------------------------------------------- |
|
33 // |
|
34 template <class T> |
|
35 T& CMceKeyTValuePair<T>::Value() |
|
36 { |
|
37 return iValue; |
|
38 } |
|
39 |
|
40 // ----------------------------------------------------------------------------- |
|
41 // CMceKeyTValuePair::SetValue |
|
42 // ----------------------------------------------------------------------------- |
|
43 // |
|
44 template <class T> |
|
45 void CMceKeyTValuePair<T>::SetValue( T aValue ) |
|
46 { |
|
47 iValue = aValue; |
|
48 } |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // CMceKeyCValuePair::CMceKeyCValuePair |
|
52 // ----------------------------------------------------------------------------- |
|
53 // |
|
54 template <class C> |
|
55 CMceKeyCValuePair<C>::CMceKeyCValuePair( TInt aKey, C* aValue ): |
|
56 CMceDictionaryItem( aKey ), iValue( aValue ) |
|
57 { |
|
58 } |
|
59 |
|
60 // ----------------------------------------------------------------------------- |
|
61 // CMceKeyCValuePair::Value |
|
62 // ----------------------------------------------------------------------------- |
|
63 // |
|
64 template <class C> |
|
65 C* CMceKeyCValuePair<C>::Value() |
|
66 { |
|
67 return iValue; |
|
68 } |
|
69 |
|
70 // ----------------------------------------------------------------------------- |
|
71 // CMceKeyCValuePair::SetValue |
|
72 // ----------------------------------------------------------------------------- |
|
73 // |
|
74 template <class C> |
|
75 void CMceKeyCValuePair<C>::SetValue( C* aValue ) |
|
76 { |
|
77 delete iValue; |
|
78 iValue = aValue; |
|
79 } |
|
80 |
|
81 // ----------------------------------------------------------------------------- |
|
82 // CMceKeyCValuePair::CMceKeyCValuePair |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 template <class C> |
|
86 CMceKeyCValuePair<C>::~CMceKeyCValuePair() |
|
87 { |
|
88 delete iValue; |
|
89 } |
|
90 |
|
91 // End of file |