GME  13
KeyRefPair.c
Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  * 
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  * 
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00023 // ---------------------------------------------------------------------------
00024 //  Include
00025 // ---------------------------------------------------------------------------
00026 #if defined(XERCES_TMPLSINC)
00027 #include <xercesc/util/KeyRefPair.hpp>
00028 #endif
00029 
00030 XERCES_CPP_NAMESPACE_BEGIN
00031 
00032 // ---------------------------------------------------------------------------
00033 //  KeyRefPair: Constructors and Destructor
00034 // ---------------------------------------------------------------------------
00035 template <class TKey, class TValue> KeyRefPair<TKey,TValue>::KeyRefPair()
00036 {
00037 }
00038 
00039 template <class TKey, class TValue> KeyRefPair<TKey,TValue>::
00040 KeyRefPair(TKey* key, TValue* value) :
00041 
00042     fKey(key)
00043     , fValue(value)
00044 {
00045 }
00046 
00047 template <class TKey, class TValue> KeyRefPair<TKey,TValue>::
00048 KeyRefPair(const KeyRefPair<TKey,TValue>* toCopy) :
00049 
00050     fKey(toCopy->fKey)
00051     , fValue(toCopy->fValue)
00052 {
00053 }
00054 
00055 template <class TKey, class TValue> KeyRefPair<TKey,TValue>::
00056 KeyRefPair(const KeyRefPair<TKey,TValue>& toCopy) :
00057 
00058     fKey(toCopy.fKey)
00059     , fValue(toCopy.fValue)
00060 {
00061 }
00062 
00063 
00064 template <class TKey, class TValue> KeyRefPair<TKey,TValue>::~KeyRefPair()
00065 {
00066 }
00067 
00068 
00069 // ---------------------------------------------------------------------------
00070 //  KeyRefPair: Getters
00071 // ---------------------------------------------------------------------------
00072 template <class TKey, class TValue> const TKey*
00073 KeyRefPair<TKey,TValue>::getKey() const
00074 {
00075     return fKey;
00076 
00077 }
00078 
00079 template <class TKey, class TValue> TKey* KeyRefPair<TKey,TValue>::getKey()
00080 {
00081     return fKey;
00082 }
00083 
00084 template <class TKey, class TValue> const TValue*
00085 KeyRefPair<TKey,TValue>::getValue() const
00086 {
00087     return fValue;
00088 }
00089 
00090 template <class TKey, class TValue> TValue* KeyRefPair<TKey,TValue>::getValue()
00091 {
00092     return fValue;
00093 }
00094 
00095 
00096 // ---------------------------------------------------------------------------
00097 //  KeyRefPair: Setters
00098 // ---------------------------------------------------------------------------
00099 template <class TKey, class TValue> TKey*
00100 KeyRefPair<TKey,TValue>::setKey(TKey* newKey)
00101 {
00102     fKey = newKey;
00103     return fKey;
00104 }
00105 
00106 template <class TKey, class TValue> TValue*
00107 KeyRefPair<TKey,TValue>::setValue(TValue* newValue)
00108 {
00109     fValue = newValue;
00110     return fValue;
00111 }
00112 
00113 XERCES_CPP_NAMESPACE_END