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 | #if !defined(HASHPTR_HPP)
|
---|
18 | #define HASHPTR_HPP
|
---|
19 |
|
---|
20 | #include <xercesc/util/HashBase.hpp>
|
---|
21 |
|
---|
22 | XERCES_CPP_NAMESPACE_BEGIN
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The <code>HashPtr</code> class inherits from <code>HashBase</code>.
|
---|
26 | * This is a generic hasher class designed to hash the pointers of the
|
---|
27 | * objects themselves. Useful if you want to hash objects instead of
|
---|
28 | * strings so long as the objects don't move to a different memory location.
|
---|
29 | * See <code>HashBase</code> for more information.
|
---|
30 | */
|
---|
31 |
|
---|
32 | class XMLUTIL_EXPORT HashPtr : public HashBase
|
---|
33 | {
|
---|
34 | public:
|
---|
35 | HashPtr();
|
---|
36 | virtual ~HashPtr();
|
---|
37 | virtual unsigned int getHashVal(const void *const key, unsigned int mod
|
---|
38 | , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
|
---|
39 | virtual bool equals(const void *const key1, const void *const key2);
|
---|
40 | private:
|
---|
41 | // -----------------------------------------------------------------------
|
---|
42 | // Unimplemented constructors and operators
|
---|
43 | // -----------------------------------------------------------------------
|
---|
44 | HashPtr(const HashPtr&);
|
---|
45 | HashPtr& operator=(const HashPtr&);
|
---|
46 | };
|
---|
47 |
|
---|
48 | XERCES_CPP_NAMESPACE_END
|
---|
49 |
|
---|
50 | #endif
|
---|