Leaked source code of windows server 2003
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.

46 lines
1.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Copyright (C) Microsoft Corporation, 1991 - 1997
  4. //
  5. // File: occarray.hxx
  6. //
  7. // Contents: Occurrence array
  8. //
  9. // History: 30-Jun-96 SitaramR Created
  10. //
  11. //-----------------------------------------------------------------------------
  12. #pragma once
  13. const ULONG OCCARRAY_SIZE = 20;
  14. struct SPidOcc
  15. {
  16. ULONG pid;
  17. OCCURRENCE occ;
  18. };
  19. //+---------------------------------------------------------------------------
  20. //
  21. // Class: CSparseOccArray
  22. //
  23. // Purpose: Class for the management of an array of OCCURRENCES.
  24. //
  25. // History: 04-Dec-97 dlee Created
  26. //
  27. //----------------------------------------------------------------------------
  28. class CSparseOccArray
  29. {
  30. public:
  31. CSparseOccArray(ULONG size = OCCARRAY_SIZE);
  32. OCCURRENCE & Get( ULONG pid );
  33. void ReInitialize() { _aPidOcc.Clear(); }
  34. void Set( ULONG pid, OCCURRENCE occ );
  35. private:
  36. CDynArrayInPlace<SPidOcc> _aPidOcc;
  37. };