GME  13
KeyValuePair.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 
00018 /*
00019  * $Id: KeyValuePair.c 471747 2006-11-06 14:31:56Z amassari $
00020  */
00021 
00022 
00023 // ---------------------------------------------------------------------------
00024 //  Include
00025 // ---------------------------------------------------------------------------
00026 #if defined(XERCES_TMPLSINC)
00027 #include <xercesc/util/KeyValuePair.hpp>
00028 #endif
00029 
00030 XERCES_CPP_NAMESPACE_BEGIN
00031 
00032 // ---------------------------------------------------------------------------
00033 //  KeyValuePair: Constructors and Destructor
00034 // ---------------------------------------------------------------------------
00035 template <class TKey, class TValue> KeyValuePair<TKey,TValue>::KeyValuePair()
00036 {
00037 }
00038 
00039 template <class TKey, class TValue> KeyValuePair<TKey,TValue>::
00040 KeyValuePair(const TKey& key, const TValue& value) :
00041 
00042     fKey(key)
00043     , fValue(value)
00044 {
00045 }
00046 
00047 template <class TKey, class TValue> KeyValuePair<TKey,TValue>::
00048 KeyValuePair(const KeyValuePair<TKey,TValue>& toCopy) :
00049 
00050     fKey(toCopy.fKey)
00051     , fValue(toCopy.fValue)
00052 {
00053 }
00054 
00055 template <class TKey, class TValue> KeyValuePair<TKey,TValue>::~KeyValuePair()
00056 {
00057 }
00058 
00059 
00060 // ---------------------------------------------------------------------------
00061 //  KeyValuePair: Getters
00062 // ---------------------------------------------------------------------------
00063 template <class TKey, class TValue> const TKey&
00064 KeyValuePair<TKey,TValue>::getKey() const
00065 {
00066     return fKey;
00067 
00068 }
00069 
00070 template <class TKey, class TValue> TKey& KeyValuePair<TKey,TValue>::getKey()
00071 {
00072     return fKey;
00073 }
00074 
00075 template <class TKey, class TValue> const TValue&
00076 KeyValuePair<TKey,TValue>::getValue() const
00077 {
00078     return fValue;
00079 }
00080 
00081 template <class TKey, class TValue> TValue& KeyValuePair<TKey,TValue>::getValue()
00082 {
00083     return fValue;
00084 }
00085 
00086 
00087 // ---------------------------------------------------------------------------
00088 //  KeyValuePair: Setters
00089 // ---------------------------------------------------------------------------
00090 template <class TKey, class TValue> TKey&
00091 KeyValuePair<TKey,TValue>::setKey(const TKey& newKey)
00092 {
00093     fKey = newKey;
00094     return fKey;
00095 }
00096 
00097 template <class TKey, class TValue> TValue&
00098 KeyValuePair<TKey,TValue>::setValue(const TValue& newValue)
00099 {
00100     fValue = newValue;
00101     return fValue;
00102 }
00103 
00104 XERCES_CPP_NAMESPACE_END