Panda3D
 All Classes Functions Variables Enumerations
hashGeneratorBase.h
1 // Filename: hashGeneratorBase.h
2 // Created by: drose (14May01)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef HASHGENERATORBASE_H
16 #define HASHGENERATORBASE_H
17 
18 #include "pandabase.h"
19 
20 ////////////////////////////////////////////////////////////////////
21 // Class : HashGeneratorBase
22 // Description : This is the base class for a number of classes that
23 // generate arbitrary hash numbers for complex objects,
24 // based fundamentally on a sequence of integers.
25 //
26 // There are no virtual functions here, for performance
27 // reasons; it is generally desirable to generate hash
28 // numbers as quickly as possible. The derived classes
29 // must redefine all the basic functionality.
30 //
31 // Thus, a compile-time decision must be made for the
32 // kind of HashGenerator that is appropriate for a
33 // particular class.
34 ////////////////////////////////////////////////////////////////////
35 class EXPCL_PANDAEXPRESS HashGeneratorBase {
36 public:
37  INLINE HashGeneratorBase();
38  INLINE ~HashGeneratorBase();
39 
40  INLINE size_t get_hash() const;
41 
42 protected:
43  size_t _hash;
44 };
45 
46 #include "hashGeneratorBase.I"
47 
48 #endif
This is the base class for a number of classes that generate arbitrary hash numbers for complex objec...