|
1 /* |
|
2 * Copyright (c) 2009 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 * Licensed to the Apache Software Foundation (ASF) under one or more |
|
19 * contributor license agreements. See the NOTICE file distributed with |
|
20 * this work for additional information regarding copyright ownership. |
|
21 * The ASF licenses this file to You under the Apache License, Version 2.0 |
|
22 * (the "License"); you may not use this file except in compliance with |
|
23 * the License. You may obtain a copy of the License at |
|
24 * |
|
25 * http://www.apache.org/licenses/LICENSE-2.0 |
|
26 * |
|
27 * Unless required by applicable law or agreed to in writing, software |
|
28 * distributed under the License is distributed on an "AS IS" BASIS, |
|
29 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
30 * See the License for the specific language governing permissions and |
|
31 * limitations under the License. |
|
32 */ |
|
33 |
|
34 /** |
|
35 * $Id: KeyRefPair.c 568078 2007-08-21 11:43:25Z amassari $ |
|
36 */ |
|
37 |
|
38 |
|
39 // --------------------------------------------------------------------------- |
|
40 // Include |
|
41 // --------------------------------------------------------------------------- |
|
42 #if defined(XERCES_TMPLSINC) |
|
43 #include <xercesc/util/KeyRefPair.hpp> |
|
44 #endif |
|
45 |
|
46 XERCES_CPP_NAMESPACE_BEGIN |
|
47 |
|
48 // --------------------------------------------------------------------------- |
|
49 // KeyRefPair: Constructors and Destructor |
|
50 // --------------------------------------------------------------------------- |
|
51 template <class TKey, class TValue> KeyRefPair<TKey,TValue>::KeyRefPair() |
|
52 { |
|
53 } |
|
54 |
|
55 template <class TKey, class TValue> KeyRefPair<TKey,TValue>:: |
|
56 KeyRefPair(TKey* key, TValue* value) : |
|
57 |
|
58 fKey(key) |
|
59 , fValue(value) |
|
60 { |
|
61 } |
|
62 |
|
63 template <class TKey, class TValue> KeyRefPair<TKey,TValue>:: |
|
64 KeyRefPair(const KeyRefPair<TKey,TValue>* toCopy) : |
|
65 |
|
66 fKey(toCopy->fKey) |
|
67 , fValue(toCopy->fValue) |
|
68 { |
|
69 } |
|
70 |
|
71 template <class TKey, class TValue> KeyRefPair<TKey,TValue>:: |
|
72 KeyRefPair(const KeyRefPair<TKey,TValue>& toCopy) : |
|
73 |
|
74 fKey(toCopy.fKey) |
|
75 , fValue(toCopy.fValue) |
|
76 { |
|
77 } |
|
78 |
|
79 |
|
80 template <class TKey, class TValue> KeyRefPair<TKey,TValue>::~KeyRefPair() |
|
81 { |
|
82 } |
|
83 |
|
84 |
|
85 // --------------------------------------------------------------------------- |
|
86 // KeyRefPair: Getters |
|
87 // --------------------------------------------------------------------------- |
|
88 template <class TKey, class TValue> const TKey* |
|
89 KeyRefPair<TKey,TValue>::getKey() const |
|
90 { |
|
91 return fKey; |
|
92 |
|
93 } |
|
94 |
|
95 template <class TKey, class TValue> TKey* KeyRefPair<TKey,TValue>::getKey() |
|
96 { |
|
97 return fKey; |
|
98 } |
|
99 |
|
100 template <class TKey, class TValue> const TValue* |
|
101 KeyRefPair<TKey,TValue>::getValue() const |
|
102 { |
|
103 return fValue; |
|
104 } |
|
105 |
|
106 template <class TKey, class TValue> TValue* KeyRefPair<TKey,TValue>::getValue() |
|
107 { |
|
108 return fValue; |
|
109 } |
|
110 |
|
111 |
|
112 // --------------------------------------------------------------------------- |
|
113 // KeyRefPair: Setters |
|
114 // --------------------------------------------------------------------------- |
|
115 template <class TKey, class TValue> TKey* |
|
116 KeyRefPair<TKey,TValue>::setKey(TKey* newKey) |
|
117 { |
|
118 fKey = newKey; |
|
119 return fKey; |
|
120 } |
|
121 |
|
122 template <class TKey, class TValue> TValue* |
|
123 KeyRefPair<TKey,TValue>::setValue(TValue* newValue) |
|
124 { |
|
125 fValue = newValue; |
|
126 return fValue; |
|
127 } |
|
128 |
|
129 XERCES_CPP_NAMESPACE_END |