Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. hashtable.h
  5. Abstract:
  6. This file contains the class prototypes for hashtables
  7. Author:
  8. Vishnu Patankar (VishnuP) 7-April-2000
  9. Environment:
  10. User Mode - Win32
  11. Revision History:
  12. --*/
  13. ///////////////////////////////////////////////////////////////////////////////
  14. // //
  15. // Includes //
  16. // //
  17. ///////////////////////////////////////////////////////////////////////////////
  18. #ifndef _hashtable_
  19. #define _hashtable_
  20. #include "headers.h"
  21. #include "secedit.h"
  22. // following typedefs for readability
  23. typedef PSCE_NAME_STATUS_LIST PSCE_PRECEDENCE_NAME_LIST;
  24. typedef SCE_NAME_STATUS_LIST SCE_PRECEDENCE_NAME_LIST;
  25. typedef class ScepHashTable SCEP_HASH_TABLE;
  26. class ScepHashTable
  27. {
  28. private:
  29. PSCE_PRECEDENCE_NAME_LIST Lookup(PWSTR pName);
  30. protected:
  31. PSCE_PRECEDENCE_NAME_LIST *aTable;
  32. DWORD NumBuckets;
  33. BOOL bInitialized;
  34. DWORD ScepGenericHash(PWSTR pwszName);
  35. // if performance hits us for files/regkeys, we can make an abstract base class
  36. // such that files/keys can derive from this and provide their own hash functions
  37. public:
  38. ScepHashTable(DWORD dwNumBuckets);
  39. ~ScepHashTable();
  40. DWORD LookupAdd(PWSTR pName, DWORD **ppSettingPrecedence);
  41. #ifdef _DEBUG
  42. void ScepDumpTable();
  43. #endif
  44. };
  45. #endif