hashGeneratorBase.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Filename: hashGeneratorBase.h
  2. // Created by: drose (14May01)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://etc.cmu.edu/panda3d/docs/license/ .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #ifndef HASHGENERATORBASE_H
  19. #define HASHGENERATORBASE_H
  20. #include "pandabase.h"
  21. ////////////////////////////////////////////////////////////////////
  22. // Class : HashGeneratorBase
  23. // Description : This is the base class for a number of classes that
  24. // generate arbitrary hash numbers for complex objects,
  25. // based fundamentally on a sequence of integers.
  26. //
  27. // There are no virtual functions here, for performance
  28. // reasons; it is generally desirable to generate hash
  29. // numbers as quickly as possible. The derived classes
  30. // must redefine all the basic functionality.
  31. //
  32. // Thus, a compile-time decision must be made for the
  33. // kind of HashGenerator that is appropriate for a
  34. // particular class.
  35. ////////////////////////////////////////////////////////////////////
  36. class EXPCL_PANDAEXPRESS HashGeneratorBase {
  37. public:
  38. INLINE HashGeneratorBase();
  39. INLINE ~HashGeneratorBase();
  40. INLINE size_t get_hash() const;
  41. protected:
  42. size_t _hash;
  43. };
  44. #include "hashGeneratorBase.I"
  45. #endif