addHash.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Filename: addHash.h
  2. // Created by: drose (01Sep06)
  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 ADDHASH_H
  19. #define ADDHASH_H
  20. #include "dtoolbase.h"
  21. #include "numeric_types.h"
  22. #include "lookup3.h"
  23. ////////////////////////////////////////////////////////////////////
  24. // Class : AddHash
  25. // Description : This class is used just as a namespace scope to
  26. // collect together a handful of static functions, which
  27. // are used to wrap calls to Bob Jenkins' public-domain
  28. // hash generation function (defined in lookup3.c).
  29. ////////////////////////////////////////////////////////////////////
  30. class EXPCL_DTOOL AddHash {
  31. public:
  32. INLINE static size_t add_hash(size_t start, const PN_uint32 *words, size_t num_words);
  33. static size_t add_hash(size_t start, const PN_uint8 *bytes, size_t num_bytes);
  34. INLINE static size_t add_hash(size_t start, const PN_float32 *floats, size_t num_floats);
  35. INLINE static size_t add_hash(size_t start, const PN_float64 *floats, size_t num_floats);
  36. };
  37. #include "addHash.I"
  38. #endif