source: NonGTP/Xerces/xerces/include/xercesc/util/KeyValuePair.c @ 358

Revision 358, 3.5 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1/*
2 * Copyright 1999-2000,2004 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/**
18 * $Log: KeyValuePair.c,v $
19 * Revision 1.3  2004/09/08 13:56:22  peiyongz
20 * Apache License Version 2.0
21 *
22 * Revision 1.2  2002/11/04 15:22:04  tng
23 * C++ Namespace Support.
24 *
25 * Revision 1.1.1.1  2002/02/01 22:22:10  peiyongz
26 * sane_include
27 *
28 * Revision 1.3  2000/03/02 19:54:41  roddey
29 * This checkin includes many changes done while waiting for the
30 * 1.1.0 code to be finished. I can't list them all here, but a list is
31 * available elsewhere.
32 *
33 * Revision 1.2  2000/02/06 07:48:02  rahulj
34 * Year 2K copyright swat.
35 *
36 * Revision 1.1.1.1  1999/11/09 01:04:29  twl
37 * Initial checkin
38 *
39 * Revision 1.2  1999/11/08 20:45:09  rahul
40 * Swat for adding in Product name and CVS comment log variable.
41 *
42 */
43
44
45// ---------------------------------------------------------------------------
46//  Include
47// ---------------------------------------------------------------------------
48#if defined(XERCES_TMPLSINC)
49#include <xercesc/util/KeyValuePair.hpp>
50#endif
51
52XERCES_CPP_NAMESPACE_BEGIN
53
54// ---------------------------------------------------------------------------
55//  KeyValuePair: Constructors and Destructor
56// ---------------------------------------------------------------------------
57template <class TKey, class TValue> KeyValuePair<TKey,TValue>::KeyValuePair()
58{
59}
60
61template <class TKey, class TValue> KeyValuePair<TKey,TValue>::
62KeyValuePair(const TKey& key, const TValue& value) :
63
64    fKey(key)
65    , fValue(value)
66{
67}
68
69template <class TKey, class TValue> KeyValuePair<TKey,TValue>::
70KeyValuePair(const KeyValuePair<TKey,TValue>& toCopy) :
71
72    fKey(toCopy.fKey)
73    , fValue(toCopy.fValue)
74{
75}
76
77template <class TKey, class TValue> KeyValuePair<TKey,TValue>::~KeyValuePair()
78{
79}
80
81
82// ---------------------------------------------------------------------------
83//  KeyValuePair: Getters
84// ---------------------------------------------------------------------------
85template <class TKey, class TValue> const TKey&
86KeyValuePair<TKey,TValue>::getKey() const
87{
88    return fKey;
89
90}
91
92template <class TKey, class TValue> TKey& KeyValuePair<TKey,TValue>::getKey()
93{
94    return fKey;
95}
96
97template <class TKey, class TValue> const TValue&
98KeyValuePair<TKey,TValue>::getValue() const
99{
100    return fValue;
101}
102
103template <class TKey, class TValue> TValue& KeyValuePair<TKey,TValue>::getValue()
104{
105    return fValue;
106}
107
108
109// ---------------------------------------------------------------------------
110//  KeyValuePair: Setters
111// ---------------------------------------------------------------------------
112template <class TKey, class TValue> TKey&
113KeyValuePair<TKey,TValue>::setKey(const TKey& newKey)
114{
115    fKey = newKey;
116    return fKey;
117}
118
119template <class TKey, class TValue> TValue&
120KeyValuePair<TKey,TValue>::setValue(const TValue& newValue)
121{
122    fValue = newValue;
123    return fValue;
124}
125
126XERCES_CPP_NAMESPACE_END
Note: See TracBrowser for help on using the repository browser.