Panda3D
|
00001 // Filename: checksumHashGenerator.h 00002 // Created by: drose (14May01) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef CHECKSUMHASHGENERATOR_H 00016 #define CHECKSUMHASHGENERATOR_H 00017 00018 #include "pandabase.h" 00019 00020 #include "hashGeneratorBase.h" 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Class : ChecksumHashGenerator 00024 // Description : This is a specific kind of HashGenerator that simply 00025 // adds up all of the ints. Nothing fancy, and pretty 00026 // quick. 00027 //////////////////////////////////////////////////////////////////// 00028 class EXPCL_PANDAEXPRESS ChecksumHashGenerator : public HashGeneratorBase { 00029 public: 00030 INLINE void add_int(long num); 00031 INLINE void add_bool(bool flag); 00032 INLINE void add_fp(float num, float threshold); 00033 INLINE void add_fp(double num, double threshold); 00034 INLINE void add_pointer(void *ptr); 00035 void add_string(const string &str); 00036 }; 00037 00038 #include "checksumHashGenerator.I" 00039 00040 #endif