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

Revision 358, 2.6 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.hpp,v 1.5 2004/09/08 13:56:22 peiyongz Exp $
19 */
20
21#if !defined(KEYREFPAIR_HPP)
22#define KEYREFPAIR_HPP
23
24
25#include <xercesc/util/XMemory.hpp>
26
27XERCES_CPP_NAMESPACE_BEGIN
28
29template <class TKey, class TValue> class KeyRefPair : public XMemory
30{
31    public  :
32        // -------------------------------------------------------------------
33        //  Constructors and Destructor
34        // -------------------------------------------------------------------
35        KeyRefPair();
36        KeyRefPair(TKey* key, TValue* value);
37        KeyRefPair(const KeyRefPair<TKey,TValue>* toCopy);
38        KeyRefPair(const KeyRefPair<TKey,TValue>& toCopy);
39        ~KeyRefPair();
40
41
42        // -------------------------------------------------------------------
43        //  Getters
44        // -------------------------------------------------------------------
45        const TKey* getKey() const;
46        TKey* getKey();
47        const TValue* getValue() const;
48        TValue* getValue();
49
50
51        // -------------------------------------------------------------------
52        //  Setters
53        // -------------------------------------------------------------------
54        TKey* setKey(TKey* newKey);
55        TValue* setValue(TValue* newValue);
56
57
58    private :
59        // unimplemented:       
60        KeyRefPair<TKey,TValue>& operator=(const KeyRefPair<TKey,TValue>&);
61        // -------------------------------------------------------------------
62        //  Private data members
63        //
64        //  fKey
65        //      The object that represents the key of the pair
66        //
67        //  fValue
68        //      The object that represents the value of the pair
69        // -------------------------------------------------------------------
70        TKey*    fKey;
71        TValue*  fValue;
72};
73
74XERCES_CPP_NAMESPACE_END
75
76#if !defined(XERCES_TMPLSINC)
77#include <xercesc/util/KeyRefPair.c>
78#endif
79
80#endif
Note: See TracBrowser for help on using the repository browser.