00001 // Filename: hashGeneratorBase.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 HASHGENERATORBASE_H 00016 #define HASHGENERATORBASE_H 00017 00018 #include "pandabase.h" 00019 00020 //////////////////////////////////////////////////////////////////// 00021 // Class : HashGeneratorBase 00022 // Description : This is the base class for a number of classes that 00023 // generate arbitrary hash numbers for complex objects, 00024 // based fundamentally on a sequence of integers. 00025 // 00026 // There are no virtual functions here, for performance 00027 // reasons; it is generally desirable to generate hash 00028 // numbers as quickly as possible. The derived classes 00029 // must redefine all the basic functionality. 00030 // 00031 // Thus, a compile-time decision must be made for the 00032 // kind of HashGenerator that is appropriate for a 00033 // particular class. 00034 //////////////////////////////////////////////////////////////////// 00035 class EXPCL_PANDAEXPRESS HashGeneratorBase { 00036 public: 00037 INLINE HashGeneratorBase(); 00038 INLINE ~HashGeneratorBase(); 00039 00040 INLINE size_t get_hash() const; 00041 00042 protected: 00043 size_t _hash; 00044 }; 00045 00046 #include "hashGeneratorBase.I" 00047 00048 #endif