Panda3D
checksumHashGenerator.h
1 // Filename: checksumHashGenerator.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 CHECKSUMHASHGENERATOR_H
16 #define CHECKSUMHASHGENERATOR_H
17 
18 #include "pandabase.h"
19 
20 #include "hashGeneratorBase.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : ChecksumHashGenerator
24 // Description : This is a specific kind of HashGenerator that simply
25 // adds up all of the ints. Nothing fancy, and pretty
26 // quick.
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDAEXPRESS ChecksumHashGenerator : public HashGeneratorBase {
29 public:
30  INLINE void add_int(long num);
31  INLINE void add_bool(bool flag);
32  INLINE void add_fp(float num, float threshold);
33  INLINE void add_fp(double num, double threshold);
34  INLINE void add_pointer(void *ptr);
35  void add_string(const string &str);
36 };
37 
38 #include "checksumHashGenerator.I"
39 
40 #endif
This is a specific kind of HashGenerator that simply adds up all of the ints.
This is the base class for a number of classes that generate arbitrary hash numbers for complex objec...