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

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

xerces added

Line 
1/*
2 * Copyright 2002,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 * $Id: KeyRefPair.c,v 1.5 2004/09/08 13:56:22 peiyongz Exp $
19 */
20
21
22// ---------------------------------------------------------------------------
23//  Include
24// ---------------------------------------------------------------------------
25#if defined(XERCES_TMPLSINC)
26#include <xercesc/util/KeyRefPair.hpp>
27#endif
28
29XERCES_CPP_NAMESPACE_BEGIN
30
31// ---------------------------------------------------------------------------
32//  KeyRefPair: Constructors and Destructor
33// ---------------------------------------------------------------------------
34template <class TKey, class TValue> KeyRefPair<TKey,TValue>::KeyRefPair()
35{
36}
37
38template <class TKey, class TValue> KeyRefPair<TKey,TValue>::
39KeyRefPair(TKey* key, TValue* value) :
40
41    fKey(key)
42    , fValue(value)
43{
44}
45
46template <class TKey, class TValue> KeyRefPair<TKey,TValue>::
47KeyRefPair(const KeyRefPair<TKey,TValue>* toCopy) :
48
49    fKey(toCopy->fKey)
50    , fValue(toCopy->fValue)
51{
52}
53
54template <class TKey, class TValue> KeyRefPair<TKey,TValue>::
55KeyRefPair(const KeyRefPair<TKey,TValue>& toCopy) :
56
57    fKey(toCopy.fKey)
58    , fValue(toCopy.fValue)
59{
60}
61
62
63template <class TKey, class TValue> KeyRefPair<TKey,TValue>::~KeyRefPair()
64{
65}
66
67
68// ---------------------------------------------------------------------------
69//  KeyRefPair: Getters
70// ---------------------------------------------------------------------------
71template <class TKey, class TValue> const TKey*
72KeyRefPair<TKey,TValue>::getKey() const
73{
74    return fKey;
75
76}
77
78template <class TKey, class TValue> TKey* KeyRefPair<TKey,TValue>::getKey()
79{
80    return fKey;
81}
82
83template <class TKey, class TValue> const TValue*
84KeyRefPair<TKey,TValue>::getValue() const
85{
86    return fValue;
87}
88
89template <class TKey, class TValue> TValue* KeyRefPair<TKey,TValue>::getValue()
90{
91    return fValue;
92}
93
94
95// ---------------------------------------------------------------------------
96//  KeyRefPair: Setters
97// ---------------------------------------------------------------------------
98template <class TKey, class TValue> TKey*
99KeyRefPair<TKey,TValue>::setKey(TKey* newKey)
100{
101    fKey = newKey;
102    return fKey;
103}
104
105template <class TKey, class TValue> TValue*
106KeyRefPair<TKey,TValue>::setValue(TValue* newValue)
107{
108    fValue = newValue;
109    return fValue;
110}
111
112XERCES_CPP_NAMESPACE_END
Note: See TracBrowser for help on using the repository browser.